Class detection problem

Simon Hobson dhcp1 at thehobsons.co.uk
Thu Dec 4 16:03:10 UTC 2008


Bernardo Pita wrote:

>subnet 10.197.0.83 netmask 255.255.255.255 { ignore booting; }
>
>class "test" {
>     match pick-first-value (option dhcp-client-identifier, hardware);
>}
>
>subclass "test" 1:00:16:92:3d:d2:08;
>subclass "test" 1:00:1b:d7:02:44:17;
>
>shared-network share {
>
>     subnet 10.198.0.0 netmask 255.255.252.0 {
>             option routers 10.198.0.1;
>             pool {
>                     range 10.198.0.5 10.198.3.254;
>                     allow members of "test";
>                     deny unknown clients;
>             }
>
>     }
>
>}
>
>You can see two macs address in the class "test" and one pool in 
>10.198.0.0 to them, but the DHCP says:
>
>dhcpd: DHCPDISCOVER from 00:1b:d7:02:44:17 via 10.198.0.1: network 
>share: no free leases
>dhcpd: DHCPDISCOVER from 00:16:92:3d:d2:08 via 10.198.0.1: network 
>share: no free leases

You've explicitly denied them from that pool : "deny unknown 
clients;" You don't need to do this as anything NOT matching class 
"test" will be implicitly denied.


>If I put manually something like this in the pool statement:
>
>pool {
>     host test1 { hardware ethernet 00:16:92:3d:d2:08; }
>     host test2 { hardware ethernet 00:1b:d7:02:44:17; }
>     range 10.198.0.5 10.198.3.255;
>     deny unknown clients;
>}

Please DO NOT put host statements anywhere but the global scope. They 
are (mostly) global in scope but inherit options from where they are 
declared. By defining them anywhere but the global scope leaves you 
open to some very strange behaviour due to unexpected option 
inheritance.

Also, the config you've posted does not include a shared-network. I'd 
strongly recommend that unless you really need it, you don't declare 
it - people get terribly confused by the shared-network declaration.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the dhcp-users mailing list