Page MenuHomeVyOS Platform

DHCPv6: "set show dhcpv6 server leases" should show DUID instead of IAID_DUID
Open, HighPublic

Description

I'm trying to use DHCP and DHCPv6 for the first time on VyOS instead of PfSense.

I use static-mapping on both DHCP and DHCPv6 so I can match the networks and IP addresses on both IPv4 and IPv6 addresses for a client.

For instance:

10.1.10.51 myhost
2001:db8:abcd:10::51 myhost

DHCPv4 static-mapping is working fine.

However, on DHCPv6 I have:

service {
    dhcpv6-server {
        shared-network-name DHCP-MAN {
            subnet 2001:db8:abcd:10::/64 {
                address-range {
                    start 2001:db8:abcd:10::101 {
                        stop 2001:db8:abcd:10::199
                    }
                }
                lease-time {
                    default 7200
                    maximum 7200
                    minimum 3600
                }
                name-server 2001:db8:abcd:10::1
                }
            }
        }
    }

When I run "set show dhcpv6 server leases" it shows

IPv6 address           State    Last communication    Lease expiration     Remaining    Type           Pool      IAID_DUID
---------------------  -------  --------------------  -------------------  -----------  -------------  --------  -----------------------------------------------------------------
2001:db8:abcd:10::198  active   2022/07/08 10:44:32   2022/07/08 12:44:32  0:52:22      non-temporary  DHCP-MAN  eb:0f:22:b6:00:04:4e:09:79:19:a0:b2:ee:72:a8:0b:e6:40:af:f2:7a:b9

I thought the displayed IAID_DUID would be the identifier I put in to a static mapping like so:

set service dhcpv6-server shared-network-name DHCP-MAN subnet 2001:db8:abcd:10::/64 static-mapping myhost identifier eb:0f:22:b6:00:04:4e:09:79:19:a0:b2:ee:72:a8:0b:e6:40:af:f2:7a:b9

set service dhcpv6-server shared-network-name DHCP-MAN subnet 2001:db8:abcd:10::/64 static-mapping myhost ipv6-address 2001:db8:abcd:10::51

However that didn't work, the address of my client never changed to the desired 2001:db8:abcd:10::51

After a day or so (to make sure it was timing out properly and it still didn't change) I finally did a

grep duid /var/log/messages

and found the following line

Jul  8 00:15:39 vyos-test dhcpd[10950]: Reply NA: address 2001:db8:abcd:10::198 to client with duid 00:04:4e:09:79:19:a0:b2:ee:72:a8:0b:e6:40:af:f2:7a:b9 iaid = -1239281685 valid for 7200 seconds

Note that that "duid" is completely different from the listed IAID_DUID.

So when I put that "duid" like so:

set service dhcpv6-server shared-network-name DHCP-MAN subnet 2001:db8:abcd:10::/64 static-mapping myhost identifier 00:04:4e:09:79:19:a0:b2:ee:72:a8:0b:e6:40:af:f2:7a:b9

then things finally worked and my client got the expected 2001:db8:abcd:10::51 address.

All that is a long-winded explanation to finally request the following:

If possible, please change the displayed IAID_DUID to DUID (the "duid" listed in the /var/log/messages) so that people can more easily find out the DUID of the client and set that in the static-mapping.

Without that information, the user has to do a "grep duid /var/log/messages" to find the DUID (listed as "duid" in the messages file) to put in to the static-mapping.

I think that would make things tremendously easier to use in setting up IPv6 DHCPv6 static mappings.

Does all that make sense?

Am I missing some other place or piece of information that would accomplish easily finding out the proper DUID?

Thanks for your consideration.

Details

Difficulty level
Unknown (require assessment)
Version
1.3
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

dsummers updated the task description. (Show Details)

Change DUID to IAID_DUAID was in T1470
Not sure which format we should to use