Networkmanager DUID computation inconsistent with wicked and dhclient defaults
summarized from several conversations.
get_duid() in src/dhcp-manager/nm-dhcp-dhclient.c always computes the DUID based on /etc/machine-id. The methods LL and LLT as supported by dhclient are not supported, not even optionally. This is also inconsistent with the wicked default behavior (LLT?)
This causes a problem in corporate networks that want to configure IPv6 DHCP based on MAC addresses of the interface
Workaround to get a LLT based DUID:
- open wired connection settings and create a profile. This is mandatory, otherwise the NM internal UUID of the connection changes on every boot.
- run ps axw|grep dhclient
- killall NetworkManager
- killall dhclient
- rm /var/lib/NetworkManager/*.lease
- copy&paste the v6 dhclient command line. remove the -sf /whatever/... option and run it as root. hit ctrl-c when it got an address
- rcnetwork start
Now dhclient computed a DUID with mac address and put it in the lease file. NM will reuse that.
NM uses DUID-UUID because DUID-LL/LLT are not guaranteed to remain constant across boots. See https://mail.gnome.org/archives/networkmanager-list/2016-May/msg00030.html
It doesn't matter if DUID-LL / LLT is constant across boots - as it contains ALWAYS the MAC address of the device, because it's based on the MAC address of the device and DHCPD6 (ISC DHCPD) on the other side is able to give out a v6 address based on the MAC address of the device.
Yes, we are aware of the fact, that one device might have more than one IP address, but in reality, in most companies, that's not the case for client hardware. That's why we match on the MAC as it is easy to find out and transfer to us in a ticket by the user.
Furthermore... there should be an option to choose DUID-LL/LLT even if they are not constant... why is there a hardcoded-routine that implements DUID-UUID and drops of all the other options DHCLIENT offers? That makes absolutely no sense and is a bad behaviour of network manager.
This should be fixed, to give the users at least an option.