Hack/modification to enforce minimum time?

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Mar 7 22:40:05 UTC 2007

Oscar Ricardo Silva wrote:

>Not sure if I'll describe this properly ... we're considering a 
>modification of
>the dhcp server code to add extra time to the lease so it's completely not
>available for an amount of time after lease expiration.  Before going forward
>with this we'd like to know if anyone has already worked on this or 
>implemented it.
>We have several public networks that have a lot of churn, lots of users coming
>and going.   Client A comes along, requests an address, gets address,
>the lease time is set to an hour but the client leaves after being on for only
>10 minutes so he issues a release.  Let's say our accounting 
>software refreshes
>its records every 20 minutes.  Since Client A issued the release, 
>the address is
>marked as available.  Client B comes along, requests and address, 
>   As far as our accounting records go, we still think Client A is 
>using address
>  We want to enforce the lease time (or maybe half the lease time) so
>that an address is marked as unavailable during either the lease time or half
>the lease time.  That way, when client B comes along, even though address
> is marked as released, it's still in the original lease time 
>so client B
>has to be assigned another address.

I think you've missed a key detail here - addresses are reused on a 
least recently used basis, so if  the address really is reused in 
that short a time then I think you have a more serious problem ! For 
this to happen, you would have to have no other expired leases which 
expired earlier - which in practical terms you have virtually no free 
leases. Which means, you have insufficient addresses for your 

However, if you did want to implement the modification, I suspect the 
simplest way to do it is to simply ignore dhcp-release messages. You 
will then start getting complaints because, in the scenario above, 
client B would not get an address as there wouldn't be one free.

More information about the dhcp-users mailing list