This is, as always, is maybe more of an aide-mémoire for me, but may be helpful if someone else is searching for a solution…
Here is the scenario: My UniFi devices are on a separate subnet from my UniFi Controller. The problem, if you will, with this configuration is that when a UniFi device looks for the UniFi Controller is that is cannot find the Controller on a different subnet.
There are a number of ways that this can be resolved (other than putting the Controller on the same subnet) as documented in UniFi – Device Adoption Methods for Remote UniFi Controllers. The option that I took, or maybe it is two options, is:
- I configured my DNS server with an alias that allows
unifi
to resolve to the UniFi Controller. That way when a device restarts (such as after a reboot, power loss) it can find the controller when it boots and executes theset-inform http://unifi:8080/inform
. The hostnameunifi
will resolve to my UniFi Controller. - In my DHCP configuration (on pfSense), I added DHCP Option 43. You have to add
01:04
to the hex version of the IP address of your UniFi Controller. Browserling has a page to convert the IP address to hex: Convert IP Address to Hex Format.
One important thing to remember: If you statically set the IP addresses of your UniFi devices you will not get the DHCP Option 43 provided to the devices.