Strange DHCP behaviour

Simon Hobson dhcp1 at thehobsons.co.uk
Thu Oct 25 10:08:26 UTC 2018


tony <lists at vanderhoff.org> wrote:

> Whilst waiting for a response to my cry for help, I continued fiddling,
> and deleted the leases file. That seemed to fix thye problem.

For the benefit of others finding this thread ...
In general it is a very bad idea deleting the leases file. In your case, not a problem as you have a small network and still at the testing stage.

But in general, with an active network, you have blown away the record of all the "promises" the server has made to clients. There will be clients with active leases, but the server will have no record of them. At the very best, this can result in churn when clients come back (eg a device that's been switched off is turned on) and their address has been leased to another device - so they get a new address. But what is likely to happen is new clients come along and get offered an address that's already in use - what happens then depends on a number of factors.

If the device already using the address responds to pings, then the server may detect it with it's "ping before offer" function. The address will then be marked as abandoned - and not used again unless you completely run out of free addresses. This results in increased address churn "forever" as part of your pool is never used unless you clean it up (or they get recovered if you run out of addresses which shouldn't happen in a well provisioned network).

If the device doesn't respond to a ping, then the server will offer the address to the client. The client *should* detect that it's already in use and reject the offer - but the server will not stop offering the address to clients, resulting in a lot of "offer-reject" exchanges. If the client is poorly implemented and just accepts the address then you now have two devices using the same address and neither will work properly/at all. Users may or may not (depending on the implementation) get a warning about the duplicate address.



More information about the dhcp-users mailing list