What does 'add "classname"' really do?

Glenn Satchell Glenn.Satchell at uniq.com.au
Tue Mar 17 03:33:28 UTC 2009


Hi Goesta

You can simplify this by getting rid of the host statement all
together, the 'allow members of' statement specifically excludes all
requests that are not members of that class including known or unknown
hosts, eg:

class "mammals" {
  match hardware;
}
subclass "mammals" 1:00:50:56:00:00:01;

subnet 192.168.80.0 netmask 255.255.255.0 {
  # other options ...
  pool {
    allow members of "mammals";
    range 192.168.80.100 192.168.80.199;
    }
}

regards,
-glenn

>Date: Mon, 16 Mar 2009 23:49:49 +0100
>From: Goesta Smekal <goesta at smekal.at>
>To: dhcp-users at lists.isc.org
>Subject: What does 'add "classname"' really do?
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Dear list,
>
>  after fumbling around for a while, trying to group certain hosts on a
>subnet into classes I reached the following conclusions:
>
>*) assigning hosts to ranges, groups or pools without using the
>"fixed-address" statement only works using classes.
>
>*) I can assign a host to a class using something like:
>- ---8<---
>class "mammals" {
>  match hardware;
>}
>
>group {
>  host gnu {
>    hardware ethernet 00:50:56:00:00:01;
>    subclass "mammals" 1:00:50:56:00:00:01;
>  }
>}
>
>pool {
>  allow members of "mammals";
>  ignore unknown-clients;
>  range 192.168.80.100 192.168.80.199;
>}
>- --->8---
>Which is ugly, because I need to include the MAC twice.
>
>*) there is a 'add "<classname>";' statement, which can be used within a
>host declaration, but I can't find its use documented anywhere.
>
>All I want is a way of assignung hosts to a certain address range,
>including some common parameters without having to manually assign IP
>addresses.
>
>A line like:
>host tux { hardware ethernet 00:50:56:00:00:02; add "birds"; }
>should be sufficient. Yes, I know, the example above is syntactically
>correct, nevertheless it doesn't work out like I expected.
>
>Any ideas? Is the "add" statement documented anywhere outside the source?
>
>Ah, and by the way, I'm using dhcpd 3.0.6 on Ubuntu Hardy and also tried
>with 3.0.4 on Debian Etch.
>
>  regards,
>
>  Goesta
>
>
>- --
>#!/usr/bin/perl
>foreach $c (split(/ /,"47 6f 65 73 74 61 20 53 6d 65 6b 61 6c 0d 0a")) {
>print pack("C", hex($c));}
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.9 (GNU/Linux)
>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>iEYEARECAAYFAkm+14kACgkQLAKF+YJZq5O6fQCeIC0dD26JjwjUBWhORoOfBbpc
>74kAnjl23CT7xjcQ3IOJZvTW6MsnzpH0
>=kqVP
>-----END PGP SIGNATURE-----




More information about the dhcp-users mailing list