DHCP option 43 generator

Build DHCP option 43 for Cisco, Aruba and Ubiquiti access points, in hex and as a ready line for Cisco IOS, ISC dhcpd, Kea, dnsmasq, Windows DHCP and

loading DHCP option 43 generator
About this tool

What is DHCP option 43 and why generate it?

A wireless access point that boots on a network needs to find its controller. Many vendors solve this with DHCP option 43, "vendor-specific information". The DHCP server sends the controller address inside this option, in a format that only the vendor's access points understand. Get a byte wrong and the access point never joins: it just sits there with no error to read.

The format is not the same for each vendor. Cisco lightweight access points read a type byte f1, a length of 4 bytes per controller, and the controller addresses. Ubiquiti UniFi reads sub-option 01, length 04 and one address. Aruba access points in controller mode read the address as plain text, together with option 60 ArubaAP. Each DHCP server then has its own syntax for a raw option: option 43 hex ... on Cisco IOS, option vendor-encapsulated-options on ISC dhcpd, a JSON block on Kea, and so on.

This tool does the conversion. Pick the vendor, write the controller address or addresses, pick your DHCP server, and it writes the hex value and a ready configuration line. It can also decode a value you captured, to check what a server really sends. The work is done in your browser and nothing is uploaded. To verify the option on the wire, capture the exchange with the tcpdump filter builder, and use the hex and text converter when you need to inspect the bytes.

How to build DHCP option 43

  1. Choose the Access point vendor: Cisco (lightweight APs), Ubiquiti UniFi or Aruba (controller).
  2. Write the controller address. For Cisco, write one or more WLC management addresses separated by commas; the APs try them in order. For UniFi and Aruba, write exactly one.
  3. Choose the DHCP server: Cisco IOS, ISC dhcpd, Kea, dnsmasq, Windows Server (netsh) or MikroTik RouterOS.
  4. Read the result: the value in hex, the value in hex with colons, and the server configuration. The tool also shows the option 60 the APs send, which you can match on if your server gives option 43 only to those clients.
  5. Copy the configuration into your server. On Windows, replace <scope-address> with your scope.
  6. To check a value, open Read a value, paste the hex (with or without colons, spaces or a leading 0x) and read the vendor and addresses.

The option 60 values shown are Cisco AP c<model>, ubnt and ArubaAP. Aruba Instant access points are set up with other options, so this tool is for the controller mode. Always confirm with a packet capture on one access point before rolling out to the rest.

Examples

Cisco with one controller on ISC dhcpd

For the controller 192.168.10.5, the hex value is f104c0a80a05: type f1, length 04, then the four bytes of the address.

option vendor-encapsulated-options f1:04:c0:a8:0a:05;

On Cisco IOS the same value is written:

! Cisco IOS DHCP pool
option 43 hex f104c0a80a05

Cisco with two controllers

Controllers 192.168.10.5 and 192.168.10.20 give f108c0a80a05c0a80a14. The length byte is now 08, 4 bytes for each controller. With colons:

f1:08:c0:a8:0a:05:c0:a8:0a:14

Cisco accepts up to 63 controllers, and the tool reports an error beyond that, because the length must fit in one byte.

UniFi on Kea

For the controller 192.0.2.1, the value is 01:04:c0:00:02:01. Kea takes it as a JSON option definition:

{
  "name": "vendor-encapsulated-options",
  "code": 43,
  "space": "dhcp4",
  "csv-format": false,
  "data": "0104c0000201"
}

Other servers

The same Cisco controller 192.168.10.5 in each remaining syntax:

dhcp-option=43,f1:04:c0:a8:0a:05
netsh dhcp server scope <scope-address> set optionvalue 43 BYTE f1 04 c0 a8 0a 05
/ip dhcp-server option add code=43 name=option43 value=0xf104c0a80a05
/ip dhcp-server network set [find] dhcp-option=option43

The first is dnsmasq, the second Windows Server and the last two MikroTik.

Aruba as text

For the controller 10.1.1.1 the value is the text itself. ISC dhcpd gets option vendor-encapsulated-options "10.1.1.1";, and Cisco IOS gets option 43 ascii "10.1.1.1".

Reading a value back

Pasting f1:08:c0:a8:0a:05:c0:a8:0a:14 shows a Cisco value with the addresses 192.168.10.5 and 192.168.10.20. Pasting 01 04 c0 00 02 01 shows UniFi with 192.0.2.1.

Common errors and how to fix them

  • N is not an IPv4 address: the controller must be written as IPv4 dotted decimal, such as 192.168.10.5. A name or an IPv6 address is not accepted.
  • Cisco takes up to 63 controllers, the others exactly one: remove the extra addresses for UniFi and Aruba, or split a very long Cisco list.
  • The same address appears twice: remove the repeated controller.
  • This is not a Cisco (f1) or UniFi (01 04) value: the decoder only knows those two formats. An Aruba value is text, so decode it as ASCII instead.
  • Write the value as hex digits: use only 0-9 and a-f, with or without colons or spaces, and an even number of digits.
  • The AP does not join even with the right value: check that the option reaches the AP (capture the offer), that the address is reachable from the AP's VLAN, and that your server hands option 43 to the right scope.

Frequently asked questions

Which options must I set besides 43?

Only option 43 carries the controller. Option 60 is what the AP sends; use it to give option 43 only to those clients, as in a class match on ISC dhcpd.

Why is the Cisco length 04 for one controller?

The length counts bytes, and an IPv4 address is 4 bytes. With three controllers the length is 0c, which is 12.

Does this work for Aruba Instant?

No. Aruba Instant access points use other options. This tool covers the controller mode, where the address is plain text.

Is it safe to paste my controller address here?

Nothing is uploaded. The conversion runs in your browser.

Report a problem