Page MenuHomeVyOS Platform

Support per-interface DHCPv6 DUIDs
Closed, ResolvedPublicFEATURE REQUEST

Description

As reported in T3134, per-interface DHCPv6 DUIDs are not supported by WIDE dhcp6c. Fork the client and implement support for them.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Improvement (missing useful functionality)

Event Timeline

Hi @stepler,

WOW! Any chance getting this upstreamed? That would be the overall best solution - I still like it and think we should add it, but fetching the source from upstream reduces our maintenance load.

After solving this requirement of vyos and confirming its normal operation, it is recommended to provide a feedback repair patch and submit a pr

c-po changed the task status from Open to Needs testing.Jan 25 2021, 2:37 PM

Looks good on 1.4-rolling-202101270854:

vyos@vyos:~$ configure
[edit]
vyos@vyos# set interfaces ethernet eth0 address dhcpv6
[edit]
vyos@vyos# set interfaces ethernet eth0 dhcpv6-options duid 00:02:00:00:0d:e9:30:30:31:45:34:36:2d:58:58:58:58:58:58:58:58:58:58:58:58:58:58
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# exit
Warning: configuration changes have not been saved.
exit
vyos@vyos:~$ show version

Version:          VyOS 1.4-rolling-202101270854
Release Train:    sagitta

Built by:         autobuild@vyos.net
Built on:         Wed 27 Jan 2021 08:54 UTC
Build UUID:       df336741-0ecd-4ec5-b765-aa5c1b35831c
Build Commit ID:  37b270bab20d9f

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    df70cccc-4524-4d73-a493-ac63fcc933b8

Copyright:        VyOS maintainers and contributors

Output of tshark -pi virbr0 -f "port dhcpv6-server" -VO dhcpv6 -c 1:

Capturing on 'virbr0'
Frame 1: 127 bytes on wire (1016 bits), 127 bytes captured (1016 bits) on interface virbr0, id 0
Ethernet II, Src: RealtekU_d8:9b:b6 (52:54:00:d8:9b:b6), Dst: IPv6mcast_01:00:02 (33:33:00:01:00:02)
Internet Protocol Version 6, Src: fe80::5054:ff:fed8:9bb6, Dst: ff02::1:2
User Datagram Protocol, Src Port: 546, Dst Port: 547
DHCPv6
    Message type: Solicit (1)
    Transaction ID: 0x6cd4f5
    Client Identifier
        Option: Client Identifier (1)
        Length: 27
        Value: 000200000de93030314534362d5858585858585858585858…
        DUID: 000200000de93030314534362d5858585858585858585858…
        DUID Type: assigned by vendor based on Enterprise number (2)
        Enterprise ID: Broadband Forum (previously 'DSL Forum') (3561)
        Identifier: 3030314534362d5858585858585858585858585858
    Identity Association for Non-temporary Address
        Option: Identity Association for Non-temporary Address (3)
        Length: 12
        Value: 000000000000000000000000
        IAID: 00000000
        T1: 0
        T2: 0
    Elapsed time
        Option: Elapsed time (8)
        Length: 2
        Value: 0000
        Elapsed time: 0ms
    Option Request
        Option: Option Request (6)
        Length: 4
        Value: 00170018
        Requested Option code: DNS recursive name server (23)
        Requested Option code: Domain Search List (24)

1 packet captured

Found a minor bug: if DHCPv6 PD is configured without requesting an IPv6 address, the configured DUID is not sent.

PR https://github.com/vyos/vyos-1x/pull/704

stepler changed the task status from Open to Backport candidate.Jan 28 2021, 5:10 PM

Looks good on 1.4-rolling-202101280218:

vyos@vyos:~$ configure
[edit]
vyos@vyos# set interfaces dummy dum0
[edit]
vyos@vyos# set interfaces ethernet eth0 dhcpv6-options pd 0 interface dum0
[edit]
vyos@vyos# set interfaces ethernet eth0 dhcpv6-options duid 00:02:00:00:0d:e9:30:30:31:45:34:36:2d:58:58:58:58:58:58:58:58:58:58:58:58:58:58
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# exit
Warning: configuration changes have not been saved.
exit
vyos@vyos:~$ show version

Version:          VyOS 1.4-rolling-202101280218
Release Train:    sagitta

Built by:         autobuild@vyos.net
Built on:         Thu 28 Jan 2021 02:18 UTC
Build UUID:       959140d2-44da-4efc-be7f-f50c7d2f63e5
Build Commit ID:  37b270bab20d9f

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    d7e85bbb-ff78-4726-ab5b-831200623857

Copyright:        VyOS maintainers and contributors

Output of tshark -pi virbr0 -f "port dhcpv6-server" -VO dhcpv6 -c 1:

Capturing on 'virbr0'
Frame 1: 148 bytes on wire (1184 bits), 148 bytes captured (1184 bits) on interface virbr0, id 0
Ethernet II, Src: RealtekU_d6:87:ac (52:54:00:d6:87:ac), Dst: IPv6mcast_01:00:02 (33:33:00:01:00:02)
Internet Protocol Version 6, Src: fe80::5054:ff:fed6:87ac, Dst: ff02::1:2
User Datagram Protocol, Src Port: 546, Dst Port: 547
DHCPv6
    Message type: Solicit (1)
    Transaction ID: 0xda3d58
    Client Identifier
        Option: Client Identifier (1)
        Length: 27
        Value: 000200000de93030314534362d5858585858585858585858…
        DUID: 000200000de93030314534362d5858585858585858585858…
        DUID Type: assigned by vendor based on Enterprise number (2)
        Enterprise ID: Broadband Forum (previously 'DSL Forum') (3561)
        Identifier: 3030314534362d5858585858585858585858585858
    Elapsed time
        Option: Elapsed time (8)
        Length: 2
        Value: 0000
        Elapsed time: 0ms
    Identity Association for Prefix Delegation
        Option: Identity Association for Prefix Delegation (25)
        Length: 41
        Value: 000000000000000000000000001a0019ffffffffffffffff…
        IAID: 00000000
        T1: 0
        T2: 0
        IA Prefix
            Option: IA Prefix (26)
            Length: 25
            Value: ffffffffffffffff40000000000000000000000000000000…
            Preferred lifetime: infinity
            Valid lifetime: infinity
            Prefix length: 64
            Prefix address: ::

1 packet captured

Looks good on 1.3-beta-202102010443:

vyos@vyos:~$ configure
[edit]
vyos@vyos# set interfaces dummy dum0
[edit]
vyos@vyos# set interfaces ethernet eth0 dhcpv6-options pd 0 interface dum0
[edit]
vyos@vyos# set interfaces ethernet eth0 dhcpv6-options duid 00:02:00:00:0d:e9:30:30:31:45:34:36:2d:58:58:58:58:58:58:58:58:58:58:58:58:58:58
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# exit
Warning: configuration changes have not been saved.
exit
vyos@vyos:~$ show version

Version:          VyOS 1.3-beta-202102010443
Release Train:    equuleus

Built by:         autobuild@vyos.net
Built on:         Mon 01 Feb 2021 04:43 UTC
Build UUID:       f0edd61b-8868-4537-913a-a4bce3f3ec11
Build Commit ID:  070e2e77e93f34

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    965e3c00-1113-4e3d-828a-c2f1394e5c99

Copyright:        VyOS maintainers and contributors

Output of tshark -pi virbr0 -f "port dhcpv6-server" -VO dhcpv6 -c 1:

Capturing on 'virbr0'
Frame 1: 148 bytes on wire (1184 bits), 148 bytes captured (1184 bits) on interface virbr0, id 0
Ethernet II, Src: RealtekU_5b:ad:86 (52:54:00:5b:ad:86), Dst: IPv6mcast_01:00:02 (33:33:00:01:00:02)
Internet Protocol Version 6, Src: fe80::5054:ff:fe5b:ad86, Dst: ff02::1:2
User Datagram Protocol, Src Port: 546, Dst Port: 547
DHCPv6
    Message type: Solicit (1)
    Transaction ID: 0xc4f14a
    Client Identifier
        Option: Client Identifier (1)
        Length: 27
        Value: 000200000de93030314534362d5858585858585858585858…
        DUID: 000200000de93030314534362d5858585858585858585858…
        DUID Type: assigned by vendor based on Enterprise number (2)
        Enterprise ID: Broadband Forum (previously 'DSL Forum') (3561)
        Identifier: 3030314534362d5858585858585858585858585858
    Elapsed time
        Option: Elapsed time (8)
        Length: 2
        Value: 0000
        Elapsed time: 0ms
    Identity Association for Prefix Delegation
        Option: Identity Association for Prefix Delegation (25)
        Length: 41
        Value: 000000000000000000000000001a0019ffffffffffffffff…
        IAID: 00000000
        T1: 0
        T2: 0
        IA Prefix
            Option: IA Prefix (26)
            Length: 25
            Value: ffffffffffffffff40000000000000000000000000000000…
            Preferred lifetime: infinity
            Valid lifetime: infinity
            Prefix length: 64
            Prefix address: ::

1 packet captured

Not working for me as expected in 1.3.0-rc4
In my current working configuration, the duid is in the /var/lib/dhcpv6/dhcp6c_duid file (29 bytes).

With:
set interfaces ethernet eth3 vif 0 dhcpv6-options duid 00:02:00:00:0d:e9:30:30:31:45:34:36:2d:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
the send client-id gets properly configured in file /run/dhcp6c/dhcp6c.eth3.0.conf

However, the content of /var/lib/dhcpv6/dhcp6c_duid gets replaced so the file size is 16 bytes and dhcp6c stops getting any PDs.

Verified working in GNS3 on 1.3.0-rc4. Note that /var/lib/dhcpv6/dhcp6c_duid is not used if send client-id is configured.

SrividyaA set Issue type to Improvement (missing useful functionality).Aug 30 2021, 5:39 PM