GNOME Bugzilla – Bug 790660
[RFE] Please add option to internal DHCP to use the MAC address as client ID
Last modified: 2018-02-15 15:31:57 UTC
Hi there, we use linux a lot to PXE boot stateless systems and have switched to the internal DHCP client of NM due to issues with dhclient loosing network connectivity that have been outstanding for a very long period of time (3+ yrs and counting :/ https://bugzilla.redhat.com/show_bug.cgi?id=1093803). We would like to use the MAC address as the client ID because that's what the PXE ROMs and most other stuff also use and is one of relatively few things that is consistent among it all. Many of these things also don't release the lease. So a lease gets eaten up by the PXE ROM / PXE bootloader and then another one due to NM using a generated client ID instead of the MAC address. As these systems are stateless the ID is also regenerated every boot (and thus differs). Having the same ID (not generated on boot) on a stateless system is even worse, you'll get duplicate IPs on all machines that have the same name for the network device, which is often the case as people buy the same model for the whole room / office and they're thus all named eno1 or ens192, etc.. As you can imagine if you boot such a machine several times a day, and have a lease time that's long, say 8 days which is very common on MS DHCP, you'll be out of addresses in the pool quite quickly. Using the MAC address as the client ID would cause it to always use the same lease which would be much preferred. This would also be consistent over reboots in stateless systems. Doesn't need to be the default of course, but having the option to use it would be a warm welcomed option for stateless systems. Thanks in advance and for all the great work you guys have already done :).
see https://github.com/NetworkManager/NetworkManager/pull/66
(In reply to Thomas Haller from comment #1) > see https://github.com/NetworkManager/NetworkManager/pull/66 pull request merged to master. Closing as fixed. A way to configure this is by adding a file /etc/NetworkManager/conf.d/20-dhcp-client-id-mac.conf with [connection-dhcp-client-id-mac] ipv4.dhcp-client-id=mac which sets the default value of this property for all connections which don't explicitly set the value on a per-connection basis.