How does DHCPD determine what IP address to assign and...

Simon Hobson dhcp1 at
Fri Dec 21 18:40:28 UTC 2007

Ryan McCain wrote:

>1) If I have a defined scope of -, whill 
>DHCPD hand out .1 to the first DHCPD client, .2 to the second and so 
>on?  Or is there another algorithm thats used?

No, officially the initial order is undefined - in practice, the 
current implementation will allocate unused leases from the highest 
address down for no other reason than the way they are hashed 

Once there are no "never used before" addresses left, addresses are 
recovered from expired leases on a least recently used basis.

>2) Is it possible to assign a subset of IP addresses in my scope to 
>DHCP clients whos UID identifier contains a specific string?  For 
>example, all dialup users have ASYNC in their UID.  We'd like to be 
>able to assign them IP addresses - .180.

Yes, see the list archives, and 'man dhcpd.conf' looking for classes 
and subclasses.

Very briefly, you define a class which matches on some criteria (such 
as the UID starting with ASYNC), then define a pool and only allow 
members of the class to use that pool.

More information about the dhcp-users mailing list