subclass or class not working in dhcp
Peter Rathlev
peter at rathlev.dk
Thu Jun 14 05:50:42 UTC 2012
On Wed, 2012-06-13 at 21:09 -0700, ARUN CHAKRAPANI RAO wrote:
> I am trying to configure dhcp using class and subclasses, some how it
> does not work.
...
> Please do let me know where i am going wrong.
Among other things: indentation. :-)
> class "goldcstrmrs" {
> option tftp-server-name "172.16.192.1";
> option extensions-path "slave512mbps.conf";
> match substring (hardware, 1, 6);
> }
You never match anything with this class. You either need a "subclass"
to match you "substring(hardware, 1, 6)" or a specific mathch, e.g.
"match if substring(hardrware, 1, 6) = 1:2:3:4:5:6;".
>
> class "homenet" {
> match pick-first-value (option dhcp-client-identifier, hardware);
> }
> subclass "homenet" 1:00:90:50:d0:9b:75;
>
> subnet 10.10.1.0 netmask 255.255.255.0 {
> option routers 10.10.1.1;
> pool {
> range 10.10.1.151 10.10.1.169;
> allow members of "homenet";
> deny unknown-clients;
Please don't mix allow and deny. It has been revisited many times
recently on this list.
> option tftp-server-name "172.16.192.1";
> option extensions-path "slave512mbps.conf";
> }
> group AUTHTEST {
> option tftp-server-name "172.16.192.1";
> option extensions-path "TESTINMSTRMDM.conf";
> option ifcp-code 0;
> option routers 10.10.1.1;
> host authm1 {
> hardware ethernet 00:90:50:03:60:20;
> fixed-address 10.10.1.5;
> }
Please don't place host statements in anything but global scope.
> }
> }
Fix these errors first, then see what it says. I assume the obvious
culprit -- that all leased are just used -- has already been considered.
--
Peter
More information about the dhcp-users
mailing list