Shared networks and range priority

Simon Hobson dhcp1 at
Tue May 6 19:04:45 UTC 2008

Enrico Demarin (home) wrote:

>I am running a shared network configuration where i have a pool of 
>public routable addresses  and a pool of private addresses, and I am 
>wondering if it's possible in any way to define the priority which 
>the dhcp server will use in offering these addresses.

No, by defining a shared network you are explicitly telling the 
server that (in the absence of any controls such as client classing) 
all defined ranges are equivalent.

>Given the configuration below, is it possible in any way to have the 
>dhcp server assign  the addresses from the 48.37 network  first and 
>begin assigning the addresses of the 10.1 subnet last ?

If you stop and think about it, that would only work for a short time 
anyway. If you could get the server to use one range first, it would 
still go on to use the other range in preference to re-using no 
longer leased addresses in your first range - that is a specific 
requirement of the RFCs in order to minimise address churn.

You can split the usage any way you want provided that you can write 
an expression to group your clients into classes - but that would be 
a fixed "this client belongs in this range" type of assignment.

There is one way in which you could fudge the system to mostly do 
what you want though, but it's not very elegant of clean ! If you 
wrote a script to make leases for every 10.1 subnet address then you 
could have all those addresses marked as having been previously 
leased. In that case, the server would allocate new leases from the 
other ranges as long as there were 'never leased' addresses left - 
after that the server would reclaim and reuse 10.1 addresses.

You then have a problem - what next ? How long do you allow a public 
address to be unused before you clean up and delete all record of 
it's previous use ? When you've done that, do you force clients to 
switch addresses into the public pool ? How do you do that ? Will you 
do it to a 'running client' (and thus break all their network 
connections), or only if they let their lease expire ?

More information about the dhcp-users mailing list