ISC dhcpd 4.4.1 dhcpd.leases file size and entries age

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


Sten Carlsen <stenc at s-carlsen.dk> wrote:

> What would make an old entry disappear? That its address has been reused? I did not think that would do it, when the device returns after years, the same address could be available, so why not use that?

I believe that as soon as the address is re-used, it is no longer recorded as having belonged to the older lease. If you think about it, that 4 year old device could come back, it's address might be free "now" - but then the newer device comes back and it can't have it's address back.

In the general case, it makes sense to do it that way - when it comes to recycling addresses, the longer since it was last used, the less likely it is that the device will be coming back for it.


For the benefit of the OP, the address allocation is done by :
- If the device is already known* then it is given it's previous address
- If there are any addresses which have never been used (no entry in leases database) then one of those is allocated
- A previously used but expired lease is recycled on a least recently used basis
- An address marked as abandoned is reclaimed
- Allocation fails !

* Clients are known by the Client-ID if one was provided, or by the MAC address if no Client-ID provided. A single device could appear as several different clients if it uses different Client-IDs,


More information about the dhcp-users mailing list