DHCP Vendor/Option 43 configuration

NethServer Version: 7.9.2009
Module: DHCP

Hey all, I guess the short is; is Nethserver DHCP still based on dnsmasq? I need to configure the DHCP Server to look for a vendor, then hand out the correct DHCP scope and settings using DHCP option 43. Right now, we’ve got a Synology DHCP server, and it handily does this for our VoIP phones. I looks like you have to configure this directly via the CLI, but before I go digging into how to configure dnsmasq, I should make sure that’s what it is still using.

Also… why are DHCP options not a thing in the webUI/cockpit? I mean, this is not an uncommon thing; and to some degree, it is in use for PXE, etc.

You probably will need to create a custom template to override/add settings.
In this example you can find an example of the option 43 (vendor clss) use: https://oss.segetech.com/intra/srv/dnsmasq.conf

Thanks. I looked into this, and after reading the templates section of the Neth documents, could you verify that I’m reading how to do this correctly? (Never had to set up one of these templates before.)

  • The relevant section of the /etc/dnsmasq.conf file is the 30DHCP section.
  • Create new file in /etc/e-smith/templates-custom/etc/dnsmasq.conf
  • Since I’m still using the main template for the built in options, create a section with a higher number (like 35dhcp) and enter the options as needed, then let it integrate the two together?

Or for that last one, should I duplicate the whole section and things like enabling or disabling the DHCP servers in the webUI will still affect the custom template? Or, have I completely gotten this wrong?

@slightlyevolved

Hi Rob

Keep as much as you can of the “master”, do as much configuration as you need.
The reason: In case of updates, you won’t be left with old configs - which may or may not run after a major upgrade. If you keep as much of the basis as possible, but only “add” in your configuration (using eg 35) this won’t happen…

This could get you into trouble with things you did not even modify:

My 2 cents
Andy

Cool. So making that new file with 35dhcp, then entering only the extra configurations I need, and doing the extend template command should get me good to go?

Also, one last question. Once I have this going, if I ever make a change to the custom template settings, I assume you have to redo the extend template command, or does it automatically reread both templates on service load?

Any changes to the (new) template needs the expand-template FILENAME comand repeated.

Always check the resulting file (usually /etc/whatever) that your template is integrated as you expect.

And keep your changes documented!
If it works, then several years later, one often forgets WHAT was done… :slight_smile:

My 2 cents
Andy