Option created with expression not send

W.J.M. Nelis Wim.Nelis at nlr.nl
Thu Dec 23 13:23:28 UTC 2010


Hello,

for (Avaya) IP telephones, dhcpd passes the voice-vlan. If the option is 
build using the syntax
  option <Option> <Value> ;
it works like advertised. However, we need to move to multiple 
voice-vlans, thus an assignment using the syntax
  option <Option> = <Expression> ;
is used. The Option created in this way is not passed in the DHCPOFFER 
or DHCPACK.

In more detail, using the following configuration in dhcpd.conf

option AvayaIpPhoneOpt242 code 242 = text ;
class "vendor-classes" {
  match option vendor-class-identifier ;
}
subclass "vendor-classes" "ccp.avaya.com" {
  option AvayaIpPhoneOpt242= "L2Q=1,L2QVLAN=81,VLANTEST=0" ;
}

does send the parameters in the DHCPOFFER and DHCPACK. However, with the 
following configuration

option AvayaIpPhoneOpt242 code 242 = text ;
class "vendor-classes" {
  match option vendor-class-identifier ;
}
subclass "vendor-classes" "ccp.avaya.com" {
  set voice-vlan = <Expression> ;
  log( info, concat("DHCPDEBUGA voice-vlan=",voice-vlan) ) ;
  option AvayaIpPhoneOpt242 = concat( "L2Q=1,VLANTEST=0,L2QVLAN=", 
voice-vlan ) ;
  set temp = concat( "L2Q=1,VLANTEST=0,L2QVLAN=", voice-vlan ) ;
  log( info, concat("DHCPDEBUGB opt.242=",temp) ) ;
}

does not work. This happens both in dhcpd version 3.1.3 and in dhcpd 
version 4.2.0-P2. Using log-statements, it can be shown that variable 
voice-vlan is set to the appropriate value, as well as the variable 
temp. Using Wireshark, it can be shown that option 242 is not send to 
the client, thus the value of the option is probably NULL.

What do we need to do to send a computed voice-vlan to a DHCP client?

  Wim Nelis.



*******************************************************************************************************
The NLR disclaimer (http://www.nlr.nl/emaildisclaimer) is valid for NLR e-mail messages.
*******************************************************************************************************




More information about the dhcp-users mailing list