What does 'add "classname"' really do? - solved!

Goesta Smekal goesta at smekal.at
Wed Mar 18 08:31:44 UTC 2009


On Tue, March 17, 2009 21:30, Goesta Smekal wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Glenn Satchell schrieb:
>> class "mammals" {
>>   match hardware;
>> }
>> subclass "mammals" 1:00:50:56:00:00:01;
> [...]
[...]
> So my Problem is only partially solved yet ;-) I now am able to assign
> hosts to pools and groups, at the cost of specifying the MAC twice.
>
> Almost there ;-)

Done! The clue lies within subclass options and avoiding the
"unknown-clients" keyword.

Just in case anybody would like to do such a thing again, I post my
working config here:

<dhcpd.conf>
authoritative;
allow booting;
allow bootp;

default-lease-time 60;
max-lease-time 120;

use-host-decl-names on;

option domain-name "bogus";
option domain-name-servers 192.168.80.2;
option routers 192.168.80.1;

next-server 192.168.80.254;
filename "pxelinux.0";

class "birds" {
  match hardware;
}
subclass "birds" 1:00:50:56:00:01:01 { option host-name "tux"; }

class "mammals" {
  match hardware;
}
subclass "mammals" 1:00:50:56:00:02:01 { option host-name "gnu"; }
subclass "mammals" 1:00:0c:29:96:9a:bc { option host-name "a-new-machine"; }

subnet 192.168.80.0 netmask 255.255.255.0 {
  option broadcast-address 192.168.80.255;
  pool {
    allow unknown-clients;
    deny members of "mammals";
    deny members of "birds";
    range 192.168.80.200 192.168.80.209;
  }
  pool {
    allow members of "mammals";
    filename "memtest.bin";
    range 192.168.80.210 192.168.80.219;
  }
  pool {
    allow members of "birds";
    filename "pxelinux.0";
    range 192.168.80.220 192.168.80.229;
  }
}
</dhcpd.conf>

Thanks, Glenn, for the hint!

  Goesta





More information about the dhcp-users mailing list