DHCP lease order
Simon Hobson
dhcp1 at thehobsons.co.uk
Fri Jan 23 20:20:16 UTC 2009
Brendan Forsyth wrote:
>Our dhcp server gives out leases from the end of the subnet back to
>the beginning.
>
>Is it possible to reverse this ordering?
Actually, the ISC server allocates (never used before) addresses in
an implementation specific and undocumented order - it just so
happens that AT THE MOMENT it does it "top down".
That is only the case when there are addresses that have never been
used. Once there are no such addresses, it will reclaim expired
leases in a least recently used manner and normally addresses will
then appear to be allocated randomly.
There is no direct way to influence allocation order of addresses,
but you can fudge the issue if you really care (why ?). If you write
a script that will create dummy leases for all available addresses,
then you can determine the order that addresses will be allocated in
future by simply ordering the expiry date/time of each dummy lease.
The obvious question is why do you want a specific order ? There
isn't really any good reason other than your are trying to do
something that probably has a another way.
--
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