I wanted to put a new UniFi AccessPoint from Ubiquiti into operation today. My existing AccessPoints are in the same subnet (and VLAN) as the UniFi Controller, so so far there have been no problems connecting the AccessPoints to the Controller. However, the new AccessPoint should now be in a different subnet and VLAN.
The DHCP option 43 can be used so that access points from other subnets automatically connect to the controller. Option 43 tells the access point under which IP address the UniFi Controller can be reached. This also works from other subnets / VLANs if the controller is reachable.
In my case, the DHCP server is the Sophos UTM and therefore the corresponding configuration of the Sophos UTM DHCP server follows here.
DHCP Option 43 for UniFi AccessPoints
The UniFI documentation shows the following:
The Sophos UTM also expects a hex value for option 43. The first two values are predefined (01 and 04), followed by the IP address of the UniFi Controller in hex format.
Here is a small tool that converts an IP address into hex format:
http://www.silisoftware.com/tools/ipconverter.php
After the IP address of the controller has been converted into hex format, the value for option 43 of the DHCP server of the Sophos UTM can be created from it:
- 01 (suboption)
- 04 (content length of payload)
- IP address of the controller in hex (in my case 192.168.100.252: 0xC0A864FC)
The UTM expects the values to be separated by colons, so in my case the following value must be entered:
- 01:04:C0:A8:64:FC (The leading characters (0x) of the IP address are omitted)
The configuration of the DHCP server in detail:
- Code: 43
- Name: unifi
- Hex: (see above)
- Area: Vendor ID
- Vendor ID: ubnt
After the configuration has been saved, it should look something like this:
After restarting the access point, it connected directly to the controller. WLAN in the garden at last :-)