DDNS with host declarations

Glenn Satchell Glenn.Satchell at uniq.com.au
Sun Oct 29 12:01:27 UTC 2006

>Date: Sun, 29 Oct 2006 12:43:46 +0100 (MET)
>From: Jan Engelhardt <jengelh at linux01.gwdg.de>
>To: dhcp-users at isc.org
>Subject: Re: DDNS with host declarations
>>See the section in dhcpd.conf on classes. You can define a single class for 
>>host based on the mac address. Then create a pool with a single IP address in 
>>the range. Something like this:
>>class "xp" {
>>  match if hardware = putsomethinghere;
>>subnet {
>>  ...
>>  pool {
>>    allow members of "xp";
>>    range;
>>  }
>>  ...
>Hm there is a slight problem:
>class "xp" { match if binary-to-ascii(16, 8, ":", hardware) = 
>"00:0C:29:93:C6:21"; }
>subnet ... {
>  range;
>  pool { allow members of "xp"; range; }
>The client always gets the IP address it used before (234.20) rather 
>than picking up .41. Is this because of the unconditional range 
>I also tried with `match if 1=1` but it won't get .41.
>>Which can be quite clumsy if you need to have more than a few hosts
>>defined this way.
>Well it looks a little nicer than having to put the IP in _two_ 
>different places (dhcpd.conf and named db).
>	-`J'

I realiased after I sent the last message that you also need to exclude
the class from any other ranges. Also you can simplify the match
statement (note no quotes around the mac address, see dhcp-eval man
page, the leading 01 is interface type and 01 is ethernet) like this:

class "xp" { match if hardware = 01:00:0C:29:93:C6:21; }
subnet ... {
  pool {
    deny members of "xp";
    deny members of "another1";
  pool { allow members of "xp"; range; }
  pool { allow members of "another1; range; }

If you allow a particular class that implies denying all other classes.

The range you offer in all the pools must be valid within the subnet,
else you will get an error from dhcpd. You've got 192.168.234.x and
192.168.222.y so I guess it's not a /24 subnet.

Glenn Satchell     mailto:glenn.satchell at uniq.com.au | Some days we are
Uniq Advances Pty Ltd         http://www.uniq.com.au | the flies;  some
PO Box 70 Paddington NSW Australia 2021              | days we  are the
tel:0409-458-580  tel:02-9380-6360  fax:02-9380-6416 | windscreens...

More information about the dhcp-users mailing list