Where are the IP addresses, assigned through systemd-networkd DHCP, cached? I have changed my router and have a totally different setup, including preferred addresses for hosts. My host (my workstation) keeps asking for an extension on the lease of an IP address that is not the one preferred by the DHCP server. This makes a mess of my DNS. How can I force my host to start with a totally clean slate?

  • To flush the dns cache: systemctl restart dns-clean.service – GAD3R Jul 27 '17 at 13:35
  • Regrettably, it's not my dns cache that's the problem, but the cached dhcp address assignment, that is reused when re-booting. – Nicole Jul 28 '17 at 16:48

According to systemd's source code, lease information is saved in /run/systemd/netif/leases/<number>. But the problem is that the whole /run directory is tmpfs and thus should be deleted on reboot. Maybe it is cached somewhere though.

In my situation the problem was on a router, after updating static leases configuration in dd-wrt I didn't purge lease cache on the router itself.

| improve this answer | |

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.