Shared network thresholds

Simon Hobson dhcp1 at thehobsons.co.uk
Tue Nov 22 21:00:05 UTC 2016


project722 <project722 at gmail.com> wrote:

> When I implemented the shared network for this market, the primary subnet 192.168.100.0 was around 80% max. Its now at 90% and still climbing. The secondary is taking on leases but I want to know what logic controls whether or not new turn-ups get addresses from the primary or secondary? Is there an option or directive I can add to tell dhcpd to hover around the 80% mark on the primary? What's going to happen if dhcpd maxes it out? I'm sure new turn-ups would go into the secondary pool but I'd like to have at least a 15% buffer. 

There is a defined method for allocating leases. The allocation routine follows this order :

1) If the client requests a specific address, and this is available for it, then it is given.

2) If the client previously had an address, and this address is still available to be given to the client, then it is offered.

3) If there are any "never used before" addresses, then one is picked according to an undocumented internal process. At the moment, the internal hashing process results in them being picked "top down" - but this is liable to change at any time without notice so don't rely on it.

4) A previously used address is picked on a least recently used basis - ie the address that has been in the free state for longest.

5) If there are any abandoned leases, then the server will test to see if any of them can be recovered.

6) If you reach here - there's nothing to give the client so it fails.

In your case, I'd have expected step 3 to mean the second subnet filling up, so I'm not sure what's going on.
Over time, assuming some client churn, you should find both subnets settle out at around half the clients each due to step 4. You could accelerate the process by creating dummy leases in each subnet to reduce the number of never used addresses and so get to the pseudo-randon allocation strategy implied by step 4.



More information about the dhcp-users mailing list