Got it

Example for connecting an S Series switch to an IP phone [All About Switches] Highlighted

Latest reply: Feb 19, 2021 01:39:46 7003 5 4 0 2

Hello, everybody!

This post showcases an example for connecting an S Series switch to an IP phone, as part of the the All About Switches section in the Community. Please see more below.

1         DHCP Overview

Dynamic Host Configuration Protocol (DHCP) is a protocol that dynamically configures and uniformly manages network parameters for hosts based on TCP/IP. This example describes how to allocate IP address and voice virtual local area network (VLAN ID) dedicated for voice flows to an IP phone using DHCP.

2         Applicable Version and Model

Switch Version and Model

IP Phone Model

All modular switch models of all versions

All fixed switch models of all versions excluding the following models:

S2700SI/S2300SI, S2700EI/S2300EI, S5700LI/S5300LI, S2750EI/S2350EI, S5710LI, and S5700S-LI

IP phones that use DHCP to obtain VLAN IDs, such as Huawei IP phones and Cisco IP phones


In this document, V200R006C00 is used as an example. The version differences will be described in section 1.8 Summary.

3         Networking Requirements

Data flows of HSI, VoIP, and IPTV services are transmitted on a network. Users require high quality of the voice service. Therefore, voice data flows must be transmitted with a high priority to ensure the voice service quality. The IP phone supports DHCP, has a high default 802.1p priority (for example, 5), and does not support LLDP. You can enable DHCP on the switch to provide VoIP access service. The switch then uses DHCP to allocate a VLAN ID to the IP phone and does not change the 802.1p priority of packets.

As shown in the following figure, the IP phone supports DHCP. You can configure Option 184 on the DHCP server to deliver the VLAN ID to the IP phone.


4         Data Plan

VLAN plan: Voice flows (VoIP) are transmitted in VLAN 300 and data flows (HIS and IPTV) are transmitted in VLAN 500.

5         Configuration Roadmap

The configuration roadmap is as follows:

l   Create VLANs in which voice flows and data flows are transmitted.

l   Configure the DHCP server to allocate an IP address and a voice VLAN ID to the IP phone.

6         Procedure

   Step 1      Create VLANs in which voice flows and data flows are transmitted on the Switch.

<HUAWEI> system-view

[HUAWEI] vlan batch 300 500

   Step 2      Configure the interface type and port default VLAN ID (PVID) for data flow forwarding. Add an interface to the voice VLAN for voice flow forwarding.

[HUAWEI] interface gigabitethernet 0/0/1

[HUAWEI-GigabitEthernet0/0/1] port link-type hybrid   //Configure the interface connecting the switch to the IP phone to a hybrid interface so that it can forward both voice and data flows.

[HUAWEI-GigabitEthernet0/0/1] port hybrid pvid vlan 500   //Set the default VLAN ID of the interface to 500. This configuration enables GE0/0/1 to tag received untagged packets with VLAN 500 and forward the packets in VLAN 500. This configuration is usually used for data packet forwarding.

[HUAWEI-GigabitEthernet0/0/1] port hybrid untagged vlan 500   //Configure GE0/0/1 to remove the VLAN tag from a packet whose VLAN ID is 500 before sending the packet so that downstream users receive untagged packets.

[HUAWEI-GigabitEthernet0/0/1] port hybrid tagged vlan 300   //Add the interface to the voice VLAN so that the interface can forward voice flows.

[HUAWEI-GigabitEthernet0/0/1] quit

   Step 3      Configure an IP address for VLANIF 500 and configure the IP address as the egress gateway address of the DHCP server. Configure the DHCP server to allocate IP addresses from the global address pool.

[HUAWEI] interface vlanif500

[HUAWEI-Vlanif500] ip address

HUAWEI-Vlanif500] dhcp select global   //Configure the DHCP server to allocate IP addresses from the global address pool.

[HUAWEI-Vlanif500] quit

   Step 4      Enable DHCP on the Switch so that it can allocate an IP address and a voice VLAN ID to the IP phone.

[HUAWEI] dhcp enable   //Enable DHCP.

[HUAWEI] ip pool ip_access   //Set the name of the address pool to ip_access.

[HUAWEI-ip-pool-ip_access] network mask 24   //Specify a network segment for the address pool.

[HUAWEI-ip-pool-ip_access] gateway-list   //Configure the egress gateway address for the downstream device, which is the same as the IP address of the interface's corresponding VLANIF interface.

[HUAWEI-ip-pool-ip_access] option184 voice-vlan 300   //Configure the Option 184 field on the DHCP server to allocate voice VLAN 300 to the IP phone.

[HUAWEI-ip-pool-ip_access] quit

   Step 5      Configure the interface to trust and maintain the 802.1p priority of packets.

[HUAWEI] interface gigabitethernet 0/0/1

[HUAWEI-GigabitEthernet0/0/1] trust 8021p   //Configure GE0/0/1 to trust the 802.1p priority carried in packets. Run the trust 8021p inner command on modular switches.

[HUAWEI-GigabitEthernet0/0/1] quit


   Step 6      Configure the uplink interface to transparently transmit voice flows and data flows from VLAN 300 and VLAN 500.

[HUAWEI] interface gigabitethernet 0/0/2

[HUAWEI-GigabitEthernet0/0/2] port link-type trunk   //Configure the interface as a trunk interface to transparently transmit VLAN packets.

[HUAWEI-GigabitEthernet0/0/2] port trunk allow-pass vlan 300 500

[HUAWEI-GigabitEthernet0/0/2] quit


   Step 7      Verify the configuration.

l   Run the display ip pool name ip_access command to check whether the Option-code field displays 184.

[HUAWEI] display ip pool name ip_access

Pool-name      : ip_access

Pool-No        : 0

Lease          : 1 Days 0 Hours 0 Minutes

Domain-name    : -

Option-code    : 184

Option-subcode : --

Option-type    : hex

Option-value   : 0302012C

DNS-server0    : -

NBNS-server0   : -

Netbios-type   : -

Position       : Local           Status           : Unlocked

Gateway-0      :

Network        :

Mask           :

VPN instance   : --


  Start           End     Total  Used  Idle(Expired)  Conflict  Disable

 -----------------------------------------------------------------------------   253     0        253(0)         0        0  



l   The IP phone can be used to make phone calls. Check the MAC address entry of the IP phone. You can see that the VLAN ID is 300.

[HUAWEI] display mac-address 00e0-bb00-1234


MAC Address    VLAN/VSI      Learned-From        Type


00e0-bb00-1234 300/-           GE0/0/1             dynamic



Total items displayed = 1

7         Configuration Files


sysname HUAWEI


vlan batch 300 500


dhcp enable


ip pool ip_access


 network mask

 option184 voice-vlan 300


interface Vlanif500

 ip address

 dhcp select global


interface GigabitEthernet0/0/1

 port link-type hybrid

 port hybrid pvid vlan 500

 port hybrid tagged vlan 300

 port hybrid untagged vlan 500

 trust 8021p


interface GigabitEthernet0/0/2

port link-type trunk

 port trunk allow-pass vlan 300 500




8         Summary

l   When configuring DHCP to connect an IP phone to a switch functioning as the DHCP server, check whether the option184 voice-vlan command is configured on the switch. If the command is not configured, the IP phone cannot use DHCP to obtain a voice VLAN ID. On live networks, an upstream device of switches often functions as the DHCP server and this configuration is often forgotten.

l   Most IP phones support DHCP by default. Therefore, users tend to believe that IP phones communicate with switches using DHCP. However, if the option184 voice-vlan command is not configured on the DHCP server, DHCP does not take effect. For example, when a Cisco IP phone is connected to a Huawei switch, users often report that the IP phone cannot obtain the voice VLAN ID using DHCP. However, if the Cisco IP phone is connected to a Cisco switch, there is no such problem. This is because the Cisco IP phone uses Cisco Discovery Protocol (CDP) to obtain the voice VLAN ID and Cisco switches support CDP by default. However, voice VLAN legacy must be enabled on the Huawei switch so that the Cisco IP phone can communicate with the connected Huawei switch. For details, see Example for Connecting an S Series Switch to an IP Phone Using LLDP and Connection Principles. This example describes how to configure a switch to allocate an IP address from the global address pool and allocate a voice VLAN ID to an IP phone. A switch can also allocate an IP address and a voice VLAN ID to an IP phone from an interface address pool.

[HUAWEI] interface Vlanif300

[HUAWEI-Vlanif300] ip address

[HUAWEI-Vlanif300] dhcp select interface   //Configure the DHCP server to allocate IP addresses from the interface address pool.

[HUAWEI-Vlanif300] dhcp server option184 voice-vlan 300


l   In this example, the 802.1p priority of voice packets is not changed. If the 802.1p priority must be 7 as required by the upstream devices, the DSCP priority must be 46. In this case, you need to enable voice VLAN on GE0/0/1, configure voice VLAN, and change the 802.1p priority and DSCP priority to 7 and 46 respectively.

[HUAWEI-GigabitEthernet0/0/1] voice-vlan 300 enable

[HUAWEI-GigabitEthernet0/0/1] quit

[HUAWEI] voice-vlan remark 8021p 7 dscp 46

★★★Summary★★★ All About Huawei Switch Features and Configurations

This article contains more resources

You need to log in to download or view. No account? Register


The post is synchronized to: Configuration Examples (Switch)

  • x
  • convention:

Created Sep 11, 2015 08:41:56

thank you for sharing.

View more
  • x
  • convention:

Created Sep 11, 2015 09:05:55

View more
  • x
  • convention:

Created Feb 8, 2018 03:43:34

if i connect to huawei s5720 to juniper switch,how to configure to carry DHCP.i configured trunk to carry vlans between two switches.But it cannot carry DHCP.DHCP server is configured in S5720 and connect to juniper ex2200 l2 switch.I configured trunk port on both switches. but my hosts that connected to juniper cannot get dhcp .
View more
  • x
  • convention:

MVE Created Jun 5, 2018 10:53:58

useful document, thanks
View more
  • x
  • convention:

Created Feb 19, 2021 01:39:46

interesting content.
View more
  • x
  • convention:



You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."

My Followers

Login and enjoy all the member benefits


Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Please bind your phone number to obtain invitation bonus.