Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

S300, S500, S2700, S5700 and S6700 Series Ethernet

Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

8 Voice VLAN Configuration

8.1 Overview of Voice VLANs


8.2 Voice VLAN Typical Networking
8.3 Understanding Voice VLANs
8.4 Application Scenarios of Voice VLANs
8.5 Licensing Requirements and Limitations for Voice VLANs
8.6 Default Settings for Voice VLANs
8.7 Configuring a MAC Address-based Voice VLAN
8.8 Configuring a VLAN ID-based Voice VLAN
8.9 Configuration Examples for Voice VLANs

8.1 Overview of Voice VLANs


Definition
Voice VLAN is a technology that transmits voice data.

Purpose
Data, voice, and video services are often transmitted simultaneously over a
network. Voice services, in particular, require a higher forwarding priority than
data or video services. When bandwidth is limited, voice data must have
transmission preference over other types of data. This can be ensured by
configuring a voice VLAN on the switch to transmit voice data and setting QoS
parameters in the voice VLAN so that voice data is given preference when
congestion occurs.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 407


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

8.2 Voice VLAN Typical Networking


As shown in Figure 8-1, a PC and an IP phone connect to a switch interface
simultaneously. Therefore, the switch interface transmits both voice and data
services.

Figure 8-1 Connecting a PC and an IP phone to a switch

The connection mode in Figure 8-1 is widely used on networks.


Figure 8-2 shows another connection mode, in which only an IP phone connects
to a switch interface.

Figure 8-2 Connecting an IP phone to a switch

Some IP phones (for example, Cisco 7962) send tagged voice packets and some IP
phones (for example, Huawei MC850) send untagged voice packets. The following
sections describe how the MAC address-based voice VLAN and VLAN ID-based
voice VLAN transmit tagged and untagged voice packets.

8.3 Understanding Voice VLANs


Some IP phones (for example, Cisco 7960) send tagged voice packets, and others
(for example, Huawei MC850) send untagged voice packets. This section discusses
how MAC address-based voice VLAN and VLAN ID-based voice VLAN transmit
tagged and untagged voice packets.
A switch configured with voice VLAN can:
● Identify voice data.
● Increase the priority of voice data.
● Forward the voice data based on the increased priority.
The switch identifies voice data based on:
● Source MAC addresses of the received packets
The switch identifies data packets as voice data when the source MAC address
matches the organizationally unique identifier (OUI). The OUI must be
preconfigured and is used in scenarios where IP phones send untagged voice
packets.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 408


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

● Source VLAN tags of the received packets


The switch identifies data packets as voice data when the VLAN ID matches
the configured VLAN ID. This simplifies configurations when many IP phones
connect to the switch. IP phones must be able to obtain voice VLAN
information from the switch to use this mode.
The switch can identify voice data flows based on MAC addresses and VLAN IDs
regardless of whether the packets carry VLAN tags. However, OUIs must be
configured in order for the switch to differentiate untagged voice packets from
data packets. If the voice packets are tagged, configuring VLAN ID-based voice
VLAN simplifies configuration when many IP phones connect to the switch.

MAC Address-based Voice VLAN


● OUI
An OUI is the first 24 bits of a 48-bit MAC address assigned to each vendor by
the Institute of Electrical and Electronics Engineers (IEEE). Voice packets sent
by IP phones can be identified by the MAC address ranges requested by IP
phone vendors.
In voice VLAN, the OUI is user-defined and not necessarily 24 bits long. The
OUI is the result of the AND operation between the MAC address and mask in
the voice-vlan mac-address command.
● Implementation
In Figure 8-3, after receiving an untagged packet from the PC and IP phone,
the switch processes the packet as follows:
– If the source MAC address matches the configured OUI, the switch adds
the voice VLAN tag to the packet and increases the packet priority. (If the
result of the AND operation between the MAC address and mask is the
OUI, the source MAC address matches the OUI.)
– If the source MAC address does not match the configured OUI, the switch
adds the VLAN tag with the PVID to the packet so that voice packets are
preferentially sent.

Figure 8-3 MAC address-based voice VLAN

VLAN ID-based Voice VLAN


After receiving packets from the PC and IP phone, the switch determines whether
the VLAN IDs in the packets match the configured voice VLAN ID. If they match,
the switch considers data as voice data and increases the priority. The switch adds
the VLAN tag of the PVID to untagged packets from the PC. When VLAN ID-based

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 409


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

voice VLAN is configured, the IP phone must be able to obtain voice VLAN
information from the switch.
LLDP is one of the multiple methods in which an IP phone can obtain voice VLAN
information from a switch.

Figure 8-4 VLAN ID-based voice VLAN

Figure 8-4 shows a PC and an IP phone connecting to a switch. The IP phone


obtains voice VLAN information from the switch through LLDP as follows:
1. After the IP phone goes online, it sends an LLDPDU to the switch.
2. After receiving the LLDPDU, the switch encapsulates voice VLAN information
in the LLDPDU and sends it to the IP phone.
3. After receiving the LLDPDU, the IP phone sends tagged voice packets.
4. The switch receives tagged voice packets. If the tag matches the voice VLAN
ID on the switch, the switch increases the priority of the packets and forwards
them.
When receiving untagged packets, the switch still sends them in the VLAN
specified by the PVID. When congestion occurs, the switch preferentially sends
voice packets.

8.4 Application Scenarios of Voice VLANs


Figure 8-5 shows PCs and IP phones connecting to the Internet through switches.
Because the voice service is sensitive to delay and jitter, the priority of voice data
flows needs to be increased so that they can be preferentially forwarded when
congestion occurs.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 410


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

Figure 8-5 Applicable scenario of the voice VLAN

Configure a voice VLAN based on the type of voice packets sent by IP phones:
● Configure MAC address-based voice VLAN when voice packets are untagged
or tagged with VLAN 0.
● Configure VLAN ID-based voice VLAN when IP phones can obtain voice VLAN
information on the switch.

8.5 Licensing Requirements and Limitations for Voice


VLANs

Involved Network Elements


Other network elements are not required.

Licensing Requirements
The voice VLAN is a basic feature of a switch and is not under license control.

Feature Support in V200R021C10


All models of S300, S500, S2700, S5700, and S6700 series switches support Voice
VLAN.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 411


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

NOTE

To view detailed information about software mappings, visit Info-Finder, select a product
series or product model, and click Hardware Center.
The S5731-L and S5731S-L are remote units and do not support web-based management,
YANG, or commands. They can be configured only through configuration delivery by the
central device. For details, see "Simplified Architecture Configuration (the Solar System
Solution)" in the S300, S500, S2700, S5700, and S6700 V200R021C10 Configuration Guide -
Device Management.

Feature Limitations
● VLAN 1 cannot be configured as a voice VLAN.
● To transmit different services, ensure that the voice VLAN and default VLAN
on an interface are different VLANs.
● Only one VLAN on an interface can be configured as a voice VLAN at a time.
● The guest VLAN, restrict VLAN, or critical VLAN on an interface cannot be
configured as a voice VLAN.
● A user group VLAN configured using the user-vlan command cannot be
specified as a voice VLAN.
● After a voice VLAN is configured on an interface, VLAN mapping, VLAN
stacking, or traffic policies cannot be configured on the interface.
● Do not set the VLAN ID to 0 on an IP phone.
● The S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H,
S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S do not support the
automatic mode.
● In auto mode, access, negotiation-auto, or negotiation-desirable interfaces
cannot be added to a voice VLAN. To add the interface to the voice VLAN, run
the port link-type command to change the link type of the interface to trunk
or hybrid.
● When an IP phone is connected to a switch through the OUI-based voice
VLAN, disable LLDP on the interface. If LLDP is enabled on the interface, the
switch will allocate a voice VLAN ID to the IP phone. The IP phone sends
tagged packets to the switch, whereas the switch sends untagged packets to
the IP phone. As a result, the IP phone cannot go online.
● In V200R003 and later versions, the automatic mode takes effect only when
the voice-vlan remark-mode mac-address command is configured to
increase the priority of voice packets based on MAC addresses and the voice-
vlan enable command without include-untagged specified is configured to
enable voice VLAN on the interface.

8.6 Default Settings for Voice VLANs


Parameter Default Setting

Voice VLAN on an interface Disabled

Increase in voice VLAN VLAN ID-based


priority

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 412


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

Parameter Default Setting

Adding an interface to voice Manual


VLAN

802.1p priority of the voice 6


VLAN

DSCP priority of the voice 46


VLAN

Working mode of the voice Normal


VLAN

Interworking with voice Disabled


devices of other vendors

8.7 Configuring a MAC Address-based Voice VLAN


When the source MAC address in packets entering a switch interface matches the
configured OUI, the switch sends the packets to the voice VLAN and increases the
packet priority.

8.7.1 Enabling the Voice VLAN Function


Context
To implement the voice VLAN function, configure the VLAN used to forward voice
packets on the switch as a voice VLAN and enable the voice VLAN function. You
are advised to configure different VLANs for voice and data services to facilitate
management.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.

Step 3 Run voice-vlan vlan-id enable [ include-untagged | include-tag0 ]*


A voice VLAN is configured and the voice VLAN function is enabled on the
interface.
By default, the voice VLAN function is disabled on an interface.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 413


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

NOTE

● VLAN 1 cannot be configured as a voice VLAN.


● To transmit different services, ensure that the voice VLAN and default VLAN on an
interface are different.
● Only one VLAN on an interface can be configured as a voice VLAN at a time.
● The guest VLAN, restrict VLAN, or critical VLAN on an interface cannot be configured as
a voice VLAN.
● A user group VLAN configured using the user-vlan command cannot be specified as a
voice VLAN.
● When a voice VLAN is configured together with VLAN Mapping, VLAN Stacking, or a
Traffic Policy on the same interface, the configurations may not take effect.
● When an IP phone sends packets tagged with VLAN 0, include-tag0 must be specified
on the S6735-S, S6720-EI and S6720S-EI. On other models, include-untagged takes
effect for untagged packets and packets tagged with VLAN 0.
● On the S6735-S, S6720-EI and S6720S-EI, after a VLAN is associated with a BD or VSI
and is specified as a voice VLAN, the VXLAN or MPLS function well not take effect.
● On the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S,
or S6730S-S, after a VLAN is associated with a BD or VSI, if this VLAN needs to be
specified as a voice VLAN, you need to run the lldp tlv-enable med-tlv network-policy
voice-vlan vlan vlan-id [ cos cvalue | dscp dvalue ]* command to configure the voice
VLAN capability of LLDP on an interface.

----End

8.7.2 Configuring a Mode in Which the Priority of Voice


Packets Is Increased Based on MAC Addresses

Context
The switch can identify voice data flows according to the source MAC address of
the received data packets. The switch considers data packets with the source MAC
address matching the Organizationally Unique Identifier (OUI) as voice data flows.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface interface-type interface-number

The interface view is displayed.

Step 3 Run voice-vlan remark-mode mac-address

A mode in which the priority of voice packets is increased is configured.

By default, the priority of voice packets is increased based on VLAN IDs.

----End

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 414


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

8.7.3 Configuring an OUI for a Voice VLAN

Context
An OUI is the first 24 bits of a 48-bit MAC address assigned to each vendor by the
Institute of Electrical and Electronics Engineers (IEEE). Voice packets sent by IP
phones can be identified by the MAC address ranges requested by IP phone
vendors.

In voice VLAN, the OUI is user-defined and not necessarily 24 bits long. The OUI is
the result of the AND operation between the MAC address and mask in the voice-
vlan mac-address command.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run voice-vlan mac-address mac-address mask oui-mask [ description text ]

An OUI is configured for a voice VLAN.

By default, no OUI address is set.

When configuring an OUI for a voice VLAN, note the following:

● The MAC address cannot be all 0s, multicast address, or broadcast address.
● The S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support a maximum
of 100 OUIs. When the switch is configured with 100 OUIs, subsequent
configurations will not take effect. Other models support a maximum of 32
OUIs. When the switch is configured with 32 OUIs, subsequent configurations
will not take effect.
● When you run the undo voice-vlan mac-address mac-address command to
delete an OUI, set mac-address to the result of the logical AND operation
between the OUI and the OUI mask that you set.

----End

8.7.4 Configuring a Mode in Which an Interface Is Added to a


Voice VLAN

Context
Based on MAC addresses, an interface can be added to a voice VLAN in auto or
manual mode. You can configure a mode in which an interface is added to a voice
VLAN according to data flows on the interface.
● Auto
The system adds the interface connected to a voice device to the voice VLAN
if the source MAC address of packets sent from the voice device matches the
OUI.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 415


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

● Manual
In manual mode, the interface connected to a voice device must be added to
the voice VLAN manually after the voice VLAN function is enabled on the
interface. Otherwise, the voice VLAN does not take effect on the interface.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface interface-type interface-number

The interface view is displayed.

Step 3 Run port link-type hybrid

The interface is configured as the hybrid interface.

Step 4 Run voice-vlan mode { auto | manual }

A mode in which an interface is added to a voice VLAN is configured.

By default, an interface is added to a voice VLAN in manual mode.

NOTE

● The S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, and
S6730S-S do not support this configuration.
● In auto mode, access, negotiation-auto, or negotiation-desirable interfaces cannot be
added to a voice VLAN. To add the interface to the voice VLAN, run the port link-type
command to change the link type of the interface to trunk or hybrid.
● The automatic mode takes effect only when the voice-vlan remark-mode mac-address
command is configured to increase the priority of voice packets based on MAC
addresses and the voice-vlan enable command without include-untagged specified is
configured to enable voice VLAN on the interface and add voice VLAN IDs to only
tagged packets.

Step 5 (Optional) Add an interface to a voice VLAN in manual mode according to 4.7.1.1
Configuring Interface-based VLAN Assignment (Statically Configured
Interface Type).

----End

8.7.5 (Optional) Configuring the Secure or Normal Mode of a


Voice VLAN

Context
Based on the data filtering mechanism, a voice VLAN works in either secure or
normal mode.

Table 8-1 describes the voice VLAN working modes.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 416


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

Table 8-1 Secure and normal modes


Wor Scenario Packet Processing Configuration Note
king
Mod
e

Secu The inbound interface If the source MAC The secure mode takes
re enabled with the voice address does not effect only when the
VLAN function allows match the OUI, the voice-vlan remark-
only the voice packets interface does not mode mac-address
in which the source change the priority of command is
MAC address matches voice packets and configured to increase
the OUI address of the prevents the voice the priority of voice
voice VLAN, and packets from being packets based on MAC
discards non-voice forwarded in the voice addresses.
packets from the voice VLAN.
VLAN and forwards If the source MAC
packets from other address matches the
VLANs. OUI, the interface
changes the priority of
voice packets and
allows the voice
packets to be
forwarded in the voice
VLAN.

Nor The inbound interface If the source MAC Transmitting voice and
mal enabled with the voice address does not service data at the
VLAN function match the OUI, the same time in a voice
transmits both voice interface does not VLAN is not
packets and non-voice change the priority of recommended. If a
packets. In normal voice packets and voice VLAN must
mode, the interface is allows the voice transmit both voice
vulnerable to attacks packets to be and service data,
from malicious data forwarded in the voice ensure that the voice
traffic. VLAN. VLAN works in normal
If the source MAC mode.
address matches the
OUI, the interface
changes the priority of
voice packets and
allows the voice
packets to be
forwarded in the voice
VLAN.

Procedure
● Configuring the secure mode
a. Run system-view
The system view is displayed.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 417


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

b. Run interface interface-type interface-number


The interface view is displayed.
c. Run voice-vlan security enable
The voice VLAN is configured to work in secure mode.
By default, a voice VLAN works in normal mode.
● Configuring the normal mode
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run undo voice-vlan security enable
The voice VLAN is configured to work in normal mode.
By default, a voice VLAN works in normal mode.

----End

8.7.6 (Optional) Configuring the 802.1p Priority and DSCP


Priority for a Voice VLAN

Context
By default, the 802.1p priority and DSCP priority for a voice VLAN are 6 and 46
respectively. You can dynamically configure 802.1p priority and DSCP priority to
plan priorities for different voice services.
● The 802.1p priority is indicated by the value in the 3-bit PRI field in each
802.1Q VLAN frame. This field determines the transmission priority for data
packets when a switching device is congested.
● The DSCP value is indicated by the 6 bits in the Type of Service (ToS) field in
the IPv4 packet header. DSCP, as the signaling for DiffServ, is used for QoS
guarantee on IP networks. The traffic controller on the network gateway
takes actions merely based on the information carried by the 6 bits.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run voice-vlan remark { 8021p 8021p-value | dscp dscp-value } *

The 802.1p priority and DSCP priority are configured for a voice VLAN.

By default, the 802.1p priority and DSCP priority for a voice VLAN are 6 and 46
respectively.

----End

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 418


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

8.7.7 Verifying the MAC Address-based Voice VLAN


Configuration
Procedure
● Run the display voice-vlan [ vlan-id ] status command to check information
about a voice VLAN, including the status, working mode, 802.1p priority and
DSCP priority of the voice VLAN, and interface enabled with voice VLAN.
● Run the display voice-vlan oui command to check the organizationally
unique identifier (OUI), OUI mask, and OUI description of the voice VLAN.
----End

8.8 Configuring a VLAN ID-based Voice VLAN


If the VLAN ID in packets received by a switch interface is the same as the voice
VLAN ID, the switch considers the packets as voice packets and increases the
packet priority.

8.8.1 Enabling the Voice VLAN Function


Context
To implement the voice VLAN function, configure the VLAN used to forward voice
packets on the switch as a voice VLAN and enable the voice VLAN function. You
are advised to configure different VLANs for voice and data services to facilitate
management.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.

Step 3 Run voice-vlan vlan-id enable [ include-untagged | include-tag0 ]*


A voice VLAN is configured and the voice VLAN function is enabled on the
interface.
By default, the voice VLAN function is disabled on an interface.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 419


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

NOTE

● VLAN 1 cannot be configured as a voice VLAN.


● To transmit different services, ensure that the voice VLAN and default VLAN on an
interface are different.
● Only one VLAN on an interface can be configured as a voice VLAN at a time.
● The guest VLAN, restrict VLAN, or critical VLAN on an interface cannot be configured as
a voice VLAN.
● A user group VLAN configured using the user-vlan command cannot be specified as a
voice VLAN.
● When a voice VLAN is configured together with VLAN Mapping, VLAN Stacking, or a
Traffic Policy on the same interface, the configurations may not take effect.
● When an IP phone sends packets tagged with VLAN 0, include-tag0 must be specified
on the S6735-S, S6720-EI and S6720S-EI. On other models, include-untagged takes
effect for untagged packets and packets tagged with VLAN 0.
● On the S6735-S, S6720-EI and S6720S-EI, after a VLAN is associated with a BD or VSI
and is specified as a voice VLAN, the VXLAN or MPLS function well not take effect.
● On the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S,
or S6730S-S, after a VLAN is associated with a BD or VSI, if this VLAN needs to be
specified as a voice VLAN, you need to run the lldp tlv-enable med-tlv network-policy
voice-vlan vlan vlan-id [ cos cvalue | dscp dvalue ]* command to configure the voice
VLAN capability of LLDP on an interface.

----End

8.8.2 Configuring a Mode in Which the Priority of Voice


Packets Is Increased Based on VLAN IDs

Context
If the VLAN ID in packets received by a switch interface is the same as the voice
VLAN ID, the switch considers the packets as voice packets and increases the
packet priority.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface interface-type interface-number

The interface view is displayed.

Step 3 Run voice-vlan remark-mode vlan

A mode in which the priority of voice packets is increased is configured.

By default, the priority of voice packets is increased based on VLAN IDs.

----End

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 420


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

8.8.3 Configuring a Mode in Which an Interface Is Added to a


Voice VLAN
Context
When a VLAN ID-based voice VLAN is used, the interface connected to a voice
device must be added to the voice VLAN manually so that the voice VLAN can
take effect.

Procedure
Step 1 Add an interface to a voice VLAN in manual mode according to 4.7.1.1
Configuring Interface-based VLAN Assignment (Statically Configured
Interface Type).

----End

8.8.4 Configuring the Switch to Advertise Voice VLAN


Information to an IP Phone
Context
Generally, IP phones that can send tagged voice packets can obtain voice VLAN
information from the switch using a protocol such as LLDP (LLDP is used as an
example). LLDP needs to be enabled. When the switch receives an LLDPDU from
an IP phone, the switch encapsulates voice VLAN information in the LLDPDU and
sends it to the IP phone. The IP phone then sends tagged voice packets.

The switch can encapsulate voice VLAN information into LLDPDUs and send them
to connected IP phones. However, IP phones of some vendors send Cisco Discovery
Protocol (CDP) packets. You can run the voice-vlan legacy enable command to
enable CDP-compatible function so that the switch encapsulates voice VLAN
information in CDP packets and sends them to connected IP phones.

Procedure
● Configuring the switch to advertise voice VLAN information to an IP phone
through LLDP
a. Run system-view

The system view is displayed.


b. Run lldp enable

LLDP is enabled globally.

By default, LLDP is enabled globally.


c. Run interface interface-type interface-number

The interface view is displayed.


d. Run lldp enable

LLDP is enabled on the interface.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 421


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

After LLDP is enabled in the system view, all interfaces are enabled with
LLDP.
● Configuring Cisco Discovery Protocol (CDP)-compatible Voice VLAN function
a. Run system-view

The system view is displayed.


b. Run interface interface-type interface-number

The interface view is displayed.


c. Run voice-vlan legacy enable

CDP-compatible Voice VLAN function is enabled so that the switch


encapsulates voice VLAN information in CDP packets and sends them to
the IP phone.

By default, CDP-compatible Voice VLAN function is disabled.

----End

8.8.5 (Optional) Configuring the 802.1p Priority and DSCP


Priority for a Voice VLAN

Context
By default, the 802.1p priority and DSCP priority for a voice VLAN are 6 and 46
respectively. You can dynamically configure 802.1p priority and DSCP priority to
plan priorities for different voice services.
● The 802.1p priority is indicated by the value in the 3-bit PRI field in each
802.1Q VLAN frame. This field determines the transmission priority for data
packets when a switching device is congested.
● The DSCP value is indicated by the 6 bits in the Type of Service (ToS) field in
the IPv4 packet header. DSCP, as the signaling for DiffServ, is used for QoS
guarantee on IP networks. The traffic controller on the network gateway
takes actions merely based on the information carried by the 6 bits.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run voice-vlan remark { 8021p 8021p-value | dscp dscp-value } *

The 802.1p priority and DSCP priority are configured for a voice VLAN.

By default, the 802.1p priority and DSCP priority for a voice VLAN are 6 and 46
respectively.

----End

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 422


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

8.8.6 Verifying the VLAN ID-based Voice VLAN Configuration


Procedure
● Run the display voice-vlan [ vlan-id ] status command to check information
about a voice VLAN, including the status, 802.1p priority and DSCP priority of
the voice VLAN, and interface enabled with voice VLAN.
----End

8.9 Configuration Examples for Voice VLANs

8.9.1 Example for Configuring a MAC Address-based Voice


VLAN (IP Phones Send Untagged Voice Packets)
Networking Requirements
As shown in Figure 8-6, the switch connects to IP phones and a PC. The switch
uses VLAN 2 to transmit voice packets and VLAN 3 to transmit data packets. PC A
connects to IP phone A and they connect to the switch, and IP phone B separately
connects to the switch. IP phones send untagged voice packets. Users require high
quality of the VoIP service; therefore, voice data flows must be transmitted with a
high priority to ensure the call quality.

Figure 8-6 Networking for configuring a MAC address-based voice VLAN

Configuration Roadmap
Because voice and data packets received by the switch are untagged, you need to
configure OUIs to differentiate voice and data traffic. The configuration roadmap
is as follows:
1. Create VLANs on the switch and add interfaces to VLANs to implement Layer
2 connectivity.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 423


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

2. Configure an OUI so that the switch adds a VLAN tag to voice packets in
which the source MAC address matches the OUI.
3. Configure VLAN 2 as the voice VLAN and configure the interface to allow
voice packets to pass through.

Procedure
Step 1 Configure VLANs and interfaces on the Switch.
# Create VLANs.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 2 3

# Configure VLANs allowed by GE0/0/1.


[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] port link-type hybrid
[Switch-GigabitEthernet0/0/1] port hybrid pvid vlan 3
[Switch-GigabitEthernet0/0/1] port hybrid untagged vlan 2 to 3
[Switch-GigabitEthernet0/0/1] quit
[Switch] interface gigabitethernet 0/0/2
[Switch-GigabitEthernet0/0/2] port link-type hybrid
[Switch-GigabitEthernet0/0/2] port hybrid untagged vlan 2
[Switch-GigabitEthernet0/0/2] quit

Step 2 Configure an OUI.


[Switch] voice-vlan mac-address 00e0-fc00-0000 mask ffff-ff00-0000

Step 3 # Enable the voice VLAN function on GE0/0/1. The configuration of GE0/0/2 is
similar to the configuration of GE0/0/1, and is not mentioned here.
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] voice-vlan 2 enable include-untagged
[Switch-GigabitEthernet0/0/1] voice-vlan remark-mode mac-address
[Switch-GigabitEthernet0/0/1] quit

Step 4 Verify the configuration.


Run the display voice-vlan 2 status command to check the voice VLAN
configuration.
[Switch] display voice-vlan 2 status
Voice VLAN Configurations:
-----------------------------------------------------------
Voice VLAN ID :2
Voice VLAN status : Enable
Voice VLAN 8021p remark : 6
Voice VLAN dscp remark : 46
-----------------------------------------------------------
Port Information:
-------------------------------------------------------------------------------
Port Add-Mode Security-Mode Legacy PribyVLAN Untag
-------------------------------------------------------------------------------
GigabitEthernet0/0/2 Manual Normal Disable Disable Enable
GigabitEthernet0/0/1 Manual Normal Disable Disable Enable

----End

Configuration Files
Switch configuration file
#
sysname Switch

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 424


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

#
voice-vlan mac-address 00e0-fc00-0000 mask ffff-ff00-0000
#
vlan batch 2 to 3
#
interface GigabitEthernet0/0/1
port link-type hybrid
voice-vlan 2 enable include-untagged
voice-vlan remark-mode mac-address
port hybrid pvid vlan 3
port hybrid untagged vlan 2 to 3
#
interface GigabitEthernet0/0/2
port link-type hybrid
voice-vlan 2 enable include-untagged
voice-vlan remark-mode mac-address
port hybrid untagged vlan 2
#
return

8.9.2 Example for Configuring a VLAN ID-based Voice VLAN


(IP Phones Send Tagged Voice Packets)
Networking Requirements
As shown in Figure 8-7, the switch connects to IP phones and a PC. The switch
uses VLAN 2 to transmit voice packets and VLAN 3 to transmit data packets. PC A
connects to IP phone A and they connect to the switch, and IP phone B separately
connects to the switch. IP phones can obtain voice VLAN information through
LLDP and send tagged voice packets. Users require high quality of the VoIP
service; therefore, voice data flows must be transmitted with a high priority to
ensure the call quality. In addition, the administrator manages many IP phones
and requires simplified configurations.

Figure 8-7 Networking for configuring a VLAN ID-based voice VLAN

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 425


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on the switch and add interfaces to VLANs to implement Layer
2 connectivity.
2. Enable LLDP so that IP phones can obtain voice VLAN information through
LLDP.
3. Configure VLAN 2 as the voice VLAN and configure the interface to allow
voice packets to pass through. Configure a VLAN ID-based voice VLAN, which
relieves you from configuring OUIs.

Procedure
Step 1 Configure VLANs and interfaces on the Switch.

# Create VLANs.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 2 3

# Configure VLANs allowed by GE0/0/1.


[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] port link-type hybrid
[Switch-GigabitEthernet0/0/1] port hybrid pvid vlan 3
[Switch-GigabitEthernet0/0/1] port hybrid untagged vlan 3
[Switch-GigabitEthernet0/0/1] port hybrid tagged vlan 2
[Switch-GigabitEthernet0/0/1] quit
[Switch] interface gigabitethernet 0/0/2
[Switch-GigabitEthernet0/0/2] port link-type hybrid
[Switch-GigabitEthernet0/0/2] port hybrid tagged vlan 2
[Switch-GigabitEthernet0/0/2] quit

Step 2 Enable LLDP.


[Switch] lldp enable

Step 3 # Enable the voice VLAN function on GE0/0/1. The configuration of GE0/0/2 is
similar to the configuration of GE0/0/1, and is not mentioned here.
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] voice-vlan 2 enable
[Switch-GigabitEthernet0/0/1] voice-vlan remark-mode vlan
[Switch-GigabitEthernet0/0/1] quit

Step 4 Verify the configuration.

Run the display voice-vlan 2 status command to check the voice VLAN
configuration.
[Switch] display voice-vlan 2 status
Voice VLAN Configurations:
-----------------------------------------------------------
Voice VLAN ID :2
Voice VLAN status : Enable
Voice VLAN 8021p remark : 6
Voice VLAN dscp remark : 46
-----------------------------------------------------------
Port Information:
-------------------------------------------------------------------------------
Port Add-Mode Security-Mode Legacy PribyVLAN Untag
-------------------------------------------------------------------------------

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 426


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration

GigabitEthernet0/0/2 Manual Normal Disable Enable Disable


GigabitEthernet0/0/1 Manual Normal Disable Enable Disable

----End

Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 2 to 3
#
lldp enable
#
interface GigabitEthernet0/0/1
port link-type hybrid
voice-vlan 2 enable
port hybrid pvid vlan 3
port hybrid tagged vlan 2
port hybrid untagged vlan 3
#
interface GigabitEthernet0/0/2
port link-type hybrid
voice-vlan 2 enable
port hybrid tagged vlan 2
#
return

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 427

You might also like