Address from wrong pool

Glenn Satchell glenn.satchell at uniq.com.au
Fri Feb 5 23:23:37 UTC 2010


Siegenthaler Tina wrote:
>>>>>
>>>>
>>>> There's no hard and fast rule about which pool a client can draw a 
>>>> lease from when there is more than one valid pool. You need to deny 
>>>> those two classes from the shared pool.
>>>>
>>>>
>>>
>>> Thanks. I was afraid it would be something like this. Pity, this 
>>> would have been nice and easy, now the config will be much mor 
>>> complicated to create from the database. But I'm sure I will get it 
>>> to work...
>>>
>>> Tina
>>>
>>
> 
> Sorry, it's me again...
> 
> This is strange. If I use something like this:
> 
> subnet 130.60.79.192 netmask 255.255.255.192 {
>         option routers 130.60.79.193;
>         option broadcast-address 130.60.79.255;
>         include "/include-dhcp-ieu/Y11Kpools-dhcp";
>         pool {
>                 failover peer "DHCP-IEU";
>                 deny dynamic bootp clients;
>                 allow known-clients;
>                 deny members of "IEU_0057_L1";       <-----------------
>                 range 130.60.79.200 130.60.79.220;
>         }
>         default-lease-time 21600;
>         max-lease-time 21600;
> }
> 
> 
> it works.
> 
> If I use instead:
> 
> subnet 130.60.79.192 netmask 255.255.255.192 {
>         option routers 130.60.79.193;
>         option broadcast-address 130.60.79.255;
>         include "/include-dhcp-ieu/Y11Kpools-dhcp";
>         pool {
>                 failover peer "DHCP-IEU";
>                 deny dynamic bootp clients;
>                 allow known-clients;
>                 include "/include-dhcp-ieu/Y11Kdeny-dhcp";     
> <----------------
>                 range 130.60.79.200 130.60.79.220;
>         }
>         default-lease-time 21600;
>         max-lease-time 21600;
> }
> 
> where "include-dhcp-ieu/Y11Kdeny-dhcp" contains "deny members of 
> "IEU_0057_L1";" dhcpd will exit with this error message:
> 
> /include-dhcp-ieu/Y11Kdeny-dhcp line 1: expecting allow/deny key
> deny members
>       ^
> /include-dhcp-ieu/Y11Kdeny-dhcp line 1: expecting a parameter or 
> declaration
> deny members of "IEU_0057_L1";
>                              ^
> /etc/dhcpd.master line 33: /include-dhcp-ieu/Y11Kdeny-dhcp: bad parse.
>         include "/include-dhcp-ieu/Y11Kdeny-dhcp"
>                          ^
> 
> ??
> 
> Tina

Include acts like it is in the global scope, so the deny doesn't really 
get put inside the pool.

You could create another class and make all your "fixed" hosts be a 
member of that,then deny it. For example:

class "IEU_0024_L1" { match hardware; }
class "IEU_0025_L1" { match hardware; }
class "all_fixed_hosts" { match hardware; }

subclass "IEU_0024_L1" 1:00:00:aa:9d:26:79;
subclass "IEU_0025_L1" 1:00:10:83:41:ef:e4;
subclass "all_fixed_hosts" 1:00:00:aa:9d:26:79;
subclass "all_fixed_hosts" 1:00:10:83:41:ef:e4;

subnet 130.60.33.32 netmask 255.255.255.224 {
         option routers 130.60.33.33;
         option broadcast-address 130.60.33.63;
     pool { allow members of "IEU_0024_L1" ; range 130.60.33.36; }
     pool { allow members of "IEU_0025_L1" ; range 130.60.33.37; }
         pool {
                 failover peer "DHCP-IEU";
                 deny dynamic bootp clients;
                 allow known-clients;
		deny members of "all_fixed_hosts";
                 range 130.60.33.40 130.60.33.50;
         }
         default-lease-time 21600;
         max-lease-time 21600;
}

Also where you have only a single host in a class you could use a more 
specific class and save on the subclass definition. Might make a 
difference if you have lots of these hosts.

class "IEU_0024_L1" { match if hardware = 00:00:aa:9d:26:79; }

-- 
regards,
-glenn
--
Glenn Satchell                            |  Miss 9: What do you
Uniq Advances Pty Ltd, Sydney Australia   |  do at work Dad?
mailto:glenn.satchell at uniq.com.au         |  Miss 6: He just
http://www.uniq.com.au tel:0409-458-580   |  types random stuff.



More information about the dhcp-users mailing list