0

I noticed that my DHCP lease file (/var/lib/dhcp/dhclient.eth1.leases) has more than one entry for my external Internet-facing IP interface.

Some of the lease entries have overlapping timeframe.

I'm running ISC DHCP client (dhclient) on Debian 9.

What could be the cause?

1

It turns out that both systemd-networkd and dhclient are running at the same time and that both daemons were operating on the same file.

  1. dhclient updated /var/lib/dhcp/dhclient.eth1.leases
  2. systemd-networkd processed same DHCP RESPONSE packets as well and sent packets of which dhclient received as well.

systemd-networkd set its T1 timer much earlier, so it reported 'DHCP lease lost' to syslog(), replaced IP address with a different one, leaving dhclientd confused.

If you want ISC DHCP client (and not systemd), then turn off DHCP in systemd by editing /etc/systemd/network:

   [Network]
   DHCP=no

If you want systemd (over ISC DHCP client), then uninstall dhclient package:

   apt-get remove isc-dhcp-client

== RESOLUTION ==

In my case, Verizon FiOS runs a Juniper Network DHCP server and likes to see dhclient reporting Wireless_Broadband_Router as the host-name and domain-name as home which is what the Actiontec Cablemodem router does anyway. They also prefers handle broadcast DHCP REBIND message, and not unicast DHCP REBIND message.

Furthermore, DHCP option isn't supported in systemd-networkd, so ISC DHCP remains as king.

Also, posted my entire code base related to systemd and ISC DHCP client at GitHub.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.