I’m struggling to assign static mappings in the DHCPv6 server based on Mac Address. It just doesn’t work. Using DUID works great. But, I have an Ubuntu laptop that has wifi and often times is plugged in. I want to assign both interfaces with a static mapping. The issue is, when they each get an address from the server, both interfaces are advertising the same DUID. So I can’t use DUID to set the mapping because I can’t have two mappings with the same DUID.
I am trying MAC address as the identifier and it just seems to not work.
Here is my config and log output:
static-mapping stanton {
ipv6-address <subnet>::14
mac 08:6a:c5:4e:7b:22
}
$ show dhcpv6 server static-mappings
Pool Subnet Hostname IP Address MAC Address DUID Description
------ ----------------------- -------------- ------------ ----------------- ----------------------------------------------------- -------------
LAN <subnet>::/64 stanton 08:6a:c5:4e:7b:22 N/A N/A
When I connect that interface, while following the log for the dhcpv6 server process, I get this:
Feb 25 11:25:54 ruth kea-dhcp6[1077948]: 2025-02-25 11:25:54.236 INFO [kea-dhcp6.leases/1077948.139984773998272] DHCP6_LEASE_ADVERT duid=[00:04:74:bc:e5:dc:8a:8e:cc:f8:3c:dd:96:43:db:10:db:72], tid=0xff062e: lease for address <subnet>::49 and iaid=1183161055 will be advertised
Feb 25 11:25:55 ruth kea-dhcp6[1077948]: 2025-02-25 11:25:55.248 INFO [kea-dhcp6.leases/1077948.139984765605568] DHCP6_LEASE_ALLOC duid=[00:04:74:bc:e5:dc:8a:8e:cc:f8:3c:dd:96:43:db:10:db:72], tid=0x38491a: lease for address <subnet>::49 and iaid=1183161055 has been allocated for 604800 seconds
I assigned ::14 and the server gave it ::49.
Interface details:
$ ifconfig wlp0s20f3
wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.4 netmask 255.255.254.0 broadcast 10.0.1.255
inet6 <subnet>::49 prefixlen 128 scopeid 0x0<global>
inet6 fe80::60bf:2e36:6f99:7cfb prefixlen 64 scopeid 0x20<link>
ether 08:6a:c5:4e:7b:22 txqueuelen 1000 (Ethernet)
RX packets 37167 bytes 31372953 (31.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17546 bytes 4019245 (4.0 MB)
TX errors 0 dropped 55 overruns 0 carrier 0 collisions 0
Here is the lease info showing the same DUID:
<subnet>::48 active 2025-02-25 18:15:29+00:00 2025-03-04 18:15:29+00:00 6 days, 23:40:53 IA_NA LAN 00:04:74:bc:e5:dc:8a:8e:cc:f8:3c:dd:96:43:db:10:db:72
<subnet>::49 active 2025-02-25 18:34:25+00:00 2025-03-04 18:34:25+00:00 6 days, 23:59:49 IA_NA LAN 00:04:74:bc:e5:dc:8a:8e:cc:f8:3c:dd:96:43:db:10:db:72
I don’t know too terribly much about DUID, I had hoped it would be unique per interface, but it’s not.
$ show version
Version: VyOS 1.5-rolling-202502041521
Release train: current
Release flavor: generic
Built by: <myemail>
Built on: Tue 04 Feb 2025 15:21 UTC
Build UUID: 2f6ed0ca-5af0-4688-a59f-df45b0726f5a
Build commit ID: c1a7b705862a02
Architecture: x86_64
Boot via: installed image
System type: bare metal
Secure Boot: n/a (BIOS)
Hardware vendor: Protectli
Hardware model: FW4B
Hardware S/N: 123456789
Hardware UUID: Unknown
Copyright: VyOS maintainers and contributors