Professional Documents
Culture Documents
01-08 Voice VLAN Configuration
01-08 Voice VLAN Configuration
Switches
Configuration Guide - Ethernet Switching 8 Voice VLAN Configuration
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.
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.
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.
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
The voice VLAN is a basic feature of a switch and is not under license control.
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.
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
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
----End
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 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
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.
● 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
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
Context
Based on the data filtering mechanism, a voice VLAN works in either secure or
normal mode.
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
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
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
----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
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 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
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
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
-------------------------------------------------------------------------------
----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