Adopting Remote UniFi Devices with Windows Server DHCP – itramblings (2024)

This article is a repost from here

UniFi Access Points (APs) and other devices are fantastic, but can be difficult to adopt from a UniFi Controller if they never show up. Many different DHCP servers can be configured to tell the devices where the Controller is. You can learn to configure several DHCP serversherebut, to my knowledge, no one has yet written a tutorial on how to do this with Windows DHCP Server. This article aims to teach you just how to do that.

Cisco’s document on setting up DHCP option 43 for their branded devices was invaluable to my understanding. Similarly, Ubiquiti’s own document on the adoption of remote devices by a UniFi Controller provided the rest of the information I needed. Armed with these two articles I set about experimenting, and ended up successfully adopting devices on a separate network from the controller.

This article assumes these to be true:

  • You have a working network with two separate subnets
  • A Windows Server handles all DHCP requests for the networks
  • You are not using the router’s built in DHCP server
  • There is a UniFi AP (or other UniFi device) on a separate subnet from the UniFi Controller

If you have not met these prerequisites, this will not likely work for you. Setting up these requirements is beyond the scope of this article, butYouTubehas a ton of videos on how to set these devices up in any fashion you wish.

Understanding Things

Let’s get into the nitty and the gritty. The first thing to understand is some terminology. There is a fancy text string called a Vendor Class Identifier (VCI), which some network devices transmit as part of their DHCP request, in option 60. When the DHCP server receives a request that contains an option 60, it reads the VCI and checks against its defined Vendor Classes to see if that VCI exists in its database.

Assuming the Vendor Class exists, the DHCP server will add all vendor specific scope options for the specified VCI to the generic options it’s already sending. These vendor specific suboptions will be combined into a single Option 43 when sent to the requestor.

Three common options a DHCP server generally sends along with an IP address are:

OptionNameVendor
003RouterStandard
006DNS ServerStandard
015DNS Domain NameStandard

When it detects a VCI for which it has a defined class, the DHCP server will also add any scope-assigned options from that class. For instance, when an option 60 VCI ofubntwas sent with a DHCP request, a Ubiquiti class might also send:

OptionNameVendor
001UniFi ControllerUbiquiti

This additional option would bring the entire set of options to this:

OptionNameVendor
003RouterStandard
006DNS ServerStandard
015DNS Domain NameStandard
001UniFi ControllerUbiquiti

All these options, in addtion to an IP address, would be sent to the device that originally include an option 60 value ofubntin its DHCP request. In fact, this is exactly what we’re going to make the Windows DHCP server do.

Windows DHCP Server Configuration

Open up the DHCP control panel. In Windows Server 2012 and higher, do this from Server Manager by clicking Tools, then DHCP.

Adopting Remote UniFi Devices with Windows Server DHCP – itramblings (1)

Right click on the IPV4 node just below your server name, and chooseDefine Vendor Classes. You will be presented with this fancy screen.

Adopting Remote UniFi Devices with Windows Server DHCP – itramblings (2)

Add a new vendor class by clicking the Add button. In theNew Classwindow, enter a Display Name (I suggestUbiquiti) and an optionally enter a description. In the ASCII portion of the lowest box type the lettersubnt. Make sure there’s nothing else, to include white space, in that box. The whole line should read0000 75 62 6E 74 ubntas in the screenshot. Click OK, then Close to close both windows.

Adopting Remote UniFi Devices with Windows Server DHCP – itramblings (3)

Right click the IPV4 node again and chooseSet Predefined Optionsfrom the context menu. In thePredefined Options and Valueswindow, choose your new Ubiquiti class from the top dropdown, and click theAddbutton to create a new option.

Adopting Remote UniFi Devices with Windows Server DHCP – itramblings (4)

In theOption Typewindow, enterUniFi Controller, or some similar name, into theNamebox, chooseBinaryin theData typedropdown, and enter1in theCodebox. I chose to write “IP as HEX in the BINARY section: 0a 0a 0a 02” in theDescriptionbox to remind myself how to enter the controller’s IP address later. Click OK, then OK again to accept and close both windows.

Adopting Remote UniFi Devices with Windows Server DHCP – itramblings (5)

We have now defined both the Ubiquiti vendor class and a predefined option in that class that we can use to point our devices at our UniFi Controller, no matter what subnet they’re on.

For each subnet that contains UniFi devices, we must now add our newly created option to the Scope Options. Begin by right clicking the Scope Options node under one of your Scopes, and choosingConfigure Options. Click the Advanced tab and choose Ubiquiti under Vendor Class dropdown.

There’s only one option, so that’s obviously the one we want. Make sure it’s checked, and then erase the default value in the Binary section.

Adopting Remote UniFi Devices with Windows Server DHCP – itramblings (6)

We now need to do a little math. The IP address of your UniFi Controller must be converted from decimal to hexadecimal. Windows 8.1 and later (at least) makes this extraordinarily easy with the built in calculator.

Open the windows calculator and go to Programmer mode. Ensure DEC mode is selected and type in the first octet of your UniFi Controller’s IP, then see the HEX value displayed. Windows displays the value as a single digit when possible, but when entering it in hexadecimal, it must be 2 digits. Prepend a0to any single-digit hex values you get. For example,10converts toA, so you would prepend a 0 and get0Afor your hexadecimal octet.

Adopting Remote UniFi Devices with Windows Server DHCP – itramblings (7)

Repeat this for each octet in your IP address, writing down each hex value.Note: If you are using the older version of calculator (before the Windows Universal Apps version), you may need to click the HEX radio button to see it converted.

Once you have all the hexadecimal octets, you need to enter them into the Binary section of the Data Entry box. Just type the numbers in the order of the octets. An IP of10.10.10.2, for instance, would be entered as0A 0A 0A 02. Click OK to close the Scope Options window.

Adopting Remote UniFi Devices with Windows Server DHCP – itramblings (8)

Reboot your APs and watch them magically appear in your UniFi Controller.

Getting your UniFi devices working with a controller on another network can be a bit of a challenge. All the tools needed already exist in one form or another, however, and with just a little research and guidance it shouldn’t be too difficult to get yours set up. The bonus to using this method, from what I understand, is that the Ubiquiti Option 43 we created in this tutorial will not be offered unless it’s requested via option 60.

This is a APA formatted list of references I used to get my own server up and running properly, and to write this article.

Cisco. (2018, February 08). DHCP OPTION 43 for Lightweight Cisco Aironet Access Points Configuration Example. Retrieved March 10, 2018, fromhttps://www.cisco.com/c/en/us/support/docs/wireless-mobility/wireless-lan-wlan/97066-dhcp-option-43-00.html

Ubiquiti. (2018, February 23). UniFi – Device Adoption Methods for Remote UniFi Controllers. Retrieved March 09, 2018, fromhttps://help.ubnt.com/hc/en-us/articles/204909754-UniFi-Device-Adoption-Methods-for-Remote-UniFi-Controllers

Adopting Remote UniFi Devices with Windows Server DHCP – itramblings (2024)

FAQs

Which DHCP option __ is a layer 3 adoption technique with UniFi? ›

DHCP Option 43

This option leverages your DHCP server to inform your UniFi device of the location of the machine running the Network Application remotely.

How do I adopt a UniFi AP from another network? ›

How to Adopt a Device
  1. If you have not yet done so, set up UniFi. ...
  2. Connect the UniFi device to a PoE power source on the same network as the UniFi Console.
  3. Sign in to the UniFi Site Manager in a web browser, or use the UniFi Mobile App (iOS / Android) to adopt the device.

What is the DHCP option set inform for UniFi? ›

DHCP option for UniFi set inform

DHCP Option 43: Used to specify the UniFi Controller's inform URL for UniFi devices. The value for this option is typically in the format of an IP address, such as http://192.168.1.10:8080/inform . DHCP Option 60: This option can be used to specify a vendor class identifier.

Does UniFi have DHCP? ›

The DHCP Server on UniFi Gateways dynamically assigns IP addresses to devices and provides other information such as the location of the default gateway and DNS server.

What is the DHCP option code 3? ›

DHCP option 3: default router or last resort gateway for this interface. DHCP option 6: which DNS (Domain Name Server) to include in the IP configuration for name resolution. DHCP option 51: lease time for this IP address.

Is DHCP a layer 2 or 3 protocol? ›

DHCP (Dynamic Host Configuration Protocol) is responsible for setting up configurations when a computer first joins a local network. These settings enable communication over LANs and the Internet, so it is sometimes considered a layer 2-3 protocol.

How do I access UniFi AP remotely? ›

How to Connect Remotely (UniFi Site Manager) Enable Remote Management from your UniFi OS settings. This is enabled by default when you set up a UniFi Console using your UI Account. Legacy CloudKeys and self-hosted Network Servers can find this in Settings > System > Administration.

How to activate DHCP server? ›

To authorize the DHCP server using Active Directory:
  1. From the Windows desktop, open the Start menu, select Windows Administrative Tools > DHCP.
  2. Expand your DHCP server name, right-click, then select Authorize.
  3. Authorization can take a few seconds to resolve.
Aug 16, 2023

Which settings can be assigned by a DHCP server? ›

As I mentioned, the DHCP server can also transfer other information to the clients, such as subnet mask, name server, domain name, and gateway – even details for network booting (PXE boot, Preboot eXecution Environment), NTP (Network Time Protocol), or proxy configuration via WPAD (Web Proxy Auto-Discovery Protocol).

How to configure DHCP address? ›

To enable DHCP or change other TCP/IP settings
  1. Select Start , then select Settings > Network & Internet .
  2. Do one of the following: For a Wi-Fi network, select Wi-Fi > Manage known networks. ...
  3. Under IP assignment, select Edit.
  4. Under Edit IP settings, select Automatic (DHCP) or Manual. ...
  5. When you're done, select Save.

What is the default IP for UniFi devices? ›

3. The UniFi Controller will discover the UniFi Security Gateway with the default IP Address,192.168. 1.1. Select the device, and click Next.

Does UniFi have built in firewall? ›

UniFi Gateways include a powerful Firewall engine to maximum security in your network architecture.

Does UniFi have a DNS server? ›

By default, UniFi will use the DNS Server provided by your Internet service provider. This is usually okay, but if you are unsure, we recommend using a public DNS Server such as 1.1. 1.1 or 8.8. 8.8.

What is DHCP option 43 UniFi? ›

The option unifi code 43=string is saying to the dhcp server I am defining a name, unifi, that represents code 43 and the value will be provided in string format. Entering the value on the wui page will automatically restart the dhcp server after the options have been added, if they are checked as enabled.

What is DHCP option 43 and 60? ›

The DHCP client sends option code 60 in a DHCPREQUEST to the DHCP server. When the server receives option 60, it sees the VCI, finds the matching VCI in its own table, and then it returns option 43 with the value (that corresponds to the VCI), thereby relaying vendor-specific information to the correct client.

What is DHCP option 61 used for? ›

Option 61—This option is used by DHCP clients to specify their unique identifier. DHCP servers use this value to index their database of address bindings. This value is expected to be unique for all clients in an administrative domain.

What is DHCP Option 82 ubiquiti? ›

Option 82 is called the relay agent information option and is inserted by the DHCP relay agent when forwarding client-originated DHCP packets to a DHCP server. Servers recognizing the relay agent information option may use the information to implement IP address or other parameter assignment policies.

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Greg O'Connell

Last Updated:

Views: 5799

Rating: 4.1 / 5 (62 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.