Author Topic: Mitel DHCP Option 125 using Cisco Layer 3 Switch - Configuration  (Read 504 times)

Offline VallivueJoe

  • New Member
  • *
  • Posts: 1
  • Karma: +3/-0
    • View Profile
I want to share a solution for DHCP option 125 for Mitel VoIP phones on Cisco Layer 3 switches/routers. The official Mitel documentation for Cisco using an ascii string did not work for us. If you have a simpler or better solution. I would love to know it.

I wanted to thank Concon9 for their advice in this Ubiquiti community thread: https://community.ui.com/questions/Mitel-DHCP-Option-125-Success/a16e186f-83e0-49fd-975d-798620246a7e.

Here are the steps to get DHCP option 125 working for Mitel on Cisco Layer 3 Switches/Routers.

Steps to Configure Cisco DHCP Option 125 for Mitel:

Create your Mitel ASCII String: This string contains the necessary information for your Mitel phones to provision correctly. id:ipphone.mitel.com;sw_tftp=<Your_MvB_IP>;call_srv=<Your_MvB_IP>;vlan=<Your_VLAN_ID>

Replace the IP addresses with your MiVB server's IP. Example (using MiVB server IP 10.2.5.148 and VLAN 12):

id:ipphone.mitel.com;sw_tftp=10.2.5.148;call_srv=10.2.5.148;vlan=12

Convert your ASCII text to HEX: Use an online ASCII to HEX converter tool. For the example above, the initial HEX code will look like this: (I use Hex to String Converter by RapidTables)

69 64 3A 69 70 70 68 6F 6E 65 2E 6D 69 74 65 6C 2E 63 6F 6D 3B 73 77 5F 74 66 74 70 3D 31 30 2E 32 2E 35 2E 31 34 38 3B 63 61 6C 6C 5F 73 72 76 3D 31 30 2E 32 2E 35 2E 31 34 38 3B 76 6C 61 6E 3D 31 32

Remove spaces from the HEX string: Use a text editor like Notepad to remove all the spaces.

The space-removed HEX code will look like this:

69643A697070686F6E652E6D6974656C2E636F6D3B73775F746674703D31302E322E352E3134383B63616C6C5F7372763D31302E322E352E3134383B766C616E3D3132

Insert the Vendor ID: Add the Mitel vendor ID (in HEX) to the beginning of the HEX string. The Mitel vendor ID in HEX is: 0000040362

The combined HEX string will look like this:

000004036269643A697070686F6E652E6D6974656C2E636F6D3B73775F746674703D31302E322E352E3134383B63616C6C5F7372763D31302E322E352E3134383B766C616E3D3132

Format for Cisco: Add a period (.) after every 4th hexadecimal character to match Cisco's required format. The Cisco-formatted HEX string will look like this:

0000.0403.6269.643A.6970.7068.6F6E.652E.6D69.7465.6C2E.636F.6D3B.7377.5F74.6674.703D.3130.2E32.2E35.2E31.3438.3B63.616C.6C5F.7372.763D.3130.2E32.2E35.2E31.3438.3B76.6C61.6E3D.3132

Configure the DHCP Scope on your Cisco Device: Add the option 125 hex command to your relevant DHCP scope.

Example Cisco Router DHCP Scope Configuration:

ip dhcp pool Voice
network 10.6.76.0 255.255.252.0 
default-router 10.6.76.1 
dns-server 10.2.5.10 10.2.5.20 10.2.5.30 
option 125 hex 0000.0403.6269.643a.6970.7068.6f6e.652e.6d69.7465 .6c2e.636f.6d3b.7377.5f74.6674.703d.3130.2e32.2e3 5.2e31.3438.3b63.616c.6c5f.7372.763d.3130.2e32.2e 35.2e31.3438.3b76.6c61.6e3d.3132


I hope this helps.
« Last Edit: April 08, 2025, 12:20:28 PM by VallivueJoe »


Offline ralph

  • Mitel Forums Admin
  • Hero Member
  • *****
  • Posts: 5786
  • Country: us
  • Karma: +471/-0
  • Published Author: http://amzn.to/2dcYSY5
    • View Profile
Re: Mitel DHCP Option 125 using Cisco Layer 3 Switch - Configuration
« Reply #1 on: April 09, 2025, 09:32:45 AM »
Thank you for that! Great detail.

Here's a (untested) python script that should make it easier.
Quote
def mitel_option125_hex(mvb_ip, vlan_id):
    """
    Generate the hexadecimal string for Mitel DHCP Option 125 configuration.

    Parameters:
    mvb_ip (str): IP address of the MiVoice Business server.
    vlan_id (int): VLAN ID.

    Returns:
    str: Formatted hexadecimal string for Cisco configuration.
    """
    # Construct the ASCII string
    ascii_string = f"id:ipphone.mitel.com;sw_tftp={mvb_ip};call_srv={mvb_ip};vlan={vlan_id}"

    # Convert ASCII string to hexadecimal
    hex_string = ascii_string.encode('utf-8').hex()

    # Add the Mitel vendor ID (0000040362) to the beginning of the hex string
    mitel_vendor_id = "0000040362"
    combined_hex = mitel_vendor_id + hex_string

    # Format the hex string with periods every 4 characters
    formatted_hex = '.'.join(combined_hex[i:i+4] for i in range(0, len(combined_hex), 4))

    return formatted_hex

# Example usage:
mvb_ip = "10.2.5.148"  # Replace with your MiVB server IP
vlan_id = 12           # Replace with your VLAN ID
option125_hex = mitel_option125_hex(mvb_ip, vlan_id)
print("option 125 hex", option125_hex)

Usage:
Quote
ip dhcp pool Voice
network 10.6.76.0 255.255.252.0
default-router 10.6.76.1
dns-server 10.2.5.10 10.2.5.20 10.2.5.30
option 125 hex 0000.0403.6269.643a.6970.7068.6f6e.652e.6d69.7465 .6c2e.636f.6d3b.7377.5f74.6674.703d.3130.2e32.2e3 5.2e31.3438.3b63.616c.6c5f.7372.763d.3130.2e32.2e 35.2e31.3438.3b76.6c61.6e3d.3132

Ralph

Online johnp

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2243
  • Country: us
  • Karma: +70/-0
    • View Profile
Re: Mitel DHCP Option 125 using Cisco Layer 3 Switch - Configuration
« Reply #2 on: April 09, 2025, 01:21:14 PM »
Just want to note,
Quote
Insert the Vendor ID: Add the Mitel vendor ID (in HEX) to the beginning of the HEX string. The Mitel vendor ID in HEX is: 0000040362

the vale 62 at the end represents a length of string value and could vary upon user needs. It is best to use the Mitel option tool to get the correct string IMHO


 

Sitemap 1 2 3 4 5 6 7 8 9 10