Vendor Encapsulated Options Bug??

Glenn Satchell glenn.satchell at uniq.com.au
Wed Dec 15 13:38:04 UTC 2010


On 12/15/10 06:56, Jiann-Ming Su wrote:
> Running dhcpd 3.0.5 which ships with CentOS/RH 5.  When I try to use Vendor
> Encapsulated Options, something doesn't seem to work quite right.
>
> In the following configs, we're trying to pass Option 43 to Aruba AP's.  The
> first config is what Aruba's docs suggests, and it works:
>
> option serverip code 43 = ip-address;           # Aruba Master IP
> class "vendor-classes" {
>          match option vendor-class-identifier;
> }
> subnet 192.168.246.0 netmask 255.255.255.0 {
> subclass "vendor-classes" "ArubaAP" {
>          option vendor-class-identifier "ArubaAP";
>                  option serverip 10.10.15.180;
> }
> }
>
> The Option 43 portion of the DHCPOFFER packet is as follows:
>
> 2b 04 0a 0a 0f b4
>
> Option: (t=43,l=4) Vendor-Specific Information
>    Option: (43) Vendor-Specific Information
>    Length: 4
>    Value: 0a0a0fb4

So that is a single option value, and it is not encapsulated.

> However, if I try to use the "option space" config, the result is a bit
> different:
>
> class "vendor-classes" {
>          match option vendor-class-identifier;
> }
> option space ArubaAP;
> option ArubaAP.serverip code 43 = ip-address;
> subnet 192.168.246.0 netmask 255.255.255.0 {
> subclass "vendor-classes" "ArubaAP" {
> option vendor-class-identifier "ArubaAP";
>          vendor-option-space ArubaAP;
>                option ArubaAP.serverip 170.140.15.180;
> }
> }
>
> The Option 43 portion of this DHCPOFFER packet is:
>
> 2b 06 2b 04 0a 0a 0f b4
>
> Option: (t=43,l=6) Vendor-Specific Information
>    Option: (43) Vendor-Specific Information
>    Length: 6
>    Value: 2b040a0a0fb4

The option space encapsulates the option inside another option. It is 
possible to encapsulate multiple "sub-options" inside option 43 using 
this method. If you look at the values you can see what is going on:

2b (43 decimal, option number)
06 (overall length of the option)
2b (43 sub-option number)
04 (length of the next suboption)
0a0a0fbf (ip address 10.10.15.180)

> Is this a bug in the "option space" config of vendor encapsulated options for
> 3.0.5?  Or, am I not configuring dhcpd correctly?  Thanks for any insights.

It's not a bug, option 43 can be used in two different ways, and you've 
tried both of them.

This is taken from the dhcp-options man page:

      option vendor-encapsulated-options string;

        The vendor-encapsulated-options option can contain  either
        a  single  vendor-specific  value  or  one or more vendor-
        specific suboptions.

-- 
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