DHCP issues

BradTheGeek

Dabbler
Joined
Jun 11, 2014
Messages
12
Setting up a TNS box and having some interesting issues. I tend to manage IP assignment from the DHCP server side with reservations, so that I have a central place to go manage 'static' IP assignments. On this network my DHCP server is the router (Unifi Dream Machine Pro).

When the TNS device first connected to the network it was handed a DHCP address of 192.168.3.43. I used the Unifi panel to set a fixed reservation of 192.168.3.21
When I bounced the interface it received the .21 address and all was good. Until a reboot, when the TNS reverted to .43

I did some troubleshooting and what I have found is that the DHCP client on the TNS is using something other than the MAC address as the DHCP Client Identifier. This appears to be a default behavior of Debian.

I can temporarily fix the issue by adding the following line to /etc/dhcp/dhcpclient.conf
send dhcp-client-identifier = hardware;

This forces the DHCP client to send the MAC as the identifier, and Unifi assigns the TNS the correct reserved IP assignment. However, making any other network changes will reset the conf file. I found this out when trying to configure LACP/LAGG on a different set of interfaces (a storage VLAN for iSCSI traffic). Presumably other maintenance/update procedures would also overwrite custom changes to dhcpclient.conf as well.

Is there any way to get this change to persist or otherwise fix DHCP behavior? I could set the TNS to a static IP outside of the DHCP range, but I MUCH prefer to have all reservations/assignments done on the DHCP server side so they are all managed in one place.
 
Top