lease file parsing

Paine, Thomas Asa PAINETA at
Thu Sep 27 01:53:07 UTC 2007


per the dhcpd.leases man page

"Server keeps a persistent database of leases that it has assigned"

"The lease file is a log-structured file - whenever a lease changes, the
       contents of that lease are written to the end of the file.   This means
       that it is entirely possible and quite reasonable for there to  be  two
       or  more  declarations  of the same lease in the lease file at the same
       time.   In that case,  the  instance  of  that  particular  lease  that
       appears last in the file is the one that is in effect"

   Thomas Paine {paineta at}
   University of Wisconsin - Eau Claire

-----Original Message-----
From: dhcp-users-bounce at [mailto:dhcp-users-bounce at] On Behalf Of Elliot Finley
Sent: Wednesday, September 26, 2007 8:30 PM
To: dhcp-users at
Subject: Re: lease file parsing

On Thu, 27 Sep 2007 09:16:35 +1000 (EST), you wrote:

>>From: Elliot Finley <efinleywork at>
>>Date: Wed, 26 Sep 2007 16:50:10 -0600
>>I'm writing a script to give me some stats on my leases.  I've found
>>that there are no leases marked abandoned but I've found that there
>>are IPs that aren't in the lease file at all (that are in my
>>configured ranges).  If an IP is not in the lease file, is it
>>considered abandoned?
>It may not have been assigned or used by any client yet.

I don't buy that because when I first fired up the server with an
empty lease file, all the IPs in my configured ranges were added with
a state of 'free'.

Anyone know the answer to this without guessing?

More information about the dhcp-users mailing list