01-09 Voice VLAN Configuration
01-09 Voice VLAN Configuration
Switches
Configuration Guide - Ethernet Switching 9 Voice VLAN Configuration
This chapter describes how to configure voice VLAN. A voice VLAN changes the
priority of voice data packets to improve voice data transmission quality.
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.
Network
PC IP Phone Switch
Figure 9-2 shows another connection mode, in which only an IP phone connects
to a switch interface.
Network
IP Phone 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.
Network
PC IP Phone Switch
voice VLAN is configured, the IP phone must be able to obtain voice VLAN
information from the switch.
LLDP is one of multiple methods in which an IP phone can obtain voice VLAN
information from a switch.
Network
PC IP phone Switch
1 Send an LLDPDU
IP Phone A
IP Phone C
IP Phone B
PC A PC C
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.
Licensing Requirements
Voice VLAN configuration commands are available only after the S1720GW,
S1720GWR, and S1720X have the license (WEB management to full management
Electronic RTU License) loaded and activated and the switches are restarted. Voice
VLAN configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S2710SI V100R006(C03&C05)
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
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.
● 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 automatic mode is not supported on the S5720HI.
● 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.
● When the remark (user group view) and voice-vlan remark commands are
used together to modify the user packet priority, if the services conflict:
– For S5720HI, the priority configured using the remark (user group view)
command takes effect.
– For S5720EI, S6720EI, and S6720S-EI, the priority configured using the
voice-vlan remark command takes effect.
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. You are
advised to configure different VLANs for voice and data services to facilitate
management.
Procedure
Step 1 Run system-view
A voice VLAN is configured and the voice VLAN function is enabled on the
interface.
NOTE
----End
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
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 S5720HI, S5720EI, S6720EI, and S6720S-EI support a maximum of 100
OUIs. When the switch is configured with 100 OUIs, subsequent
----End
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
Step 5 (Optional) Add an interface to a voice VLAN in manual mode according to 5.7.1
Configuring Interface-based VLAN Assignment (Statically Configured
Interface Type).
----End
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.
----End
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 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
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
NOTE
----End
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
----End
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 5.7.1 Configuring
Interface-based VLAN Assignment (Statically Configured Interface Type).
----End
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
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
Procedure
Step 1 Run system-view
The system view is displayed.
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
Networking Requirements
As shown in Figure 9-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.
Internet
GE0/0/1 GE0/0/2
IP Phone A GE0/0/1
MAC:0003-6B00-0001
Mask:ffff-ff00-0000
IP Phone C
IP Phone B
MAC:0003-6B00-0002
Mask:ffff-ff00-0000
PC A PC C
286E-D400-0001
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.
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
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
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
voice-vlan mac-address 0003-6b00-0000 mask ffff-ff00-0000
#
vlan batch 2 to 3
#
interface GigabitEthernet0/0/1
Networking Requirements
As shown in Figure 9-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.
Internet
GE0/0/1 GE0/0/2
GE0/0/1
IP Phone A
IP Phone C
IP Phone B
PC A PC C
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
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
----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