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

Ryan McCain Ryan.McCain at
Fri Dec 21 21:07:39 UTC 2007

I might have figured it out.  Unfortunately there is no one here to test due to the holidays:

class "DialUp" {
    match if substring(option vendor-class-identifier, 0, 9) = "ASYNC";
        log (info, " Matched Dialup Rule");

subnet netmask {
    pool {
        allow members of "DialUp";
        option routers;


subnet netmask {
  range ;
  option routers;


..Will this reserve IP addresses - for DHCP clients with a UID that contains ASYNC?

>>> On Fri, Dec 21, 2007 at  2:46 PM, in message
<476BD1DB.5D1A.003A.0 at>, "Ryan McCain"
<Ryan.McCain at> wrote: 
> I found a few posts in the archives but am a bit confused.  I don't know what 
> the 0 and 9 are for and used the example I found as a template.  I am on the 
> right track if I want all DHCP clients that connect w/ the UID containing 
> ASYNC be assigned IP addresses between only??
> class "DialUp" {
>     match if substring(option vendor-class-identifier, 0, 9) = "ASYNC";
>         log (info, " Matched Dialup Rule");
>         range
> }
> ..Thanks..
>>>> On Fri, Dec 21, 2007 at 12:40 PM, in message
> <a06240822c391b86b364d at>, Simon Hobson
> <dhcp1 at> wrote: 
>> 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 
>> internally.
>> 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