[DHCP] Clean up of the dhcpd.leases file
dhcp1 at thehobsons.co.uk
Mon Mar 19 19:29:17 UTC 2012
Ashley M. Kirchner wrote:
> That's actually exactly what I do, just delete the file. Static
>IPs are defined in dhcp.conf, not in .leases. The .leases file just
>gets updated every time there's a connection change. I have yet to
>see any ill behavior from deleting it. All the systems on the
>network will at some point renew without a problem.
Please do not suggest that.
Because you haven't seen a problem does **NOT** mean it is a safe or
sensible thing to do.
Deleting the leases file fundamentally breaks things - because you
now have a server that has made promises to clients that it no knows
Two of the issues it can cause :
1) First and foremost, the server will now most likely attempt to
lease out addresses which are already in use by other devices.
If the device is responding top pings, then the "ping before offer"
"last chance" safety net will result in that address being marked as
abandoned. Abandoned leases are bad because, unless you have a lot of
spare addresses, they diminish the size of the active pool (they are
only use as a last resort) and will increase address churn.
If the device doesn't respond to pings (as is common these days) then
the lease will be issued, and depending on client behaviour you will
either have two devices fighting over the address (neither will work)
or the device will detect the issue and decline the lease. I'm not
sure what the server does - I think it will try and lease the address
again to another client.
2) If you are using dynamic DNS updates, the server will no longer
know which DNS entries it has created. Most devices will get their
DNS "sorted" next time they renew, but you will also probably end up
with orphaned DNS entries because the server will not know about DNS
entries it needs to remove.
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the dhcp-users