Quarantine addresses for a configurable time

Simon Hobson dhcp1 at thehobsons.co.uk
Thu Feb 17 10:33:23 UTC 2011


Flavio Poletti wrote:

>    simple use case: Alice gets address A and after some time releases
>it. I would like to be able to set a "quarantine-period" during which
>the released address A can only be re-assigned to Alice and to no one
>else. After this period, the address is fully released and can be
>reused for someone else if needed.
>
>Conceptually, it's as if Alice renewed the lease for
>"quarantine-period" seconds instead of releasing it, and it is then
>released after "quarantine-period" seconds unless Alice asks for an
>address again.
>
>Is it possible by simple configuration of ISC's dhcpd? I tried to look
>in the documentation but did not find anything applicable, apart from
>the address hunting algorithm that only gives me some "best effort"
>but no guarantee that address A can be blocked for some time.

As you've observed, this is the standard allocation technique apart 
from there being no minimum before an address is re-allocated if 
needed. There is no built in method for enforcing a minimum time 
before an address is re-used. It would be  sub-optimal for most 
people, either :
1) There are enough available addresses (relative to the client churn 
rate), in which cases Alice's address won't get re-used for some time
or
2) There aren't enough addresses, and so Alice's address will be 
needed and to reserve it would "break the network" for some other 
client.


There is one method I could see having potential. Newer versions 
support reserved leases - these are never re-assigned to another 
client no matter how long they've been expired. It would need some 
external scripting, but it might be possible to set the reserved flag 
on Alice's lease while it is active (or on all new leases, depending 
what you are trying to do). Periodically, your script checks the 
status of leases, and for those that have been expired for more than 
your quarantine period, it unsets the reserved flag and makes them 
available for re-allocation.


But I do find myself asking ... Why ?
-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the dhcp-users mailing list