subnet-specific class

Chuck Anderson cra at WPI.EDU
Wed Apr 11 22:24:26 UTC 2007

I would like to hand out different options to a class of devices, 
depending on what subnet they are in.  I have had this class working 
for all Nortel IP phones for several years now:

option space Nortel;
option Nortel.i2004-server-info code 128 = text;

class "Class-Nortel-i2004-A" {
        match if substring (option vendor-class-identifier,0,14) = "Nortel-i2004-A";
        vendor-option-space Nortel;
        option Nortel.i2004-server-info "Nortel-i2004-A,130.215.x.y:4100,1,10;130.215.x.y:4100,1,10.";

But now I have a second call server that I want to use for phones in a 
single specific subnet, with the first call server still used for 
everything else.  So basically I want to change the option for just a 
single subnet.

The new subnet will have nothing but IP phones in it, so I first tried 
just putting that option in subnet scope:

subnet 130.215.v.0 netmask {
        vendor-option-space Nortel;
        option Nortel.i2004-server-info "Nortel-i2004-A,130.215.v.w:4100,1,10;130.215.v.w:4100,1,10.";

But this doesn't work, since according to dhcpd.conf:

  When a client is to be booted, its boot parameters are determined by
  consulting that client's host declaration (if any), and then
  consulting any class declarations matching the client, followed by
  the pool, subnet and shared-network declarations for the IP
  address assigned to the client.  Each of these declarations itself
  appears within a lexical scope, and all declarations at less
  specific lexical scopes are also consulted for client option
  declarations.  Scopes are never considered twice, and if parameters
  are declared in more than one scope, the parameter declared in the
  most specific scope is the one that is used.

so class options override subnet options.

Does anyone have any suggestions?  Can I match on the subnet in a 


More information about the dhcp-users mailing list