<div dir="ltr">I have Cisco cable modems and will soon deploy another vendor's modem that needs a different set of options, but both use the same vendor-class-identifier "docsis3.0:", so I want to match on the "vendor-name" which is suboption 10 in option 43 vendor-encapsulated-options.  To start, I am trying to get DHCP to log the value, but I am failing somewhere.<br><br>Wireshark shows that the REQUEST packet includes:<br><br>    Option: (43) Vendor-Specific Information (CableLabs)<br>        Length: 103<br>...<br>        Option 43 Suboption: (10) Vendor Name<br>            Length: 5<br>            Vendor Name: Cisco<br><br>I have put this in dhcpd.conf:<br><br>log (info, concat( "extra logging vendorID=", pick-first-value( option vendor-class-identifier, "no-vendor-class-id" ) ) );<br>set vendor-string = option vendor-class-identifier;<br>option space docsis;<br>option docsis.vendor-name code 10 = text;<br>class "docsis" {<br>match if option vendor-class-identifier = "docsis3.0:";<br>vendor-option-space docsis;<br>log (info, concat( "extra logging vendor-name=", pick-first-value( option docsis.vendor-name, "no-vendor-name" ) ) );<br>log (info, concat( "extra vendor-encapsulated-options ", pick-first-value( binary-to-ascii( 16, 8, ":", vendor-encapsulated-options ), "no-vend-opt" ) ) );<br>log (info, concat( "extra vivso ", pick-first-value( binary-to-ascii( 16, 8, ":", vivso), "no-vivso" ) ) );<br>}<br>class "cisco" {<br>match if ( ( substring(hardware,1,3) = 08:80:39 ) or<br>( substring(hardware,1,3) = 10:5f:49 ) or<br>( substring(hardware,1,3) = 34:bd:fa ) or<br>( substring(hardware,1,3) = 54:d4:6f ) or<br>( substring(hardware,1,3) = 68:ee:96 ) or<br>( substring(hardware,1,3) = e4:48:c7) );<br>log (info, "extra class cisco" );<br>}<br><br>But I get this in the log file:<br><br>Feb 26 14:13:08 adonis12 dhcpd: extra class cisco<br>Feb 26 14:13:08 adonis12 dhcpd: extra logging vendor-name=no-vendor-name<br>Feb 26 14:13:08 adonis12 dhcpd: extra vendor-encapsulated-options no-vend-opt<br>Feb 26 14:13:08 adonis12 dhcpd: extra vivso no-vivso<br>Feb 26 14:13:08 adonis12 dhcpd: DHCPREQUEST for 10.213.139.100 from 54:d4:6f:d0:28:2e via 10.213.139.97<br>Feb 26 14:13:08 adonis12 dhcpd: DHCPACK on 10.213.139.100 to 54:d4:6f:d0:28:2e via 10.213.139.97<br><br>Is there something wrong in my log syntax?<br>Is there any way to turn up DHCP debugging to the point where it tells me all the fields that it reads from each packet?<br>Has anyone else matched or logged a suboption of option 43?<br><br>I would be glad to post more of the gory details, just let me know what you want to see.  I was hoping to avoid a really long email.<br><br><div><div class="gmail_signature">-- <br>Bob Harold<br></div><div class="gmail_signature">University of Michigan<br><br></div></div>
</div>