dhcpd.leases question

Simon Hobson dhcp1 at thehobsons.co.uk
Thu Aug 17 22:36:41 UTC 2006


Chris Zimmermann wrote:

>I'm noticing DHCP leases that have the binding state "free" in my 
>dhcpd.leases file that are a few days shy of being a month old.
>
>I couldn't find the information I'm looking for in the man pages 
>(maybe I missed it).  Here's my questions:
>
>1) When, if ever, will these leases be pruned from the dhcpd.leases 
>file?

Never, or when they get re-allocated to another client - whichever 
comes first ;-)

>2) Do these leases count against the pool?  Say my pool runs from 
>192.168.1.2 through 192.168.1.200.  This allows me to hand out 199 
>leases.  Suppose I have 198 clients with active leases, and this free 
>lease in my file.  Does dhcpd reserve this lease and deny/ignore the 
>199th DHCP request?  Or will this lease be pruned at that point, 
>since it is free?

The server will re-allocate a lease when required. It will first 
allocate 'never been used' addresses, then addresses in a free state 
(on a least recently used basis), and finally it will attempt to 
recover addresses that have been marked as abandoned. In the case you 
cite, the free address will be reused.

>3) Are there any adverse side effects from this situation?

Quite the reverse, it is done for stability. No matter how long a 
client has been off the network, it will get it's previous address 
back as long as it hasn't been re-used.

Simon


More information about the dhcp-users mailing list