Adaptive lease time patch
David W. Hankins
David_Hankins at isc.org
Mon Sep 12 16:55:19 UTC 2005
On Sat, Sep 10, 2005 at 12:28:43AM +0200, Christof Chen wrote:
> The following patch (without fancy configuration options yet) modifies dhcp.c
> so, that once a pool reaches 50% active leases, the server hands out only
> short min_lease_time leases - until the allocation drop down under 50%, when
> it reverts back to default_lease_time.
>
> My question: Is this OK to do or plain silly?
That's an interesting idea.
I think it's useful outside of the area you've scoped it for. As a
pool starts to run out of leases, the pool's ability to 'self heal'
is limited mostly by how much time it allows each lease to live.
How many admins would be saved being called if the server had started
giving short leases out before the pool was exhausted?
The patch you've supplied however would treat native clients similarly
to visitors, should they re-acquire their lease (rebooting, changing
link states, switching between wired and wireless) when the pool has
hit the threshold.
So one further optimization might be to see how long the lease is
already set to expire, if this is a renewal. In the 'lease shortfall'
case, the server might choose to give a lease->ends optimal lease-time,
or the min-time, whichever is greater.
--
David W. Hankins "If you don't do it right the first time,
Software Engineer you'll just have to do it again."
Internet Systems Consortium, Inc. -- Jack T. Hankins
More information about the dhcp-hackers
mailing list