No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

S1720, S2700, S5700, and S6720 V200R011C10

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Voice VLAN Configuration Commands

Voice VLAN Configuration Commands

Command Support

Commands provided in this section and all the parameters in the commands are supported by all switch models by default, unless otherwise specified. For details, see specific commands.

display voice-vlan oui

Function

The display voice-vlan oui command displays the OUI address and OUI attributes of a voice VLAN.

Format

display voice-vlan oui

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

This command displays the OUI address, OUI mask, and OUI description of the voice VLAN.

Example

# Display the OUI address of the voice VLAN.

<HUAWEI> display voice-vlan oui
---------------------------------------------------
OuiAddress       Mask             Description
---------------------------------------------------
0022-3300-0000   ffff-ff00-0000   PhoneA
0011-2200-0000   ffff-ff00-0000   PhoneB
Table 5-60  Description of the display voice-vlan oui command output

Item

Description

OuiAddress

OUI address of the packets that can pass through the device. You can run the voice-vlan mac-address command to configure the OUI address.

Mask

OUI mask of the packets that can pass through the device.

To specify the parameter, run the voice-vlan mac-address command.

Description

Description of the OUI address.

To specify the parameter, run the voice-vlan mac-address command.

display voice-vlan status

Function

The display voice-vlan status command displays information about the current voice VLAN.

Format

display voice-vlan [ vlan-id ] status

Parameters

Parameter

Description

Value

vlan-id

Displays information about a specified voice VLAN. If vlan-id is not specified, information about all voice VLANs is displayed.

The value is an integer that ranges from 2 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After the voice VLAN function is enabled, you can run the display voice-vlan status command to check the voice VLAN configuration.

Example

# Display information about the current voice VLAN, such as the working status, secure mode, the 802.1p priority, DSCP value, and information about an interface that is enabled with voice VLAN.

<HUAWEI> display voice-vlan 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   Tag0                                                           
-------------------------------------------------------------------------------                                                     
GE0/0/4          Manual    Normal         Disable Enable     Disable Disable 
Table 5-61  Description of the display voice-vlan status command output

Item

Description

Voice VLAN ID

ID of the voice VLAN.

Voice VLAN status

Status of the voice VLAN function. The value can be:
  • Enable
  • Disable
You can run the voice-vlan enable command to configure the voice VLAN status.

Voice VLAN 8021p remark

802.1p priority of the voice VLAN. You can run the voice-vlan remark command to configure the 802.1p priority of the voice VLAN.

Voice VLAN dscp remark

DSCP value of the voice VLAN. You can run the voice-vlan remark command to configure the DSCP value of the voice VLAN.

Port

Number of the interface on which the voice VLAN function is enabled.

Add-Mode

Working mode of the voice VLAN. The value can be:
  • Manual: indicates the manual mode.
  • Auto: indicates the automatic mode.
You can run the voice-vlan mode command to configure the working mode of the voice VLAN.

Security-Mode

Security mode of the voice VLAN on the interface. The value can be:

  • Security: indicates the secure mode.
  • Normal: indicates the normal mode.
You can run the voice-vlan security enable command to configure the secure mode of the voice VLAN.

Legacy

Whether the interface can communicate with voice devices of other vendors. The value can be:

  • Enable: indicates that the interface can communicate with voice devices of other vendors.
  • Disable: indicates that the interface cannot communicate with voice devices of other vendors.
You can run the voice-vlan legacy enable command to enable an interface to communicate with voice devices of other vendors.

PribyVLAN

Whether the interface increases the priority of voice packets based on VLAN IDs
  • Enable: The priority of voice packets is increased based on VLAN IDs.

  • Disable: The priority of voice packets is increased based on MAC addresses.

To specify the parameter, run the voice-vlan remark-mode command.

Untag

Whether the interface adds voice VLAN IDs to untagged packets
  • Enable: The interface adds voice VLAN IDs to untagged packets.

  • Disable: The interface adds PVID to untagged packets.

To specify the parameter, run the voice-vlan enable command.

Tag0

Whether the interface changes VLAN 0 in packets to the voice VLAN ID:
  • Enable: The interface changes VLAN 0 in packets to the voice VLAN ID.

  • Disable: The interface changes VLAN 0 in packets to the PVID of the interface.

To specify the parameter, run the voice-vlan enable command.

NOTE:

Only the S5720EI, S6720EI, and S6720S-EI support this parameter.

voice-vlan enable

Function

The voice-vlan enable command configures the specified VLAN as a voice VLAN and enables the voice VLAN function.

The undo voice-vlan enable command disables the voice VLAN function.

By default, the voice VLAN function is disabled on an interface.

Format

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

undo voice-vlan enable (port group view)

undo voice-vlan [ vlan-id ] enable (other interface views except the port group view)

NOTE:

Only the S5720EI, S6720EI, and S6720S-EI support include-tag0.

Parameters

Parameter

Description

Value

vlan-id

Configures a specified VLAN as a voice VLAN.

The value is an integer that ranges from 2 to 4094.

include-untagged Adds voice VLAN IDs to untagged packets. When an interface receives untagged packets, the interface determines whether to add voice VLAN tags according to the OUI address configured by the voice-vlan mac-address. When IP phones sends untagged voice packets, this parameter is mandatory. -
include-tag0 Changes VLAN 0 in packets to the voice VLAN ID. When an interface receives packets tagged with VLAN 0, the interface checks whether the packets match the OUI configured by the voice-vlan mac-address command and determines whether to change the VLAN ID in packets. When IP phones send packets tagged with VLAN 0, this parameter is mandatory. -

Views

GE interface view, Ethernet interface view, XGE interface view, 40GE interface view, MultiGE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After voice VLAN is enabled, based on the mode in which the priority of voice packets is increased by the voice-vlan remark-mode command, the device increases the priority of voice packets according to the VLAN or MAC address to ensure that voice packets are sent first.

Precautions

  • If the voice VLAN configured on an interface works in automatic mode, you need to run the port link-type command to set the interface type to trunk, or hybrid.
  • To ensure normal transmission of different services, assign different VLAN IDs to the voice VLAN and default VLAN on the interface.
  • At a time, only one VLAN can be configured as the voice VLAN on an interface.
  • Dot1q-tunnel interfaces do not support voice VLAN.
  • include-untagged is valid for both untagged packets and packets tagged with VLAN 0 on the S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2720EI, S5700LI, S5700S-LI, S5720LI, S5720S-LI, S6720LI, S6720S-LI, S5710-X-LI, S2750EI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720S-SI, S5720SI, and S5720HI. On other models, include-untagged is valid for only untagged packets. If the voice VLAN is valid for packets tagged with VLAN 0, include-untagged and include-tag0 must be configured.
  • If a VLAN is associated with a BD, it cannot be configured as a voice VLAN.

Example

# Configure VLAN 2 as a voice VLAN and enable the voice VLAN function on GigabitEthernet 0/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] voice-vlan 2 enable

voice-vlan legacy enable

Function

The voice-vlan legacy enable command enables CDP-compatible Voice VLAN function so that the switch encapsulates voice VLAN information in CDP packets and sends them to connected IP phones.

The undo voice-vlan legacy enable command disables CDP-compatible Voice VLAN function.

By default, CDP-compatible function is disabled.

Format

voice-vlan legacy enable

undo voice-vlan legacy enable

Parameters

None

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, MultiGE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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.

Prerequisites

The voice VLAN function has been enabled using the voice-vlan enable command.

Example

# Enable CDP-compatible Voice VLAN function on GE0/0/1.

<HUAWEI> system-view
[HUAWEI] interface GigabitEthernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] voice-vlan 10 enable
[HUAWEI-GigabitEthernet0/0/1] voice-vlan legacy enable

voice-vlan mac-address

Function

The voice-vlan mac-address command sets the OUI address of the voice VLAN.

The undo voice-vlan mac-address command cancels the setting of the OUI address.

By default, no OUI address is set.

Format

voice-vlan mac-address mac-address mask oui-mask [ description text ]

undo voice-vlan mac-address { mac-address | all }

Parameters

Parameter

Description

Value

mac-address

Specifies the OUI address of voice packets that can be transmitted in the voice VLAN.

The value is in the format of H-H-H. H is a hexadecimal number that contains 1 to 4 digits, such as 00e0 and fc01. The address cannot be all 0s, multicast address, or broadcast address.

mask oui-mask

Specifies the mask of the OUI address.

The value is in the format of H-H-H. H is a 4-digit hexadecimal number that can be f or 0. The value in binary notation must start with consecutive 1s and end with consecutive 0s.

description text

Indicates the description of the OUI address.

The value is a string of 1 to 80 case-sensitive characters, spaces supported.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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.

Precautions

  • The mac-address value cannot be all 0s or a multicast 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 configurations will not take effect. Other models support a maximum of 16 OUIs. When the switch is configured with 16 OUIs, subsequent configurations will not take effect.

When you run the undo voice-vlan mac-address command to delete an OUI MAC address, set mac-address to the result of the logical AND operation between the OUI and the OUI mask that you set.

Example

# Allow the voice packets coming from Phone A, an IP phone, to be identified by the voice VLAN. The MAC address of Phone A is 1234-1234-1234 and the OUI mask address is ffff-ff00-0000.

<HUAWEI> system-view
[HUAWEI] voice-vlan mac-address 1234-1234-1234 mask ffff-ff00-0000 description PhoneA

voice-vlan mode

Function

The voice-vlan mode command sets the working mode of the voice VLAN on an interface.

The undo voice-vlan mode command restores the mode in which an interface is added to a voice VLAN to the default.

By default, the voice VLAN of an interface works in manual mode.

NOTE:

S5720HI does not support this configuration.

Format

voice-vlan mode { auto | manual }

undo voice-vlan mode { auto | manual }

Parameters

Parameter

Description

Value

auto

Indicates the automatic mode of the voice VLAN.

The automatic mode of the voice VLAN is not supported on the negotiation-auto or negotiation-desirable port.

-

manual

Indicates the manual mode of the voice VLAN.

-

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, MultiGE interface view, Eth-Trunk interface view, port group view

NOTE:

The undo voice-vlan mode manual command is not supported in the port group view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Ports can be added to a voice VLAN in either of the following modes:
  • Automatic mode

    A voice VLAN-enabled port learns source MAC addresses of frames from voice devices, adds ports connecting the device to voice devices to a voice VLAN.

    In auto mode, you cannot manually add ports to a voice VLAN.

    NOTE:

    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.

  • Manual mode

    After the voice VLAN function is enabled, ports connected to voice devices must be manually added to a voice VLAN. Otherwise, the voice VLAN function does not take effect.

Pre-configuration Tasks

Voice VLAN has been enabled using the voice-vlan enable command.

Run the voice-vlan remark-mode mac-address command to increase the priority of voice packets based on MAC addresses.

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.

Precautions

The working mode of the voice VLAN on an interface does not affect the working mode of the voice VLAN on another interface. That is, voice VLANs on different interfaces can adopt different working modes.

Example

# On GE0/0/1, configure the voice VLAN to work in manual mode.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-type hybrid
[HUAWEI-GigabitEthernet0/0/1] voice-vlan 10 enable
[HUAWEI-GigabitEthernet0/0/1] voice-vlan remark-mode mac-address
[HUAWEI-GigabitEthernet0/0/1] voice-vlan mode manual

voice-vlan remark

Function

The voice-vlan remark command changes the 802.1p priority and DSCP value for a voice VLAN.

The undo voice-vlan remark command restores the 802.1p priority and DSCP value to their default values for a voice VLAN.

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

Format

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

undo voice-vlan remark { 8021p | dscp } *

Parameters

Parameter Description Value
8021p 8021p-value

Specifies the 802.1p priority.

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 value is an integer that ranges from 0 to 7. The default value 6. The larger the value, the higher the priority.
dscp dscp-value

Specify the DSCP value.

The DSCP value is indicated by the 6 bits in the 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.

The value is an integer that ranges from 0 to 63. The default value is 46.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When voice VLAN is deployed on a network, voice service must be transmitted with a shorter delay than data service. Therefore, voice data packets need to be transmitted with a higher priority than other service data packets to reduce the transmission delay. You can run the voice-vlan remark command to change the 802.1p and DSCP priorities of a voice VLAN to allow voice data packets to be transmitted with a high priority.

Precautions

The voice-vlan vlan-id enable command has been run on an interface to specify a VLAN as a voice VLAN, and the voice VLAN function has been enabled on the interface.

If the voice-vlan remark command has been run multiple times, the last configuration overrides the previous configurations.

Example

# Set the DSCP value for a voice VLAN to 20.

<HUAWEI> system-view
[HUAWEI] voice-vlan remark dscp 20

voice-vlan remark-mode

Function

The voice-vlan remark-mode command configures a mode to increase the priority of voice packets.

The undo voice-vlan remark-mode command restores the default configuration.

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

Format

voice-vlan remark-mode { vlan | mac-address }

undo voice-vlan remark-mode

Parameters

Parameter Description Value
vlan Specifies that the priority of voice packets is increased based on VLAN IDs. -
mac-address Specifies that the priority of voice packets is increased based on MAC addresses. -

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, MultiGE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After voice VLAN is enabled on an interface, the device determines whether a data flow consists of voice packets based on the VLAN ID by default. In this situation, even if you do not run the voice-vlan mac-address command to configure the OUI of the voice VLAN, you can use the voice VLAN function. Therefore, the voice VLAN configuration is more flexible and simple. Specifically, you can configure voice VLAN in the following methods:
  • If you want to increase the priority of voice packets based on MAC addresses, run the voice-vlan remark-mode mac-address and voice-vlan mac-address commands.

  • If you want to increase the priority of voice packets based on VLAN IDs, run the voice-vlan remark-mode vlan command.

Prerequisites

Voice VLAN has been enabled on the interface using the voice-vlan enable command.

Example

# Configure GE0/0/1 to increase the priority of voice packets based on MAC addresses.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] voice-vlan remark-mode mac-address

voice-vlan security enable

Function

The voice-vlan security enable command enables the secure mode of the voice VLAN.

The undo voice-vlan security enable command disables the secure mode of the voice VLAN.

By default, the secure mode of the voice VLAN is disabled.

Format

voice-vlan security enable

undo voice-vlan security enable

Parameters

None

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, MultiGE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Based on the data filtering mechanism, a voice VLAN works in either secure or normal mode:
  • Secure mode

    A voice VLAN-enabled inbound port transmits only frames of which the source MAC addresses match OUIs configured on the device, discards the voice data not belong to the current voice VLAN and the other data can be forwarded normally.

    The secure mode prevents a voice VLAN from being attacked by malicious data flows, but consumes system resources to check frames.

    NOTE:

    The secure 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.

  • Normal mode

    A voice VLAN-enabled inbound port transmits both voice and non-voice data. The port does not compare source MAC addresses in received frames with configured OUIs, exposing a voice VLAN to malicious attacks.

Pre-configuration Tasks

Voice VLAN has been enabled using the voice-vlan enable command.

Run the voice-vlan remark-mode mac-address command to increase the priority of voice packets based on MAC addresses.

Precautions

When a voice VLAN works in secure mode, only voice packets in the VLAN can be transmitted in the voice VLAN.

To allow both voice packets and data packets to be transmitted in the voice VLAN, configure the voice VLAN to work in normal mode.

Example

# Disable the secure mode of the voice VLAN on GigabitEthernet 0/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] voice-vlan remark-mode mac-address
[HUAWEI-GigabitEthernet0/0/1] undo voice-vlan security enable
Translation
Download
Updated: 2019-10-09

Document ID: EDOC1000178165

Views: 47411

Downloads: 1159

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next