Configuring Junos DHCP For Ubiqiti Devices
If you are running the UniFi Network application on a server that is on the same network segment with your Ubiqiti devices, all is good, but, if the devices are on a separate network segment (i.e. there is a router in between them) you need to tell the devices where the UniFi controller is on the network.
The easiest way to do this, is via the DHCP server. If you are running a DHCP server on a Juniper SRX or one of their many other products, this is how you do it.
Add an option 43 to the dhcp configuration as follows
set access address-assignment pool MYPOOL family inet dhcp-attributes option 43 hex-string 01040a5a010d
- MYPOOL is the name I chose for this address pool
- 01040a5a010d is an encoded string for the ip address of the UniFi controller
To create the string –
The ip address of my 10.90.1.13 – and we have to convert that to a hex string as follows
If you are not familiar with how to do this use this IP to Hex Converter
add “0104” to the start of the string and you get 01040a5a010d. If you want to know why you need 0104, see this documentation.
Now, reboot the devices on the remote network segments and they will find the UniFi controller.