Workflow Tools Control Yard

Home / Network

DHCP option 43, 119 and 121 encoder and decoder

Build the hex value of a DHCP option, or paste one to read it: option 121 and 249 classless static routes, option 119 domain search lists, and option 43 vendor sub-options such as the controller addresses of Cisco and UniFi access points. It works in your browser.

Option 121 and 249: classless static routes

Enter one route per line: the network with its prefix length, then the router, such as 10.0.0.0/8 192.168.1.1. A line may also read 10.0.0.0 255.0.0.0 192.168.1.1, and default stands for 0.0.0.0/0. Or paste the value of the option in hex to read its routes.

Each route is the prefix length in one byte, then only as many bytes of the network as the prefix covers, then the four bytes of the router. Option 249, Microsoft's classless static route option, has exactly the same format, so the same hex works for both.

Two rules catch people out. When a client uses option 121, it must ignore option 3, the router option: put the default route, 0.0.0.0/0, into option 121 as well. And Windows XP and Windows Server 2003 use only option 249 and ignore 121; later Windows clients ask for both.

The examples of RFC 3442:

NetworkMaskDestination descriptorHex
0.0.0.0/00.0.0.0000
10.0.0.0/8255.0.0.08.10080a
10.0.0.0/24255.255.255.024.10.0.0180a0000
10.17.0.0/16255.255.0.016.10.17100a11
10.27.129.0/24255.255.255.024.10.27.129180a1b81
10.229.0.128/25255.255.255.12825.10.229.0.128190ae50080
10.198.122.47/32255.255.255.25532.10.198.122.47200ac67a2f

Enter the domain suffixes a client should try, separated by spaces, commas or new lines. The page encodes them the way RFC 3397 asks: each name as labels, a length byte before each label, and a name that ends like an earlier one points back to it. Or paste the hex to read the names.

A list longer than 255 bytes goes into several option 119 entries that the client joins together. The DHCP client of Windows reads option 119 from Windows 10, version 1803 on.

The example of RFC 3397:

DomainsHexBytes
eng.apple.com marketing.apple.com03656e67056170706c6503636f6d00096d61726b6574696e67c00427

Option 43: vendor-specific information

Option 43 carries what the vendor of a device defines, usually as sub-options: a code byte, a length byte, then the value. What the bytes mean is up to the vendor whose class the device sends in option 60. Pick a vendor and enter the addresses, or enter sub-options one per line as code and value, such as 241 192.168.10.5 192.168.10.20. A value is read as IPv4 addresses, as hex after 0x, or else as text. Or paste the hex to read its sub-options.

The formats the vendors publish:

DevicesSub-optionValueExampleHex
Cisco lightweight access points241 (0xf1)The management addresses of the wireless LAN controllers, four bytes each. Cisco IOS takes it as option 43 hex and the string.192.168.10.5 192.168.10.20f108c0a80a05c0a80a14
UniFi devices1The address of the UniFi Network application, four bytes.192.168.3.100104c0a8030a
UniFi devices1 and 2Sub-option 2 is the inform URL in ASCII, such as http://192.168.3.10:8080/inform. Both may be sent together.192.168.3.10 http://192.168.3.10:8080/inform0104c0a8030a021f687474703a2f2f3139322e3136382e332e31303a383038302f696e666f726d

Sources

More Network tools