[All About Switches] Example for Connecting an S Series Switch to an IP Phone Us Highlighted

Latest reply: Aug 24, 2016 03:51:07 6769 4 1 0

1         Overview

As the voice over IP (VoIP) service becomes more popular, voice data and non-voice data are usually transmitted on the same network. Voice data must have a higher priority than other service data to minimize the delay and jitter during transmission.

2         Concepts

2.1         VoIP

Voice over Internet Protocol (VoIP) compresses and encapsulates ***og signals into packets, and then transmits packets over the IP network. Voice data can be transmitted over the Internet, enterprise intranet, and local area networks using VoIP.

Compared with transmitting voice data over the point-to-point connections on ISPs' networks, using VoIP is more cost-effective.

2.2         OUI Address

An Organizationally Unique Identifier (OUI) is the first 24 bits of a MAC address. It is a unique identifier assigned by Institute of Electrical and Electronics Engineers (IEEE) to a device vendor. 

Generally, IEEE allocates the first 24 bits, that is, a MAC address segment, to each vendor. Then the vendor allocates MAC addresses from the MAC address segment to their devices. Therefore, the IP phones can be identified by OUIs. That is, network devices know which packets are sent from IP phones based on the MAC address segments allocated to the IP phone vendors. These packets from IP phones are voice packets.

The operators can manually set OUIs using masks and specify the mask length.

OUIs commonly used by IP phone vendors are:


OUI Address




Siemens phone



Cisco phone



Avaya phone



Pingtel phone



Philips/NEC phone



Polycom phone



3com phone


2.3         802.1Q

802.1Q defined the format of a VLAN tag:

PRI (3 bits)

CFI (1 bit)

VID (12 bits)


A VLAN tag contains two bytes (16 bits). The VLAN ID occupies 12 bits, PRI occupies 3 bits (PRI is also called COS or 802.1p field), and CFI occupies 1 bit. Depending on the usage of VLAN tags, packets are classified into three types.

Packet Type


Untagged packet

A packet does not carry a VLAN tag.

Tagged packet with VLAN ID 0

A packet carries a VLAN tag, but the VLAN ID is 0.

Tagged packet

A packet carries a VLAN tag, and the VLAN ID is not 0.


The IP phones may send tagged packets, untagged packets, and tagged packets with VLAN ID 0. The CoS value of voice packets should be higher than the priorities of other packets to ensure preferred forwarding of voice packets. Generally, voice packets have a CoS value of 5. The CoS value of tagged packets sent by the IP phones from most mainstream vendors is 5 by default. However, some IP phones set CoS values in voice packets to other values, for example, 0. IP phones may send the following five types of packets. When a Huawei switch receives a tagged packet with priority 0, it treats it as an untagged packet. That is, the interface that receives the packet adds a VLAN tag containing the PVID to the packet.




Tagged packet with CoS 5


Tagged packet with CoS 0


Tagged packet with VLAN ID 0 and CoS 5


Tagged packet with VLAN ID 0 and CoS 0


Untagged packet

2.4      DSCP

Differentiated Services Code Point (DSCP) is a QoS standard released by IETF in December, 1998. DSCP occupies 6 bits, and its value ranges from 0 to 63.

DSCP uses the 6 bits in the ToS field of IP headers to allocate service classes and priorities, thus ensuring quality of communication, as shown in the figure:

[All About Switches] Example for Connecting an S Series Switch to an IP Phone Us-1281431-1

2.5         Voice VLAN

A VLAN assigned to voice packets is called voice VLAN.

Huawei switches can only specify VLANs as voice VLANs, but cannot assign voice VLANs to IP phones unless the switches use the protocols such as LLDP and DHCP.

3         IP Phone Deployment

An IP phone provides two ports, one connected to the upstream switch and the other connected to PCs. There are two methods to deploy IP phones:

l  Connect a PC to an IP phone.

[All About Switches] Example for Connecting an S Series Switch to an IP Phone Us-1281431-2


Advantage: Only one port on the switch is occupied. That is, one network port provides both voice and data services.

l  An IP phone and a PC connect to the switch independently.

[All About Switches] Example for Connecting an S Series Switch to an IP Phone Us-1281431-3


Advantage: The voice flows and data flows are separated, facilitating service management and maintenance.

A Huawei switch provides the following deployment methods.






Huawei, Polycom, Cisco

Access voice VLAN information using LLDP

High: LLDP is a standard protocol supported by most IP phones. LLDP access is simpler than DHCP access.



Access voice VLAN information using DHCP

Medium and high: By default, DHCP is enabled on Huawei IP phones.

Traffic policy


Voice VLAN information cannot be accessed using a protocol

Medium: A traffic policy is configured to increase priority of voice flows.

Voice VLAN


Voice VLAN information is accessed manually or through a protocol, but the 802.1p value in packets is not 5

Low: Voice VLANs cannot be assigned to IP phones.



Voice VLAN information cannot be accessed using a protocol

High: When LLDP or DHCP cannot be used, it is recommended that you use this method to increase priority of voice flows because the configuration of MAC-VLAN is simple.



NAC authentication is supported and voice VLAN information can be accessed from the RADIUS server

Low: IP phones must support 802.1x and have LLDP enabled.


Example for Connecting an S Series Switch to an IP Phone Using LLDP

3.1         LLDP Overview

The Link Layer Discovery Protocol (LLDP) is a standard data link discovery protocol defined in IEEE 802.1ab.

If an IP phone (for example, from Huawei or Polycom) supports LLDP, the switch assigns a VLAN ID to the IP phone using the MED TLV field.

3.2         Applicable Version and Model

Version and Model

IP Phone Model

All versions and models

The IP phones that can obtain voice VLAN information using LLDP, for example, the IP phones from Huawei, Polycom, and Cisco


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

3.3         Networking Requirement

Data flows of the High Speed Internet (HSI), Voice over IP (VoIP), and Internet Protocol Television (IPTV) services are transmitted on a network. Users require high quality of the VoIP service. Therefore, voice flows must be transmitted with a high priority. If the IP phone supports LLDP and has a high 802.1p priority (for example, 5), you can configure LLDP and voice VLAN on the switch. Then the switch uses the LLDP protocol to deliver the voice VLAN ID to the IP phone and does not change the packet priority.

As shown in the following figure, the IP phone obtains voice VLAN ID using LLDP. In this example, a port on the switch needs to transmit both voice and data flows.

[All About Switches] Example for Connecting an S Series Switch to an IP Phone Us-1281431-4

3.4         Data Plan

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

3.5         Configuration Roadmap

The configuration roadmap is as follows:

l  Create VLANs for voice and data flows.

l  Enable LLDP globally to assign voice VLAN to the IP phone.

l  Configure the interface to trust the packet priority.

3.6         Procedure

Step 1: Create VLANs for voice and data flows.

<HUAWEI> system-view

[HUAWEI] vlan batch 300 500

Step 2: Set the interface type and PVID to forward data flows. Add the interface to voice VLAN 300.

[HUAWEI] interface gigabitethernet 0/0/1

[HUAWEI-GigabitEthernet0/0/1] port link-type hybrid  //Set the type of interface connected to the IP phone to Hybrid so that the interface can forward both voice and data flows.

[HUAWEI-GigabitEthernet0/0/1] port hybrid pvid vlan 500  //Set the default VLAN ID on the interface to 500. Then GE0/0/1 will add VLAN ID 500 to untagged packets so that the packets can be forwarded within VLAN 500. This configuration applies to data packets.

[HUAWEI-GigabitEthernet0/0/1] port hybrid untagged vlan 500  //Configure the GE0/0/1 to remove VALN tags from the packets carrying VLAN ID 500, so that the IP phone receives only untagged packets.

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

[HUAWEI-GigabitEthernet0/0/1] quit

Step 3: Enable LLDP globally to assign voice VLAN ID to the IP phone.

[HUAWEI] lldp enable    //Enable LLDP so that the switch can assign voice VLAN ID to the IP phone. After LLDP is globally enabled, it is enabled on all interfaces of the switch.

[HUAWEI] interface gigabitethernet 0/0/1

[HUAWEI-GigabitEthernet0/0/1] lldp tlv-enable med-tlv network-policy voice-vlan vlan 300  //Set the voice VLAN ID to 300.

Step 4: Set the trusted 802.1p value so that the interface does not change the 802.1p value in packets.

[HUAWEI-GigabitEthernet0/0/1] trust 8021p    //Configure GE0/0/1 to trust the 802.1p value in packets. The command is trust 8021p inner for a modular switch.

[HUAWEI-GigabitEthernet0/0/1] quit

(Optional) Step 5: Configure the switch to be compatible with Cisco IP phones so that the switch can assign voice VLAN ID to Cisco IP phones. If you use the IP phones from other vendors, skip this step.

[HUAWEI] interface gigabitethernet 0/0/1

[HUAWEI-GigabitEthernet0/0/1] lldp compliance cdp txrx

[HUAWEI-GigabitEthernet0/0/1] quit

Step 6: Specify the VLANs from which the voice and data packets are transparently transmitted by the upstream interface.

[HUAWEI] interface gigabitethernet 0/0/2

[HUAWEI-GigabitEthernet0/0/2] port link-type trunk  //Specify the VLAN on a Trunk interface.

[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 lldp local interface GigabitEthernet 0/0/1 | include Media policy VlanID command to check whether the voice VLAN ID obtained using LLDP is correct.

[HUAWEI] display lldp local interface GigabitEthernet 0/0/1 | include Media policy VlanID                                                        

Media policy VlanID           :300    //The voice VLAN ID 300 is obtained.

l  The IP phone can connect to the switch. The VLAN ID in the MAC address entry of the IP phone is 300. This indicates that the IP phone communicates with the switch through VLAN 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  

3.7         Configuration Files


sysname HUAWEI


vlan batch 300 500


lldp enable


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

 lldp tlv-enable med-tlv network-policy voice-vlan vlan 300

 lldp compliance cdp txrx


interface GigabitEthernet0/0/2

port link-type trunk                                                          

  port trunk allow-pass vlan 300 500



3.8         Summary

l  The lldp tlv-enable med-tlv network-policy voice-vlan vlan 300 and lldp compliance cdp txrx commands apply to V200R001C00 and later versions. In the versions earlier than V200R001C00, use voice VLAN.

[HUAWEI-GigabitEthernet0/0/1] port port link-type hybrid

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

[HUAWEI-GigabitEthernet0/0/1] voice-vlan mode manual  //Set the voice VLAN operation mode to manual. That is, add interfaces to voice VLAN manually.

[HUAWEI-GigabitEthernet0/0/1] undo voice-vlan security enable  //Allow only the voice packets with the recognizable OUIs to pass through and discard non-voice packets. This interface cannot work in secure mode because it needs to forward both voice and data flows.

[HUAWEI-GigabitEthernet0/0/1] voice-vlan legacy enable  //Configure the switch to be compatible with Cisco IP phones.

l  Set the link type of the interface. The default value varies depending on switch's software versions. It is recommended that you set it to Hybrid manually.

[HUAWEI-GigabitEthernet0/0/1] port link-type hybrid

l  Enable the forwarding of BPDU packets using the bpdu enable command because the LLDP packets are BPDU packets. In V100R006 and later versions, the forwarding of BPDU is enabled by default.

[HUAWEI-GigabitEthernet0/0/1] bpdu enable


★★★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

  • x
  • convention:

Monica Created Sep 11, 2015 16:41:11 Helpful(1) Helpful(1)

thank you for sharing.

  • x
  • convention:

liuliuliu Created Sep 11, 2015 17:06:19 Helpful(1) Helpful(1)

  • x
  • convention:

daniuyaofafa Created Sep 13, 2015 12:38:54 Helpful(1) Helpful(1)

good, it is very kind of you
  • x
  • convention:

m7g Created Nov 19, 2015 20:21:22 Helpful(1) Helpful(1)

Thanks you!

Very good description!
Maybe you can show configuration tripple service behind MEN network ?

Internet(subIf)-MEN(l2 vlan)->s53/33(port link-trunk dot1q-tunnel?)->client(VoIP phone+Internet..)

  • x
  • convention:


You need to log in to reply 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."
If the attachment button is not available, update the Adobe Flash Player to the latest version!

Login and enjoy all the member benefits

Fast reply Scroll to top