multiple "match-values" in a subclass

Simon Hobson dhcp1 at thehobsons.co.uk
Thu Aug 9 07:25:00 UTC 2012


Please don't top post ...

Vijayakumar T. T. wrote:

>Am attaching dhcp configuration below kindly suggest the changes.

You like hard work don't you ! Have you never heard of formatting ? 
Let me format that so it's readable.

ignore client-updates;
update-static-leases on;
log-facility local6;
authoritative;
ddns-updates on;
ddns-update-style interim;

subnet 192.168.3.0 netmask 255.255.255.0 { #;
   option routers 192.168.3.100;
   default-lease-time 1800;
   max-lease-time 2700;
}

key "rndc-key"{#;
algorithm hmac-md5;
secret "ZMuBAUkZcqucayG2u6IoRg==";}
class "extern" { match hardware; }
subclass "extern" 1:00:1e:ec:63:44:11;
option wpad code 252=text;
option subnet-mask 255.255.255.0;
option domain-name "pune.cdac.in";
option domain-name-servers 192.168.16.140;
option time-offset -18000;
option ntp-servers 192.168.16.134;

subnet 192.168.16.0 netmask 255.255.255.0 {
   range dynamic-bootp 192.168.16.102 192.168.16.110;
   pool {
     range 192.168.16.240 192.168.16.250;
     allow members of "extern";
   }
   default-lease-time 300;
   max-lease-time 360;
   ddns-updates on;

   zone 16.168.192.in-addr.arpa {#;
   primary 192.168.16.140;
   key "rndc-key";}
   zone npsf.pune.cdac.in {
     primary 192.168.16.140;
     key "rndc-key";
   }
   option routers 192.168.16.140;
   option subnet-mask 255.255.255.0;
   option domain-name "npsf.pune.cdac.in";
   option domain-name-servers 192.168.16.140;
   option time-offset -18000;
}

Right, now it's actually possible to see the structure - oh dear !

>1. When ever I connect using system having MAC address 
>"00:1e:ec:63:44:11", i get an IP from "dynamic-bootp 192.168.16.102 
>192.168.16.110". Since this MAC falls in class "extern" the system 
>should actualy get an IP from "range 192.168.16.240 192.168.16.250", 
>which is not happening.

Incorrect. You have told the DHCP server that this client may get an 
address from either the extern pool, or the dynamic-bootp range. If 
that isn't what you want, then you must change your config so that 
the client is explicitly excluded from the range(s) you don't want it 
to get an address from.
In this case, that would mean :
   pool {
     range dynamic-bootp 192.168.16.102 192.168.16.110;
     deny members of "extern";
   }


>  Kindly suggest the changes required to acheive it.
>
>2. If i delete "dynamic-bootp 192.168.16.102 192.168.16.110" 
>statement in dhcp configuration , the system is taking IP address 
>from "range 192.168.16.240 192.168.16.250" pool. Is that something 
>to do with order of configuration line ???

No, order is unimportant - the client may have any address you have 
told the server it must have. If you don't specify which clients may 
use an address, then all of them may.

>3. The DDNS updation for the said MAC address also enabled in dhcp 
>configuration.. Is it because of that the MAC address is not getting 
>IP from range "192.168.16.240 192.168.16.250"

Sorry, I don't understand the question.
But, you should also define your DDNS zones in the global scope. I'd 
also suggest not scattering global options in multiple places - a 
natural tendency would be to stop reading for global options once you 
see the first subnet 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