Mitel DHCP option 125 hex builder
Type your TFTP and call server addresses and get option 125 hex with the length byte counted for your string, ready to paste into Windows, UniFi, MikroTik or Cisco IOS.
Four numbers from 0 to 255, separated by dots, with no leading zero.
One to three addresses, separated by commas, using the same rules.
A whole number from 1 to 4094. Leave blank to leave it out.
A whole number from 0 to 7. Leave blank to leave it out.
0 to 63, then an optional v value and an optional s value, such as 46v46s26. Leave blank to leave it out.
Fill in the TFTP server and at least one call server.
The five byte groups
The option 125 value is five groups of bytes, one after another.
Enterprise number
Four bytes, 00 00 04 03, which is 1027. UniFi needs the enterprise number inside the hex because it has no enterprise field. Windows, MikroTik, and Cisco IOS keep those same four bytes.
Length
One byte, the character count of the string that follows. 98 characters is the byte 62. 60 characters is the byte 3c. This page counts the string you just built. A length copied from a sample (62 or 5C) instead of counted is why Cisco IOS reports "Invalid option 125 information" and why FortiGate and Infoblox reject the packet.
Phone id
The ASCII of id:ipphone.mitel.com;. It starts at the next byte. Nothing is inserted before it: no 01 sub-option and no second length.
Servers
sw_tftp= and the TFTP address, then call_srv= and one to three call servers. Extra call servers are joined with a comma and no spaces. Each pair ends in a semicolon.
Optional marks
vlan=, then l2p=, then dscp=, and only the ones you filled in. Each ends in a semicolon. A blank box is omitted, so the length byte shrinks with it.
Every digit in the paste lines is lowercase. The fields on this page keep the string at 132 characters or fewer, inside the room option 125 has for its data.