Use DHCP option 43 on Windows Server to tell UniFi devices how to find the controller
-
For whatever reason, you are stuck using a Windows Server based domain controller with the typical DHCP/DNS/AD roles.
Now you get a bunch of shiny new UniFi devices from Ubiquiti and you think it would be just awesome if they would find the UniFi controller by themselves.
Well this is simple to do. You jsut need to setup DHCP option 43 to point to the IP address of your controller.
Pop open the DHCP configuration and expand the tree until you see Scope Options
RIght click on it and choose Configure Options
Scroll down the list to option 043 Vendor Specific Info
In the Binary section, you will have to enter the IP address of your UniFi controller IN HEX.
So pop over to your favorite IP to HEX converter. I like this one: https://www.browserling.com/tools/ip-to-hex
Pop in your IP address and click convert
Like magic.
Prepend a 0104 in front of the result,
0104cff4df0d
in my example here. Then enter the hex into the Binary field and click ok.
There you go. Now reboot your UniFi device and it will find tis way to your controller.
-
Was it not working at all without doing this?
We've been installing loads of Ubiquiti in our schools and never had to do this. Great to know though, thanks.
-
@jackcpickup said in Use DHCP option 43 on Windows Server to tell UniFi devices how to find the controller:
Was it not working at all without doing this?
We've been installing loads of Ubiquiti in our schools and never had to do this. Great to know though, thanks.
This just makes it magic. No need for the app or anything else to make it show up in the controller.
If your controller is on the same subnet, you don’t need this.
-
Excellent, thanks for this. I had recently heard about this option 43 but didn't really know what it was about. I'll try this... now, actually! Need to set up a spare AC mesh anyway.
-
Does this work regardless of your routers and switches or does it only work if using an EdgeMax your UniFi server is connected to?
I'm asking because of this bit:
-
@tim_g said in Use DHCP option 43 on Windows Server to tell UniFi devices how to find the controller:
Does this work regardless of your routers and switches or does it only work if using an EdgeMax your UniFi server is connected to?
I'm asking because of this bit:
You can use it on any router that supports that DHCP option. I have it on a Sonicwall so far.
-
@tim_g said in Use DHCP option 43 on Windows Server to tell UniFi devices how to find the controller:
Does this work regardless of your routers and switches or does it only work if using an EdgeMax your UniFi server is connected to?
I'm asking because of this bit:
This has nothing to do with your router. It is about the DHCP server.
If you have an EdgeRouter and you are using it as the DHCP server, then there is aspot for UniFi Controller that does Option 43 there.
Still option 43, just how you
-
@dbeato said in Use DHCP option 43 on Windows Server to tell UniFi devices how to find the controller:
@tim_g said in Use DHCP option 43 on Windows Server to tell UniFi devices how to find the controller:
Does this work regardless of your routers and switches or does it only work if using an EdgeMax your UniFi server is connected to?
I'm asking because of this bit:
You can use it on any router that supports that DHCP option. I have it on a Sonicwall so far.
I use DHCP from Windows Server, so that's where I'd set option 43. The way I read that is it won't work unless you have an EdgeMax router in the mix.
-
I see, so just setting option 43 on whatever DHCP server you use is all you need. Nothing hardware specific is required on the network.
-
@tim_g said in Use DHCP option 43 on Windows Server to tell UniFi devices how to find the controller:
I see, so just setting option 43 on whatever DHCP server you use is all you need. Nothing hardware specific is required on the network.
Correct