Two active leases for client bug?

Glenn Satchell Glenn.Satchell at
Sun Mar 26 12:39:56 UTC 2006

>Date: Sun, 26 Mar 2006 11:36:41 +0000
>To: dhcp-users at
>From: Simon Hobson <dhcp at>
>Subject: RE: Two active leases for client bug?
>Darko Bezjak wrote:
>>I have just one question. Way dhcp server kips all clients leases in lease
>>file although when is lease inactive. Client has been move from one class to
>>other class but lease for client has stay in lease file forever!?
>Stock Answer : As is documented, the leases file is a 'write only' 
>database, all changes are made by appending a new record to the end. 
>The reasons are for performance and security (so that a system crash 
>cannot corrupt the database). If there are multiple matching entries, 
>then only the most recent applies.
>Periodically, the leases file is cleaned up. The program writes out a 
>new version using it's in-memory data (only one record per lease), 
>moves the old file out, and moves the new file in - you can see the 
>old file as dhcpd.leases~.

The other reason is because the dhcp RFC says that a dhcp server must
try really hard to assign the same IP address that a device previously
used. So dhcpd keeps the old leases around in the lease file "in case"
that device comes back and asks for its old IP address.

If it bothers you then stop dhcpd, edit the leases file to remove the
old lease and then start dhcpd again.


More information about the dhcp-users mailing list