dhcp option 43

Hello

running latest v6, I want to adopt some new unifi switches to a remotely hosted controller, so need to add a custom DHCP Option Number 43

would i need to add this option into the new pihole.toml please?

or do i create a file in /etc/dnsmasq.d/ ?

thanks

FYI... https://tcpip.wtf/en/unifi-l3-adoption-with-dhcp-option-43-on-pfsense-mikrotik-and-others.htm

1 Like

If it is just one line, you can add that to misc.dnsmasq_lines under All settings » Miscellaneous, see also Custom dnsmasq configs not loading.

All settings is available in Expert mode only.

TIP!

If you have a nice unifi Local DNS Record pointing to your UniFi Controller then DHCP Option 43 usually isn't needed :slight_smile:

Also thanks for the link provided since I was also a bit curious how to do the whole DHCP Option 43 stuff when not using any UniFi Router at all after switching to OPNsense as my Router :+1:

Perfect!

Thanks

oh ok.... going to try this, crazy no one else has mentioned it anywhere on the web :slight_smile:

Option 43 are vendor specific options, they can have any value for any purpose that a given vendor sees fit.

When not using Unifi equipment, chances are you won't need those values anymore, unless your new equipment would similarly require it to correctly detect other same-vendor equipment in your network, in which case format and perhaps purpose would change.

Unifi seems to use the specific option discussed here to tell DHCP clients that request that option 43 which IP address they should use to connect to the Unifi controller. That would allow clients that have requested and processed option 43 (i.e. Unifi equipment) to identify a Unifi controller even if that would be on another link, provided DHCP servers for any link in the network are configured identically.

The same can be achieved without DHCP by creating a DNS record that points to the Unifi controller's IP, provided all network clients talk to the same local DNS server. Any Unifi equipment requiring to identify the network's Unifi controller would then just need to query the Unifi controller's name.

The docs you've linked do point out to use DNS. :wink:
Tthey just recommend to do both, as DNS alone didn't always work for them (probably because their network used public DNS servers beside their local one).

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.