Shared networks and range priority

Simon Hobson dhcp1 at thehobsons.co.uk
Tue May 6 21:39:05 UTC 2008


At 15:52 -0400 6/5/08, Enrico Demarin (home) wrote:

>this particular scenario is a hotspot in a hotel, so address 
>churning wont be really an issue since guests come and go ( and in 
>most cases are hardly seen again for a long time ), so i guess i 
>would let the lease survive after it has been unused for at least to 
>24 hours before wiping it out. The reason we want this behaviour is 
>to minimize problems with VPN clients due to NATing.

Might I suggest that you'll still get support issues - only things 
will be less determinate as clients could be NATed or not and could 
have different experiences on different visits.

>Is this a parameter that is tunable or is mandated by the RFC ?

No, it's not tunable. The ISC server retains expired leases so that 
should a client return to the network it will get the same address.

When allocating an address to a client, the server will select an 
address by a defined process, in decreasing order of precedence :

An address requested by the client if that address is available.

An address previously leased to that client.

An address which has never been leased before*

An expired lease, choosing the least recently expired lease.

A reclaimed abondoned address.

* The order is undefined, determined by the way the software is 
written, and subject to change at any time.

>I could have a separated daemon do the housekeeping of the leases 
>file on regular intervals ( using the approach you proposed of 
>creating "fake" leases for 10.1 addresses  ) , in a nutshell it 
>would :
>
>1) read the leases file
>2) create the fake leases for every 10.1 addresses unless a lease 
>for a specific address is active and newer than 24 hours
>3) wipe out any 48.37 lease inactive for more than 24 hours
>
>I suppose the housekeeping daemon should kill dhcpd before touching 
>the leases file, or is there a way to manipulate this file while 
>dhcpd is running ?

You could create the dummy 10.1 leases with a scripted client - just 
lease each address on a very short lease. Do that often enough and 
the 10.1 leases would stay 'fresher' than most of the public IP 
leases.

You cannot do anything to the leases file while the server is 
running. The server only reads the file at at startup - after that, 
it's a write only file (the working tables are all held in memory).


More information about the dhcp-users mailing list