Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In the dhcpd.conf file for isc-dhcpd-V3.1.1, I have set up a vendor options space and defined several different options. I am able to use those definitions to send options from the server to the client in the vendor-encapsulated-options option (code 43).

However, the client is also sending vendor options back to the server, in the same way, and I'd like to respond differently depending on the type and contents of the options. As far as I can tell, the the server isn't parsing the client's vendor-encapsulated-options at all - the option operator is just returning null.

Is there a way to get the server to populate the options in the vendor space I've defined?

share|improve this question

1 Answer 1

If you can guarantee that the client sends the same options in the same order every time, you can use substring and option vendor-encapsulated-options to parse the options manually:

if 01:01:01 = substring( option vendor-encapsulated-options, 0, 3 ) { ... }
if 02:02:ab:cd = substring( option vendor-encapsulated-options, 3, 4 ) { ... }

If those two guarantees don't hold true, however, the only remaining option is regex-based matching, but beware the possibility of an option (code-length-contents) being full contained in the contents of another option.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.