Two active leases for client bug?

Simon Hobson dhcp at thehobsons.co.uk
Sun Mar 26 16:11:41 UTC 2006


Darko Bezjak wrote:

>However I have 50% old lasses in the lease database and database will grow
>in the future. Maybe is some method similar to periodically clean lease
>duplication in the database. With this tool will be lease database much
>smaller.

So ? The size of the file on disk will (for the majority of 
installations) be an insignificant fraction of the disk it's on. The 
size of the in-memory structures will (IIRC from previous comments 
here) be nearly the same as all leases and potential* leases are 
stored in memory during run-time.

So pruning old leases from the file will actually save you very 
little and is unnecessary. Once all addresses have been used once, 
then the server will re-use them on a least recently used basis. As 
Glenn says, this is to comply with the RFC that says you should 
attempt to give a client the same address as it last had - helps with 
network stability.

Simon

* Apparently, during startup the server allocates structures in 
memory for every IP that could be leased (ie that is in a range 
statement). It then reads through the dhcpd.leases file and populates 
those structures for all active and expired leases. For this reason, 
setting overly large ranges (such as 10.0.0.2 to 10.255.255.253, over 
16 million addresses !) should be avoided as it increases memory 
requirements and startup times.


More information about the dhcp-users mailing list