Dnsmasq/dhcp config classification options

Looking at the detail here:


Does anyone have a working example of the classification options ? I have tried a number of things and they aren't reflected in the dnsmasq.conf file being generated - from which I take it that I got the syntax incorrect.

I am trying this kind of thing:

config vendorclass 'ubnt'
option classifier 'ubnt'
list dhcp_option 'vendor:ubnt,1,'

I'm also not sure how networkid fits in - there is a description that seems to imply that it ends up being used as a tag - but not clear how this would work on non static leases - and in any case attempting to add this to a static lease doesn't end up with any changes being reflected in the generated dnsmasq.conf file.


Well, that's because..one of your options should be specified in the WAN section of /etc/config/network, not DHCP.

   option vendorid 'foo'

It sends vendor ID to the ISP.

Also, your DHCP option appears to be wrong. DHCP option 1 specifies the subnet mask...that doesn't appear to be what you configured:

list dhcp_option '1,'

See: https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml

Hope this helps.

I'm do not think that's the only use of it, see here: https://lede-project.org/docs/user-guide/dhcp_configuration#classifying_clients_and_assigning_individual_options

vendorid is one of the possible values for classifier listed.

This isn't however what I'm trying to do - I want to send a vendor option (option 43) with a nested (vendor specific ID 1) inside it. The equivalent option in the dnsmasq.conf file itself would be:


which in fact works, and is a supported config, see this by the dnsmasq author:


As a followup, I was able to get the following to work with qualifications:

config vendorclass 'ubiquity'
    option vendorclass 'ubnt'
    option networkid 'vendor:ubnt'
    list dhcp_option '1,'

Which produces the following:


Which works - but only because dhcp-option is no longer qualified by the vendor class.

The goal is to produce this:


However this isn't possible because the init.d script just blindly adds the networkid to the dhcp_option, and there is no other config option that will achieve anything like this.

1 Like