Ubiquiti UniFi Controller Adoption Options

Ubiquiti UniFi Controller Adoption Options
Please share with your friends...
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

⇐ BackPageNext ⇒

DHCP

DHCP option 43 can be used to inform UniFi clients of the IP address of the UniFi Controller.

Adding option 43 to your DHCP server will tell UniFi devices the IP address of the UniFi Controller, therefore allowing them to contact the inform URL and perform the adoption process.

EdgeMax

If using a Ubiquiti EdgeMax Router, such as the EdgeRouter Pro, you can configure the IP address of the UniFi Controller (DHCP option 43) directly from the DHCP server Details tab in the web user interface.

Ubiquiti EdgeRouter PRO: DHCP Server UniFi Controller Option

Ubiquiti EdgeMax Router: DHCP UniFi Controller Option

Windows

If using Microsoft Windows Server-based DHCP, you can define a vendor-specific class to implement DHCP option 43 for the UniFi Controller IP address.

  1. Launch the DHCP manager tool in Windows. The DHCP window will be displayed.
    Windows Server: DHCP Manager

    Windows Server: DHCP Manager

  2. Right-click on the IPv4 tree-node. The context menu will be displayed.
    Windows Server: Define Vendor Classes

    Windows Server: Define Vendor Classes

  3. From the context menu, select Define Vendor Classes. The DHCP Vendor Classes window will be displayed.
    Windows Server: DHCP Vendor Classes

    Windows Server: DHCP Vendor Classes

  4. Click Add. The New Class window will be displayed.
    Windows Server: New Class

    Windows Server: New Class

  5. Type the following information into the appropriate fields.
    Display name Ubiquiti
    Description Ubiquiti vendor-specific options
    ID Binary ASCII
    0000 75 62 6E 74 ubnt
  6. Click OK. The New Class window will close, and a new class entry will appear in the Available classes list on the DHCP Vendor Classes window.
    Windows Server: DHCP Vendor Classes

    Windows Server: DHCP Vendor Classes

  7. Click Close. The DHCP Vendor Classes window will close.
  8. Right-click on the IPv4 tree-node. The context menu will be displayed.
    Windows Server: Set Predefined Options

    Windows Server: Set Predefined Options

  9. From the context menu, select Set Predefined Options. The Predefined Options and Values window will be displayed.
    Windows Server: Predefined Options and Values

    Windows Server: Predefined Options and Values

  10. From the Option class drop down list, select Ubiquiti.
    Windows Server: Predefined Options and Values - Ubiquiti

    Windows Server: Predefined Options and Values – Ubiquiti

  11. Click Add. The Option Type window will be displayed.
    Windows Server: Option Type

    Windows Server: Option Type

  12. Type the following information into the appropriate fields.
    Name UniFi Controller
    Data type IP Address
    Code 43
    Description IP Address of UniFi Controller
  13. Click OK. The Option Type window will close, and the details will appear on the Predefined Options and Values window.
    Windows Server: Predefined Options and Values

    Windows Server: Predefined Options and Values

  14. Click Close. The Predefined Options and Values window will close.
  15. Expand IPv4 and right-click on the Server Options tree-node. The context menu will be displayed.
    Windows Server: Configure Options

    Windows Server: Configure Options

  16. From the context menu, select Configure Options. The Server Options window will be displayed.
    Windows Server: Server Options

    Windows Server: Server Options

  17. Select the Advanced tab, then from the Vendor class drop down list, select Ubiquiti.
    Windows Server: Server Options - 043 UniFi Controller

    Windows Server: 043 UniFi Controller

  18. Tick 043 UniFi Controller from the Available Options list, and then type the IP address of your UniFi Controller.
  19. Click OK. The Server Options window will close.
  20. Expanding and viewing the IPv4 Scope Options will show the configured UniFi Controller option.
Windows Server: Scope Options

Windows Server: Scope Options

Linux
# ...
option space ubnt;
option ubnt.unifi-address code 1 = ip-address;

class "ubnt" {
        match if substring (option vendor-class-identifier, 0, 4) = "ubnt";
        option vendor-class-identifier "ubnt";
        vendor-option-space ubnt;
}

subnet 10.10.10.0 netmask 255.255.255.0 {
        range 10.10.10.100 10.10.10.160;
        option ubnt.unifi-address 201.10.7.31;  ### UniFi Controller IP ###
        option routers 10.10.10.2;
        option broadcast-address 10.10.10.255;
        option domain-name-servers 168.95.1.1, 8.8.8.8;
        # ...
}
Cisco
# assuming your UniFi is at 192.168.3.10
ip dhcp pool 
network  
default-router 
dns-server 
option 43 hex 0104C0A8030A # 192.168.3.10 -> CO A8 03 0A

# Why 0104C0A8030A ?
#
# 01: suboption
# 04: length of the payload (must be 4)
# C0A8030A: 192.168.3.10
Mikrotik
/ip dhcp-server option add code=43 name=unifi value=0x0104C0A8030A
/ip dhcp-server network set 0 dhcp-option=unifi

# Why 0104C0A8030A ?
#
# 01: suboption
# 04: length of the payload (must be 4)
# C0A8030A: 192.168.3.10
⇐ BackPageNext ⇒

Please share with your friends...
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Leave a Reply