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

AR500, AR510, and AR530 V200R007

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).
VLAN Configuration Commands

VLAN Configuration Commands

NOTE:
  • AR502G-L-D-H and AR502GR-L-D-H do not support VLAN technology.

  • AR510 series do not support VLAN technology.

  • AR500 series (except AR509G-L-D-H, and AR509GW-L-D-H) do not support Super VLAN.

  • AR510 series do not support Super VLAN.

8021q protocol

Function

The 8021q protocol command changes the Tag Protocol Identifier (TPID) in an 802.1Q frame. The TPID specifies the protocol type in a VLAN tag.

The undo 8021q protocol command restores the default TPID in an 802.1Q frame.

By default, the TPID in an 802.1Q frame is 0x8100.

Format

8021q protocol protocol-id

undo 8021q protocol

Parameters

Parameter

Description

Value

protocol-id

Specifies the TPID in an 802.1Q frame.

The value is a hexadecimal integer that ranges from 0x600 to 0xFFFF.

Views

Ethernet interface view, GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Devices from different vendors or in different network plans may use different values of TPID fields in VLAN tags of VLAN packets. When the TPID on the remote device is not 0x8100 and devices need to communicate, run the 8021q protocol command to change the TPID to be the same as that on the remote device. The TPID in VLAN packets received and sent by a device interface is changed to be the configured TPID so that devices can communicate.

Precautions

The 8021q protocol command can be executed on only Layer 3 Ethernet and GE interfaces.

The 8021q protocol command is valid for only tagged VLAN packets.

The TPID value specified by the 8021q protocol command must be different from TPID values of specific protocols. Otherwise, the interface cannot correctly classify protocol packets. The TPID value cannot be any of the values in the following table.

Table 5-23  Description of protocol types and values

Protocol Type

Value

ARP

0x0806

RARP

0x8035

IP

0x0800

IPv6

0x86DD

PPPoE

0x8863/0x8864

MPLS

0x8847/0x8848

IPX/SPX

0x8137

LACP

0x8809

802.1x

0x888E

HGMP

0x88A7

Reserved

0xFFFD/0xFFFE/0xFFFF

Example

# Set the TPID in a VLAN tag on GE1/0/0 to 0x9100.

<Huawei> system-view
[Huawei] interface gigabitethernet 1/0/0
[Huawei-GigabitEthernet1/0/0] 8021q protocol 9100

access-vlan

Function

The access-vlan command adds one or more sub-VLANs to a super-VLAN.

The undo access-vlan command removes one or more sub-VLANs from a super-VLAN.

By default, no sub-VLAN is added to the super-VLAN.

Format

access-vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>

undo access-vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>

Parameters

Parameter

Description

Value

vlan-id1 [ to vlan-id2 ]

Specifies a range of sub-VLAN IDs.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. The value of vlan-id2 must be greater than or equal to the value of vlan-id1. If to vlan-id2 is not specified, only one VLAN is added to the super-VLAN.

You can specify a maximum of 10 VLAN ID ranges at a time. The ranges cannot overlap.

  • The value of vlan-id1 is an integer that ranges from 1 to 4094.
  • The value of vlan-id2 is an integer that ranges from 1 to 4094.

Each super-VLAN supports 8 sub-VLANs.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The VLAN technology is widely applied to packet switching networks because it controls broadcast domains flexibly and is easy to deploy. Generally, a Layer 3 switch usually uses a Layer 3 logical interface in each VLAN to allow user hosts in different broadcast domains to communicate. This wastes IP addresses. The VLAN aggregation function is introduced to save IP addresses while implementing communication between VLANs.

The VLAN aggregation function associates a super-VLAN with multiple sub-VLANs. A VLANIF interface can be created in the super-VLAN and be configured with an IP address. Interfaces in all the sub-VLANs use this IP address as the gateway address to communicate with interfaces in other VLANs. This reduces subnet IDs, subnet default gateway addresses, and subnet broadcast IP addresses. In a word, the VLAN aggregation function allows different broadcast domains to use the same subnet address, implements flexible addressing, and saves IP addresses.

Prerequisites

The sub-VLANs to be added to the super-VLAN have been created.

The super-VLAN has been configured using the aggregate vlan command.

Before running the access-vlan command, delete VLANIF interfaces from all the sub-VLANs.

Follow-up Procedure

Configure the sub-VLANs to implement Layer 2 communication between them.

Precautions

The super-VLAN must be different from all its sub-VLANs.

A VLAN can be added to only one super-VLAN.

If you run the access-vlan command multiple times in the same VLAN view, all the specified VLANs are added to the super-VLAN.

Example

# Add sub-VLAN20 and sub-VLAN30 to super-VLAN2.

<Huawei> system-view
[Huawei] vlan 2
[Huawei-vlan2] aggregate-vlan
[Huawei-vlan2] access-vlan 20 30

aggregate-vlan

Function

The aggregate-vlan command configures a VLAN as a super-VLAN.

The undo aggregate-vlan command cancels the configuration.

By default, no VLAN is configured as a super-VLAN.

Format

aggregate-vlan

undo aggregate-vlan

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The VLAN technology is widely applied to packet switching networks because it controls broadcast domains flexibly and is easy to deploy. Generally, a Layer 3 switch usually uses a Layer 3 logical interface in each VLAN to allow user hosts in different broadcast domains to communicate. This wastes IP addresses. The VLAN aggregation function is introduced to save IP addresses while implementing communication between VLANs.

The VLAN aggregation function associates a super-VLAN with multiple sub-VLANs. A VLANIF interface can be created in the super-VLAN and be configured with an IP address. Interfaces in all the sub-VLANs use this IP address as the gateway address to communicate with interfaces in other VLANs. This reduces subnet IDs, subnet default gateway addresses, and subnet broadcast IP addresses. In a word, the VLAN aggregation function allows different broadcast domains to use the same subnet address, implements flexible addressing, and saves IP addresses.

Prerequisites

Before configuring a VLAN as a super-VLAN, delete all physical interfaces from the VLAN.

Precautions

VLAN 1 cannot be configured as a super-VLAN.

If a VLAN has been configured as a guest VLAN, it cannot be configured as a super-VLAN.

The super-VLAN must be different from all its sub-VLANs.

After a VLAN is configured as a super-VLAN, no physical interface can be added to the VLAN.

Example

# Configure VLAN 2 as a Super-VLAN.

<Huawei> system-view
[Huawei] vlan 2
[Huawei-vlan2] aggregate-vlan
Related Topics

bandwidth (VLANIF interface view)

Function

The bandwidth command sets the bandwidth of a VLANIF interface.

The undo bandwidth command deletes the configured bandwidth of a VLANIF interface.

By default, the bandwidth of a VLANIF interface is not configured.

Format

bandwidth bandwidth

undo bandwidth

Parameters

Parameter Description Value
bandwidth Specifies the bandwidth of a VLANIF interface. The value is an integer ranges from 1 to 1000000, in Mbit/s.

Views

VLANIF interface view

Default Level

2: Configuration level

Usage Guidelines

The bandwidth command ensures that the network management station (NMS) can obtain the bandwidth of a VLANIF interface. The NMS can check the interface bandwidth through ifSpeed and ifHighSpeed in IF-MIB.
  • If the configured bandwidth is smaller than 4000 Mbit/s, ifSpeed and ifHighSpeed are respectively displayed as bandwidth x 1000 x 1000 and bandwidth.
  • If the configured bandwidth is equal to or larger than 4000 Mbit/s, ifSpeed and ifHighSpeed are respectively displayed as 4294967295 (0XFFFFFFFF) and bandwidth.

Example

# Set the bandwidth of VLANIF 2 to 10000 Mbit/s.

<Huawei> system-view
[Huawei] vlan 2
[Huawei-vlan2] quit
[Huawei] interface vlanif 2
[Huawei-Vlanif2] bandwidth 10000

damping time

Function

The damping time command sets the VLAN damping time on a VLANIF interface, that is, the delay before reporting a VLAN Down event to the VLANIF interface.

The undo damping time command restores the default dumping time.

The default damping time on a VLANIF interface is 0 seconds. That is, the VLANIF interface is notified immediately after the VLAN becomes Down.

Format

damping time delay-time

undo damping time

Parameters

Parameter

Description

Value

delay-time

Specifies the delay before reporting the VLAN Down event to a VLANIF interface.

The value ranges from 0 to 20, in seconds. The default value is 0.

Views

VLANIF interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Software upgrade or active/standby switchover on the industrial switch router may cause frequent status changes on VLANIF interfaces. To prevent network flapping, run the damping time command on VLANIF interfaces to configure the VLAN damping function.

When all interfaces in a VLAN become Down, the industrial switch router waits for a period specified by delay-time and then reports the VLAN Down event to the VLANIF interface.

Precautions

If any interface in the VLAN becomes Up within the delay time, the VLANIF interface remains Up.

You can use the display interface vlanif command to view the VLAN damping time.

If you run the damping time command multiple times in the same VLANIF interface view, only the latest configuration takes effect.

Example

# Set the VLAN damping time on VLANIF 10 to 10 seconds.

<Huawei> system-view
[Huawei] vlan 10
[Huawei-vlan10] quit
[Huawei] interface vlanif 10
[Huawei-Vlanif10] damping time 10

description (VLAN view)

Function

The description command sets the description of a VLAN.

The undo description command restores the default description of a VLAN.

By default, the description of a VLAN shows the VLAN ID. For example, the description of VLAN 2 is "VLAN 0002".

Format

description description

undo description

Parameters

Parameter

Description

Value

description

Specifies the description of a VLAN.

It is a string of 1 to 80 characters. The characters are case sensitive. Spaces are allowed.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The description command is used to set the description of a VLAN, which is convenient for identifying, memorizing, and maintaining the VLAN.

The display vlan vlan-id verbose command can display the description of a specified VLAN.

Precautions

Set different descriptions for VLANs to distinguish.

If you run the description command multiple times in the same VLAN view, only the last configuration takes effect.

Example

# Set the description of VLAN 2 as "Huawei".

<Huawei> system-view
[Huawei] vlan 2
[Huawei-vlan2] description Huawei
Related Topics

description (VLANIF interface view)

Function

The description command set the description of a VLANIF interface.

The undo description command restores the default description of a VLANIF interface.

By default, the description of a VLANIF interface is in "HUAWEI, AR Series, Vlanif2 Interface" format.

Format

description description

undo description

Parameters

Parameter

Description

Value

description

Specifies the description of a VLANIF interface.

It is a string of 1 to 242 characters. The characters are case sensitive. Spaces are allowed.

Views

VLANIF interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To manage VLANIF interfaces conveniently, use the description command to set VLANIF interface descriptions. The description of a VLANIF interface helps you identify the VLANIF interface and know its functions.

You can use the display interface vlanif command to view the description of a VLANIF interface.

Precautions

The description of a VLANIF interface should provide useful information.

Set different descriptions for VLANIF interfaces to distinguish VLANIF interfaces.

If you run the description command multiple times in the same VLANIF interface view, only the latest configuration takes effect.

Example

# Set the description of VLANIF 2 to Huawei.

<Huawei> system-view
[Huawei] vlan 2
[Huawei-vlan2] quit
[Huawei] interface vlanif 2
[Huawei-Vlanif2] description Huawei

display interface vlanif

Function

The display interface vlanif command displays the status and configuration of a VLANIF interface.

Format

display interface vlanif [ vlan-id | main ]

Parameters

Parameter

Description

Value

vlan-id

Specifies the ID of a VLAN.

The value is an integer and the value range depends on the range of existing VLANIF interfaces. You can enter the question mark (?) to obtain the range of VLAN IDs.

main

Displays status and traffic statistics about a VLANIF interface.

A VLANIF interface has no sub-interfaces. Status and traffic statistics about a VLANIF interface are displayed whether you specify the main parameter or not.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

To monitor an interface or locate an interface fault, you can use the display interface vlanif command to view the interface status, interface configuration, and traffic statistics on the interface.

Prerequisites

The specified VLANIF interface has been created.

Precautions

If vlan-id is not specified, the display interface vlanif command displays information about all VLANIF interfaces in the system.

Example

# Display the status and configuration of VLANIF 3.

<Huawei> display interface vlanif 3
Vlanif3 current state : DOWN
Line protocol current state : DOWN
Description:HUAWEI, AR Series, Vlanif3 Interface
Route Port,The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc01-00e1
Current system time: 2007-09-12 20:21:13
    Input bandwidth utilization  : --
    Output bandwidth utilization : --
Table 5-24  Description of the display interface vlanif command output

Item

Description

current state

Status of a VLANIF interface. The value is UP or Down.

Line protocol current state

Status of the link-layer protocol on a VLANIF interface. The value is UP or Down.

Description

Description of a VLANIF interface.

Route Port

Indicates that the interface is a Layer 3 interface.

The Maximum Transmit Unit

Specifies the MTU of a VLANIF interface.

Internet Address

IP address of a VLANIF interface. If the VLANIF interface does not have an IP address, the system displays "Internet protocol processing: disabled."

IP Sending Frames' Format

Encapsulation format of IP packets, which can be PKTFMT_ETHNT_2, Ethernet_802.3, or Ethernet_SNAP.

Hardware address

MAC address of the VLANIF interface.

Current system time

Indicates the current system time.

If the system is configured with a time zone and is in the summer time, the time is displayed in the format of YYYY/MM/DD HH:MM:SS UTC±HH:MM DST.

Input/Output bandwidth utilization

Inbound/outbound bandwidth utilization on an interface.

display port vlan

Function

The display port vlan command displays information about interfaces of the VLAN.

Format

display port vlan [ interface-type interface-number | active ] *

Parameters

Parameter Description Value
interface-type interface-number Specifies the type and number of an interface in the VLAN.

If this parameter is not specified, information about all interfaces in the VLAN is displayed.

-

active Indicates the interface information of dynamic entries in the VLAN.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

You can run the display port vlan command to view information about interfaces of the VLAN and check whether the VLAN is assigned by the command, protocols, or services. If a fault occurs on an interface, you can locate the fault based on the information about the interface and VLAN.

Prerequisite

A VLAN has been created and the Layer 2 interface has joined the VLAN.

Precautions

If a large number of mappings between interfaces and VLANs exist on the device, you are advised to specify the interface or active to filter the command output. Otherwise, the following problems may occur due to excessive output information:
  • The displayed information is repeatedly refreshed, causing required information to fail to be obtained.
  • The system does not respond because of long-time information traverse and search.

Example

# Display information about interfaces that belong to each VLAN on the device.

<Huawei> display port vlan
Port                    Link Type    PVID  Trunk VLAN List
-------------------------------------------------------------------------------
Ethernet2/0/0           hybrid       1     -
Ethernet2/0/1           hybrid       1     -
Ethernet2/0/2           hybrid       1     -
Ethernet2/0/3           hybrid       1     -
Ethernet2/0/4           hybrid       1     -
Ethernet2/0/5           access       3     -
Ethernet2/0/6           hybrid       1     -
Ethernet2/0/7           hybrid       1     -
Table 5-25  Description of the display port vlan command output

Item

Description

Port

Indicates the type and number of the interface.

Link Type

Indicates the types of the interface link.

PVID

Indicates the default VLAN ID of the interface. By default, VLAN 1 is the default VLAN of all interfaces.

Trunk VLAN List

  • Indicates the VLAN IDs that are dynamically added by an interface.
  • Indicates the VLAN IDs of packets that are statically configured to pass through an interface.
Related Topics

display sub-vlan

Function

The display sub-vlan command displays information about sub-VLAN entries.

Format

display sub-vlan [ vlan-id ]

Parameters

Parameter Description Value
vlan-id

Specifies the VLAN ID of a sub-VLAN.

The value is an integer ranging from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After VLAN aggregation is configured on a device, you can determine whether VLAN aggregation has been correctly configured by running the display sub-vlan command to check information about sub-VLANs and check which sub-VLANs are contained in a super-VLAN.

When using the display sub-vlan command, note the following issues:

  • If vlan-id is not specified, information about all sub-VLANs on the device is displayed.

  • If vlan-id is specified, information about a specific sub-VLAN is displayed.

Before running the display sub-vlan command, ensure that the device is configured with sub-VLANs. Otherwise, no command output is displayed.

Example

# Display information about all sub-VLANs.

<Huawei> display sub-vlan
VLAN ID   Super-VLAN
--------------------------------------------------------------------------------
10        40
20        40
30        40  
Table 5-26  Description of the display sub-vlan command output

Item

Description

VLAN ID

Existing sub-VLAN on the device.

Super-VLAN

Super-VLAN that the sub-VLAN belongs to.

Related Topics

display super-vlan

Function

The display super-vlan command displays information about super-VLAN entries.

Format

display super-vlan [ vlan-id ]

Parameters

Parameter Description Value
vlan-id

Specifies the VLAN ID of a super-VLAN.

The value is an integer ranging from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After VLAN aggregation is configured on a device, you can determine whether VLAN aggregation has been correctly configured by running the display super-vlan command to check information about super-VLANs and check which sub-VLANs are contained in a super-VLAN.

When using the display super-vlan command, note the following issues:

  • If vlan-id is not specified, information about all super-VLANs on the device is displayed.

  • If vlan-id is specified, information about a specific super-VLAN is displayed.

Before running the display super-vlan command, ensure that the device is configured with super-VLANs. Otherwise, no command output is displayed.

Example

# Display information about all super-VLANs.

<Huawei> display super-vlan
VLAN ID   Sub-VLAN
--------------------------------------------------------------------------------
40        10 20 30
Table 5-27  Description of the display super-vlan command output

Item

Description

VLAN ID

Existing super-VLAN on the device.

Sub-VLAN

Sub-VLAN in the super-VLAN.

Related Topics

display vlan

Function

The display vlan command displays information about VLANs.

Format

display vlan [ { vlan-id | vlan-name vlan-name } [ verbose ] ]

display vlan [ vlan-id1 [ to vlan-id2 ] | brief | summary ]

Parameters

Parameter

Description

Value

vlan-id

Specifies the ID of a VLAN.

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

vlan-id1 [ to vlan-id2 ]

Specifies a range of VLAN IDs.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. The value of vlan-id2 must be greater than or equal to the value of vlan-id1. If to vlan-id2 is not specified, only information about the VLAN specified by vlan-id1 is displayed.
  • The value of vlan-id1 is an integer that ranges from 1 to 4094.
  • The value of vlan-id2 is an integer that ranges from 1 to 4094.

summary

Displays summary of all VLANs.

-

verbose

Displays detailed information about a specified VLAN.

If verbose is not specified, only brief information about the VLAN is displayed.

-

vlan-name vlan-name Specifies a VLAN name.

The name is a string of 1 to 31 case-sensitive characters, spaces not supported.

When double quotation marks are used around the string, spaces are allowed in the string.

brief Indicates brief information about VLANs.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display vlan command displays VLAN configuration or packet statistics on interfaces in a VLAN.

Precautions

If no parameter is specified, brief information about all VLANs is displayed.

Example

# Display brief information about all VLANs.

<Huawei> display vlan
* : management-vlan                                                             
---------------------                                                           
The total number of vlans is : 6                                                
VLAN ID Type         Status   MAC Learning Broadcast/Multicast/Unicast Property 
--------------------------------------------------------------------------------
1       common       enable   enable       forward   forward   forward default  
10      common       enable   enable       forward   forward   forward default  
100     common       enable   enable       forward   forward   forward default  
199     common       enable   enable       forward   forward   forward default  
900     common       enable   enable       forward   forward   forward default  
4094    common       enable   enable       forward   forward   forward default  

# Display detailed information about VLAN 100.

<Huawei> display vlan 100 verbose
* : Management-VLAN
---------------------
  VLAN ID                     : 100
  VLAN Name                   :
  VLAN Type                   : Common
  Description                 : VLAN 0100
  Status                      : Enable
  Broadcast                   : Enable
  MAC Learning                : Enable
  Smart MAC Learning          : Disable
  Current MAC Learning Result : Enable
  Statistics                  : Disable
  Property                    : Default
  VLAN State                  : Down
  ----------------
  Tagged        Port: Ethernet0/0/1
  ----------------
  Active  Tag   Port: Ethernet0/0/1
-------------------
Interface                   Physical
Ethernet0/0/1                   DOWN
# Display summary of all VLANs.
<Huawei> display vlan summary
static vlan:
Total 7 static vlan exist(s).
1 to 2 10 45 56 100 111
dynamic vlan:
Total 0 dynamic vlan exist(s).
reserved vlan:
Total 0 reserved vlan exist(s).
# Display brief of all VLANs.
<Huawei> display vlan brief
U:Up;D:Down;TG:Tagged;UT:Untagged;

VID  Name             Status  Ports
--------------------------------------------------------------------------------
1                     enable  UT: Eth2/0/3(U) Eth2/0/5(D) Eth2/0/6(D)
                                  Eth2/0/7(D) Eth-Trunk1(D) Eth-Trunk2(D)
                                  Eth-Trunk3(D) Eth-Trunk6(D) Eth-Trunk7(D)
10                    enable  UT: Eth2/0/0(U) Eth2/0/4(D)
11                    enable  UT: Eth-Trunk5(D)
                              TG: Eth2/0/7(D)
12                    enable
20                    enable
100                   enable  UT: Eth2/0/1(U)
200                   enable  UT: Eth2/0/2(U)
470                   enable
Table 5-28  Description of the display vlan command output

Item

Description

*: management-vlan/* : Management-VLAN

Management VLAN.

The total number of vlans is

Total number of VLANs.

VLAN ID/VID

ID of a VLAN.

VLAN Type/Type

Type of a VLAN:
  • Common: common VLAN

  • *Common: management VLAN

Status

Status of a VLAN. The value is always Enable.

Broadcast

Whether the broadcast function is enabled in a VLAN:

  • Disable: The broadcast function is disabled.
  • Enable: The broadcast function is enabled.

MAC Learning

Whether MAC address learning is enabled:
  • disable: MAC address learning is disabled.

  • enable: MAC addresses learning is enabled.

Broadcast/Multicast/Unicast

Whether Broadcast/Multicast/Unicast message is retransmitted.

Property

Property of a VLAN:
  • Default: default VLAN
  • MutilcastVlan: multicast VLAN
  • UserVlan: user VLAN

VLAN Name/Name

Name of a VLAN.

Description

Description of a VLAN.

Smart MAC Learning

Whether smart MAC address learning is enabled:
  • disable: Smart MAC address learning is disabled.

  • enable: Smart MAC addresses learning is enabled.

Current MAC Learning Result

MAC address learning result.

Statistics

Whether the traffic statistics function is enabled in a VLAN:

  • disable: Traffic statistics function is disabled.
  • enable: Traffic statistics function is enabled.

VLAN State

Status of the VLAN:
  • Up
  • Down

The status of a VLAN is determined by the status of member interfaces in the VLAN. A VLAN is Up only when at least one member interface in the VLAN is Up.

Tagged Port

(Untagged Port).Interfaces that are manually added to a VLAN in tagged or untagged mode.

Active Tag Port

(Active Untag Port).Active interfaces that join a VLAN in tagged or untagged mode.

static vlan

VLANs that are created manually.

dynamic vlan

VLANs that are learned dynamically.

reserved vlan

VLANs that are reserved for certain functions.

U: Up

The interface is Up.

D: Down

The interface is Down.

TG: Tagged

Tagged packets.

UT: Untagged

Untagged packets.

Ports

Interfaces in a VLAN.

display vlan priority

Function

Using the display vlan priority command, you can view the 802.1p priorities of VLANs.

Format

display vlan { vlan-id | all } priority

Parameters

Parameter

Description

Value

vlan-id

Specifies a VLAN ID. If this parameter is specified, the 802.1p priority of the specified VLAN is displayed.

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

all

Displays 802.1p priorities of all VLANs.

-

Views

All views

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The display vlan priority command displays the 802.1p priority of a specified VLAN or 802.1p priorities of all VLANs.

Example

# Display 802.1p priorities of all VLANs.

<Huawei> display vlan all priority
------------------------------
 VLAN ID       Priority
------------------------------
    11          3
------------------------------
Total items displayed = 1
Table 5-29  Description of the display vlan priority command output

Item

Description

VLAN ID

ID of a VLAN.

Priority

802.1p priority of a VLAN.

Total items displayed

Number of VLAN-priority items displayed.

Related Topics

interface vlanif

Function

The interface vlanif command creates a VLANIF interface and displays the VLANIF interface view.

The undo interface vlanif command deletes a VLANIF interface.

By default, VLANIF interfaces are not created.

Format

interface vlanif vlan-id

undo interface vlanif vlan-id

Parameters

Parameter

Description

Value

vlan-id

Specifies the ID of the VLAN that a VLANIF interface belongs to.

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

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a device needs to communicate with devices at the network layer, you can create a logical interface based on a VLAN on the device, namely, a VLANIF interface. A VLANIF interface is a network layer interface and can be configured with an IP address. The device then users the VLANIF interface to communicate with devices at the network layer.

Prerequisites

The specified VLAN has been created using the vlan command before you create a VLANIF interface.

Follow-up Procedure

Run the ip address to assign an IP address to the VLANIF interface.

Precautions

If the specified VLANIF interface exists, the interface vlanif command displays the VLANIF interface view directly.

After a VLANIF interface is configured, the corresponding VLAN cannot be configured as a sub-VLAN.

When a VLANIF interface is used as a management VLANIF interface where you can telnet to the device, the user VLAN ID cannot be the same as the management VLAN ID; otherwise, you will fail to telnet to the device.

Example

# Create VLANIF 2 and enter the VLANIF interface view.

<Huawei> system-view
[Huawei] vlan 2
[Huawei-vlan2] quit 
[Huawei] interface vlanif 2
[Huawei-Vlanif2]

ip pool (VLAN view)

Function

The ip pool command configures an IP address pool for a sub-VLAN.

The undo ip pool command deletes the IP address pool of a sub-VLAN.

By default, no IP address pool is configured for sub-VLANs.

Format

ip pool start-address [ to end-address ]

undo ip pool

Parameters

Parameter Description Value
start-address Specifies the start IP address in an IP address pool. It is in dotted decimal notation.
to end-address Specifies the end IP address in an IP address pool.

If end-address is not specified, only one IP address, that is, start-address, exists in the IP address pool.

It is in dotted decimal notation.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After assigning an IP address to the super-VLAN by assigning the IP address to a VLANIF interface, you can specify the IP address range for users in the VLAN. In this manner, the ARP module filters out packets with IP addresses beyond the IP address range so that the number of ARP packets can be exactly controlled.

If the super VLAN is enabled with proxy ARP, the system directly sends an ARP Request packet from a user in the sub-VLAN to the destination sub-VLAN based on the IP address carried in the packet, which reduces broadcast traffic.

The ip pool command can be used to set an IP address pool for the sub-VLAN. In the IP address pool, a single IP address or a consecutive IP address segment can be configured, but inconsecutive IP address segments cannot be configured.

Prerequisites

After the preceding configuration is complete, run the aggregate-vlan command in the view of a VLAN to set the VLAN to the super-VLAN, and run the access-vlan command to set the VLANs that need IP address pools configured to be sub-VLANs of the super-VLAN.

Configuration Impact

After the ip pool command is run for a sub-VLAN, only ARP packets, including ARP request, ARP response, and proxy ARP, with the IP addresses in the IP address pool can be processed in the sub-VLAN.

Precautions

Before updating the IP address pool configured for a sub-VLAN, run the undo ip pool command to delete the existing one.

Example

# Configure an IP address pool for VLAN 20, with IP addresses ranging from 10.10.10.10 to 10.10.10.20.

<Huawei> system-view
[Huawei] vlan 20
[Huawei-vlan20] ip pool 10.10.10.10 to 10.10.10.20

management-vlan

Function

Using the management-vlan command, you can configure a VLAN as a management VLAN.

Using the undo management-vlan command, you can cancel the configuration.

By default, no VLAN is configured as a management VLAN.

Format

management-vlan

undo management-vlan

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To use a network management system to manage multiple devices, create a VLANIF interface on each device and configure a management IP address for the VLANIF interface. You can then log in to a device and manage it using its management IP address. If a user-side interface is added to the VLAN, users connected to the interface can also log in to the device. This brings security risks to the device.

After a VLAN is configured as a management VLAN, no access interface can be added to the VLAN. An access interface is connected to users. The management VLAN forbids users connected to access interfaces to log in to the device, improving device performance.

Follow-up Procedure

Create a VLANIF interface corresponding to the VLAN and configure a management IP address on the VLANIF interface.

Precautions

VLAN 1 cannot be configured as an mVLAN.

You can run the display vlan command to view the management VLAN configuration. In the command output, the VLAN marked with a * is the management VLAN.

After a VLAN is configured as a management VLAN, only trunk and hybrid interfaces can be added to the VLAN.

Example

# Configure VLAN 100 as a management VLAN.

<Huawei> system-view
[Huawei] vlan 100
[Huawei-vlan100] management-vlan
Related Topics

mtu (VLANIF interface view)

Function

Using the mtu command, you can set the maximum transmission unit (MTU) of a VLANIF interface.

Using the undo mtu command, you can restore the default MTU of a VLAN interface.

By default, the MTU of a VLAN interface is 1500 bytes.

Format

mtu mtu

undo mtu

Parameters

Parameter

Description

Value

mtu

Specifies the MTU of a VLANIF interface.

The value is an integer that ranges from 46 to 1600, in bytes.

Views

VLANIF interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

MTU is short for maximum transmission unit. An MTU value determines the maximum number of bytes each time a sender can send. If the size of packets exceeds the MTU supported by a transit node or a receiver, the transit node or receiver fragments the packets or even discards them, aggravating the network transmission load. To avoid this problem, set the MTU value of the VLANIF interface.

Example

# Set the MTU of the VLANIF 100 interface to 1492 bytes.

<Huawei> system-view
[Huawei] interface Vlanif 100
[Huawei-Vlanif100] mtu 1492

name (VLAN view)

Function

The name command configures a name for a VLAN.

The undo name command deletes a configured VLAN name.

By default, a VLAN does not have a name.

Format

name vlan-name

undo name

Parameters

Parameter Description Value
vlan-name Specifies the VLAN name. The name is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

If a device is configured with multiple VLANs for transmitting different services, you can name the VLANs in their corresponding VLAN views to facilitate service management. In this manner, you can check the deployed services of a VLAN by the VLAN name.

After VLANs are named, you can run the vlan vlan-name command in the system view to enter the view of a specific VLAN, and then check or modify the configuration of the VLAN.

Example

# Create VLAN 2, which is used to transmit voice services, and name it as voice.

<Huawei> system-view
[Huawei] vlan 2
[Huawei-vlan2] name voice
Related Topics

port

Function

The port command configures a VLAN as the default VLAN of an interface and adds the interface to the VLAN.

The undo port command restores the default VLAN of an interface to the default setting.

By default, VLAN 1 is the default VLAN of all interfaces.

Format

port interface-type { interface-number1 [ to interface-number2 ] } &<1-10>

undo port interface-type { interface-number1 [ to interface-number2 ] } &<1-10>

Parameters

Parameter

Description

Value

interface-type { interface-number1 [ to interface-number2 ] }

Configures the default VLAN for multiple interfaces.
  • interface-type specifies the type of interfaces.
  • interface-number1 specifies the number of the first interface.
  • interface-number2 specifies the number of the last interface. The value of interface-number2 must be greater than the value of interface-number1. The interface-number1 and interface-number2 parameters identify a range of interfaces.

If to interface-number2 is not specified, only one interface is specified. You can specify 10 interface ranges at one time.

-

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

All frames sent from a user device are untagged, and frames sent from a remote device may also be untagged. However, the device processes only tagged frames. Therefore, the device adds a tag to each untagged frame received by an interface. The default VLAN ID of the interface can be added to untagged frames so that these frames are forwarded in the default VLAN.

After the default VLAN is specified for an access interface, packets passing through the interface are processed as follows:
  • When the interface receives an untagged frame, it tags the frame with the default VLAN ID.
  • When the interface receives a tagged packet:
    • If the interface is an access interface, it compares the VLAN ID of the packet with the default VLAN ID. If they are the same, the interface forwards the packets; otherwise, the interface discards the packets.
  • Before forwarding tagged packets, access interfaces remove VLAN tags from the packets.

Prerequisites

The link-type of specified interfaces cannot be access or trunk before you run the port command.

Precautions

A super VLAN cannot be configured as the default VLAN of interfaces.

The undo port command deletes the default VLAN of the specified interfaces only if the current VLAN is the default VLAN of these interfaces.

If you run the port command multiple times in the same VLAN view, the VLAN is configured as the default VLAN of all the specified interfaces.

You can also run the port default vlan command in the interface view to configure the default VLAN for an interface. The two commands have the same function.

Example

# Configure VLAN 3 as the default VLAN of interfaces Eth0/0/1 to Eth2/0/4.
<Huawei> system-view
[Huawei] vlan 3
[Huawei-vlan3] port ethernet 0/0/1 to 2/0/4

port default vlan

Function

The port default vlan command configures the default VLAN of an interface and adds the interface to the VLAN.

The undo port default vlan command restores the default VLAN of an interface to the default setting.

By default, VLAN 1 is the default VLAN of all interfaces.

Format

port default vlan vlan-id [ step step-number [ increased | decreased ] ]

undo port default vlan

Parameters

Parameter

Description

Value

vlan-id

Specifies the ID of the default VLAN.

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

step step-number [ increased | decreased ]

Specifies that the interface added to an interface group can be bound to VLANs starting from the one identified by vlan-id in an ascending or descending order at a step specified by step-number.

increased specifies an increase in the values of VLAN IDs starting from the one identified by vlan-id at a step specified by step-number to add the interfaces to the VLANs. Whereas decreased specifies a decrease in the values of VLAN IDs starting from the one identified by vlan-id at a step specified by step-number to add the interfaces to the VLANs.

For example, you can configure increased, and set vlan-id to 10 and step-number to 20 in the port default vlan command. After this configuration, interface 1 joins VLAN 10; interface 2 joins VLAN 30... By analogy, interface 10 joins VLAN 190.

NOTE:
  • This parameter can only be used in the port group view.

  • When using step and vlan-id in the command, ensure that all interfaces added to the VLAN are available.

  • If this parameter is not specified, all interfaces in an interface group are added into the same VLAN, that is, VLAN vlan-id.

The value is an integer that ranges from 1 to 4093.

Views

Ethernet interface view, GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

All frames sent from a user device are untagged, and frames sent from a remote device may also be untagged. However, the device processes only tagged frames. Therefore, the device adds a tag to each untagged frame received by an interface. The default VLAN ID of the interface can be added to untagged frames so that these frames are forwarded in the default VLAN.

After the default VLAN is specified for an access interface, packets passing through the interface are processed as follows:
  • When the interface receives an untagged frame, it tags the frame with the default VLAN tag.
  • When the interface receives a tagged packet:
    • If the interface is an access interface, it compares the VLAN ID of the packet with the default VLAN ID. If they are the same, the interface forwards the packets; otherwise, the interface discards the packets.
  • Before forwarding tagged packets, access interfaces remove VLAN tags from the packets.

Prerequisites

The VLAN to be configured as the default VLAN has been created.

The interface type is access. If not, run the port link-type command to change the interface type.

Precautions

  • You can also run the port command in the VLAN view to configure the default VLAN of an interface. The two commands have the same function.
  • A super VLAN cannot be configured as the default VLAN of interfaces.
  • This command is invalid on a member interface of an Eth-Trunk.
  • If you run the port default vlan command multiple times in the same interface view, only the latest configuration takes effect.
  • This configuration will be deleted automatically if the default VLAN is deleted in system view.

Example

# Configure VLAN 3 (an existing VLAN) as the default VLAN of Eth0/0/1 (an access interface).

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] port link-type access
[Huawei-Ethernet0/0/1] port default vlan 3

port hybrid pvid vlan

Function

The port hybrid pvid vlan command specifies the default VLAN ID of a hybrid interface.

The undo port hybrid pvid vlan command restores the default VLAN ID of a hybrid interface to the default setting.

By default, VLAN 1 is the default VLAN ID of all interfaces.

Format

port hybrid pvid vlan vlan-id

undo port hybrid pvid vlan

Parameters

Parameter

Description

Value

vlan-id

Specifies the default VLAN ID of a hybrid interface.

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

Views

Ethernet interface view, GE interface view, Eth-Trunk interface view, port group view, WLAN-BSS interface view, WLAN-ESS interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

An interface may receive untagged and tagged frames, but the device processes only tagged frames. Therefore, the device adds a tag to each untagged frame received by an interface. The default VLAN ID of the interface can be added to untagged frames so that these frames are forwarded in the default VLAN.

A hybrid interface processes Ethernet frames as follows:
  • When the interface receives an untagged frame, it tags the frame with the default VLAN ID. If the default VLAN ID is allowed by the interface, the interface accepts the frame. Otherwise, the interface discards the frame.
  • When the interface receives a tagged frame, it accepts the frame if the VLAN ID of the frame is in the list of allowed VLAN IDs. Otherwise, the interface discards the frame.
  • If the VLAN ID of a frame is allowed by the interface, the interface forwards the frame.

Prerequisites

The VLAN to be specified as the default VLAN has been created.

Precautions

This command is invalid on a member interface of an Eth-Trunk.

The port hybrid pvid vlan command only specifies the default VLAN for an interface but does not add the interface to the default VLAN.

If you run the port hybrid pvid vlan command multiple times in the same interface view, only the latest configuration takes effect.

This configuration will be deleted automatically if the default VLAN is deleted in system view.

Example

# Specify VLAN 5 as the default VLAN of Eth0/0/1.

<Huawei> system-view
[Huawei] vlan 5
[Huawei-vlan5] quit
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] port link-type hybrid
[Huawei-Ethernet0/0/1] port hybrid pvid vlan 5
Related Topics

port hybrid tagged vlan

Function

The port hybrid tagged vlan command adds a hybrid interface to the specified VLANs. Frames of the VLANs then pass through the hybrid interface in tagged mode.

The undo port hybrid vlan command removes a hybrid interface from the specified VLANs.

By default, a hybrid interface is added to VLAN 1 in untagged mode.

Format

port hybrid tagged vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }

undo port hybrid vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }

( Port group view)port hybrid tagged vlan vlan-id3 [ step step-number [ increased | decreased ] ]

( Port group view)undo port hybrid vlan vlan-id3 [ step step-number [ increased | decreased ] ]

Parameters

Parameter

Description

Value

vlan-id1 [ to vlan-id2 ]

Adds a hybrid interface to specified VLANs.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. The value of vlan-id2 must be greater than or equal to the value of vlan-id1.

The value of vlan-id1 is an integer that ranges from 1 to 4094.

The value of vlan-id2 is an integer that ranges from 1 to 4094.

all

Adds a hybrid interface to all VLANs.

-

vlan-id3

Specifies the ID of the start VLAN to be bound to the member port of a port group.

The value is an integer that ranges from 1 to 4094.
step step-number

Specifies the step for the increase or decrease in the value of the VLAN ID.

With this parameter specified, the member ports in a port group can be bound to VLANs starting from the one identified by vlan-id3 in an ascending or descending order at a step specified by step-number. This facilitates the subsequent user configuration. For example:

A port group has 10 member ports. You can configure increased, and set vlan-id3 to 1 and step-number to 1 in the port hybrid tagged vlan command. After this configuration, member port 1 joins VLAN 1; member port 2 joins VLAN 2... By analogy, member port 10 joins VLAN 10.

The value is an integer that ranges from 1 to 4093.
increased

Specifies an increase in the values of VLAN IDs starting from the one identified by vlan-id3 at a step specified by step-number to bind the VLANs to the member ports of a port group.

By default, Layer 2 ports are bound to the VLANs in an ascending order.
decreased

Specifies a decrease in the values of VLAN IDs starting from the one identified by vlan-id3 at a step specified by step-number to bind the VLANs to the member ports of a port group.

When setting decreased, ensure that the value of vlan-id3 is greater than or equal to the number of the member ports of the port group.

-

Views

Ethernet interface view, GE interface view, Eth-Trunk interface view, port group view, WLAN-BSS interface view, WLAN-ESS interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A hybrid interface can connect to either a user device or a industrial switch router. This command adds a hybrid interface to VLANs in tagged mode so that the hybrid interface allows frames from the VLANs to pass.

After a hybrid interface is added to VLANs in tagged mode, the interface forwards frames without removing VLAN tags of frames.

Prerequisites

If an interface is not a hybrid interface, run the port link-type hybrid command to change the interface type to hybrid.

Precautions

  • This command is invalid on a member interface of an Eth-Trunk.
  • A super VLAN cannot be specified in the command.
  • If you run the port hybrid tagged vlan command multiple times in the same interface view, the interface is added to all the specified VLANs.

Example

# Add Eth0/0/1 to VLAN 3 to VLAN 5 in tagged mode.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] port link-type hybrid
[Huawei-Ethernet0/0/1] port hybrid tagged vlan 3 to 5

port hybrid untagged vlan

Function

The port hybrid untagged vlan command adds a hybrid interface to the specified VLANs. Frames of the VLANs then pass through the hybrid interface in untagged mode.

The undo port hybrid vlan command removes a hybrid interface from the specified VLANs.

By default, a hybrid interface is added to VLAN 1 in untagged mode.

Format

port hybrid untagged vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }

undo port hybrid vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }

( Port group view)port hybrid untagged vlan vlan-id3 [ step step-number [ increased | decreased ] ]

( Port group view)undo port hybrid vlan vlan-id3 [ step step-number [ increased | decreased ] ]

Parameters

Parameter

Description

Value

vlan-id1 [ to vlan-id2 ]

Adds a hybrid interface to specified VLANs.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. The value of vlan-id2 must be greater than or equal to the value of vlan-id1.

The value of vlan-id1 is an integer that ranges from 1 to 4094.

The value of vlan-id2 is an integer that ranges from 1 to 4094.

all

Adds a hybrid interface to all VLANs.

-

vlan-id3

Specifies the ID of the start VLAN to be bound to the member port of a port group.

The value is an integer that ranges from 1 to 4094.
step step-number

Specifies the step for the increase or decrease in the value of the VLAN ID.

With this parameter specified, the member ports in a port group can be bound to VLANs starting from the one identified by vlan-id3 in an ascending or descending order at a step specified by step-number. This facilitates the subsequent user configuration. For example:

A port group has 10 member ports. You can configure increased, and set vlan-id3 to 1 and step-number to 1 in the port hybrid untagged vlan command. After this configuration, member port 1 joins VLAN 1; member port 2 joins VLAN 2... By analogy, member port 10 joins VLAN 10.

The value is an integer that ranges from 1 to 4093.
increased

Specifies an increase in the values of VLAN IDs starting from the one identified by vlan-id3 at a step specified by step-number to bind the VLANs to the member ports of a port group.

By default, Layer 2 ports are bound to the VLANs in an ascending order.
decreased

Specifies a decrease in the values of VLAN IDs starting from the one identified by vlan-id3 at a step specified by step-number to bind the VLANs to the member ports of a port group.

When setting decreased, ensure that the value of vlan-id3 is greater than or equal to the number of the member ports of the port group.

-

Views

Ethernet interface view, GE interface view, Eth-Trunk interface view, port group view, WLAN-BSS interface view, WLAN-ESS interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A hybrid interface can connect to either a user device or a industrial switch router. When a hybrid interface is connected to a user device, it must be added to VLANs in untagged mode so that it sends untagged frames.

After a hybrid interface is added to VLANs in untagged mode, the interface removes VLAN tags of frames before sending frames.

Prerequisites

If an interface is not a hybrid interface, run the port link-type hybrid command to change the interface type to hybrid.

Precautions

  • This command is invalid on a member interface of an Eth-Trunk.
  • A super VLAN cannot be specified in the command.
  • If you run the port hybrid untagged vlan command multiple times in the same interface view, the interface is added to all the specified VLANs.

Example

# Add Eth0/0/1 to VLAN 3 to VLAN 5 in untagged mode.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] port link-type hybrid
[Huawei-Ethernet0/0/1] port hybrid untagged vlan 3 to 5

port trunk allow-pass vlan

Function

The port trunk allow-pass vlan command adds a trunk interface to the specified VLANs.

The undo port trunk allow-pass vlan command deletes a trunk interface from the specified VLANs.

By default, a trunk interface is in VLAN 1.

Format

port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }

undo port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }

(Port group view)port trunk allow-pass vlan vlan-id3 [ step step-number [ increased | decreased ] ]

(Port group view)undo port trunk allow-pass vlan vlan-id3 [ step step-number [ increased | decreased ] ]

Parameters

Parameter

Description

Value

vlan-id1 [ to vlan-id2 ]

Adds a trunk interface to specified VLANs.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. The value of vlan-id2 must be greater than or equal to the value of vlan-id1.

The value of vlan-id1 is an integer that ranges from 1 to 4094.

The value of vlan-id2 is an integer that ranges from 1 to 4094.

all

Adds a trunk interface to all VLANs.

-

vlan-id3

Specifies the ID of the start VLAN to be bound to the member port of a port group.

The value is an integer that ranges from 1 to 4094.
step step-number

Specifies the step for the increase or decrease in the value of the VLAN ID.

With this parameter specified, the member ports in a port group can be bound to VLANs starting from the one identified by vlan-id3 in an ascending or descending order at a step specified by step-number. This facilitates the subsequent user configuration. For example:

A port group has 10 member ports. You can configure increased, and set vlan-id3 to 1 and step-number to 1 in the port trunk allow-pass vlan command. After this configuration, member port 1 joins VLAN 1; member port 2 joins VLAN 2... By analogy, member port 10 joins VLAN 10.

The value is an integer that ranges from 1 to 4093.
increased

Specifies an increase in the values of VLAN IDs starting from the one identified by vlan-id3 at a step specified by step-number to bind the VLANs to the member ports of a port group.

By default, Layer 2 ports are bound to the VLANs in an ascending order.
decreased

Specifies a decrease in the values of VLAN IDs starting from the one identified by vlan-id3 at a step specified by step-number to bind the VLANs to the member ports of a port group.

When setting decreased, ensure that the value of vlan-id3 is greater than or equal to the number of the member ports of the port group.

-

Views

Ethernet interface view, GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A trunk interface can join multiple VLANs and connects to a network device. To allow all packets from one or multiple VLANs to pass through a trunk interface, the trunk interface must be added to the VLANs using the port trunk allow-pass vlan command.

Prerequisites

The link-type of the interface is configured to trunk.

Precautions

The command cannot be used on a member interface of an Eth-Trunk.

If you run the port trunk allow-pass vlan command multiple times in the same interface view, the interface is added to all the specified VLANs.

Example

# Add Eth0/0/1 to VLANs 10 to 30.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] port link-type trunk
[Huawei-Ethernet0/0/1] port trunk allow-pass vlan 10 to 30

port trunk pvid vlan

Function

The port trunk pvid vlan command specifies the default VLAN for a trunk interface.

The undo port trunk pvid vlan command restores the default VLAN of a trunk interface to the default setting.

By default, VLAN 1 is the default VLAN of trunk interfaces.

Format

port trunk pvid vlan vlan-id

undo port trunk pvid vlan

Parameters

Parameter

Description

Value

vlan-id

Specifies the default VLAN ID of a trunk interface.

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

Views

Ethernet interface view, GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

An interface may receive untagged and tagged frames, but the device processes only tagged frames. Therefore, the device adds a tag to each untagged frame received by an interface. The default VLAN ID of the interface can be added to untagged frames so that these frames are forwarded in the default VLAN.

Prerequisites

The VLAN to be specified as the default VLAN has been created.

Follow-up Procedure

Add the trunk interface to the default VLAN.

Precautions

The port trunk pvid vlan command only specifies the default VLAN of a trunk interface but does not add the trunk interface to the default VLAN. A trunk interface forwards frames with the default VLAN ID only after it is added to the default VLAN using the port trunk allow-pass vlan command.

If you run the port trunk pvid vlan command multiple times in the same interface view, only the latest configuration takes effect.

This configuration will be deleted automatically if the default VLAN is deleted in system view.

Example

# Specify VLAN 5 as the default VLAN of Eth0/0/1.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] port link-type trunk
[Huawei-Ethernet0/0/1] port trunk pvid vlan 5

reset vlan statistics

Function

Using the reset vlan statistics command, you can clear traffic statistics in a specified VLAN.

Format

reset vlan statistics vlan-id

Parameters

Parameter

Description

Value

vlan-id

Specifies the ID of a VLAN.

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

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

This command is used when you need to collect new packet statistics in a VLAN. After this command is executed, the packet count in the VLAN becomes 0.

Precautions

Traffic statistics cannot be restored after they are cleared. Exercise caution when you use the command.

Example

# Clear traffic statistics in VLAN 3.

<Huawei> reset vlan statistics 3
Related Topics

shutdown (VLANIF interface view)

Function

Using the shutdown command, you can shut down a VLANIF interface.

Using the undo shutdown command, you can enable a VLANIF interface.

By default, a VLANIF interface is enabled.

Format

shutdown

undo shutdown

Parameters

None

Views

VLANIF interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a VLANIF interface fails or is not needed, you can run the shutdown command on the VLANIF interface.

Precautions

A VLANIF interface is Up as long as an interface in the corresponding VLAN is Up.

After the VLANIF interface is shut down, the interface status changes to Down even if physical interfaces in the corresponding VLAN are Up.

After a VLANIF interface is shut down, none of the users that use the VLANIF interface address as the gateway address can communicate at Layer 3. In addition, the VLANIF interface address cannot be used in route calculation.

After a VLANIF interface is shut down, the dynamic ARP entry corresponding to the VLANIF interface starts aging in the ARP table. If the VLANIF interface address is in a static ARP entry, the ARP entry is not deleted.

Example

# Enable VLANIF 2.

<Huawei> system-view
[Huawei] interface vlanif 2
[Huawei-Vlanif2] undo shutdown

vlan

Function

The vlan command creates a VLAN and displays the VLAN view. If the VLAN exists, the VLAN view is displayed.

The undo vlan command deletes a VLAN.

By default, all interfaces belong to the default VLAN, named VLAN 1.

Format

vlan vlan-id

vlan batch { vlan-id1 [ to vlan-id2 ] } &<1-10>

undo vlan vlan-id

undo vlan batch { vlan-id1 [ to vlan-id2 ] } &<1-10>

Parameters

Parameter Description Value
vlan-id Specifies the VLAN ID. The value is an integer ranging from 1 to 4094.
batch Configures VLANs in batches. -
vlan-id1 to vlan-id2 Specifies range of VLANs to be configured in batches:
  • vlan-id1 specifies the start VLAN ID.

  • vlan-id2 specifies the end VLAN ID.

    vlan-id2 must be greater than or equal to vlan-id1. vlan-id1 and vlan-id2 define a range together.

  • If the parameter to vlan-id2 is not specified, only the VLAN specified by vlan-id1 is created.

The vlan-id1 and vlan-id2 are integers ranging from 1 to 4094.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To reduce broadcast domains and enhance security on a complex network, VLANs can be created on the network to isolate the devices that do not need to communicate each other. The vlan batch command creates multiple VLANs at one time, simplifying VLAN configuration.

Follow-up Procedure

Assign VLANs according to network requirements.

Precautions

VLAN 1 is the default VLAN, which cannot be deleted and does not need to be created.

The vlan command can be used to create a VLAN and enter the VLAN view. If a VLAN has been created, the VLAN view is displayed after this command is used. The vlan command multiple times creates multiple VLANs. If a VLAN has been created, using this command cannot be used to create the same VLAN or modify the configurations of the VLAN.

The vlan batch command can be used to create multiple VLANs in batches. If a VLAN has been created, using this command cannot be used to create the same VLAN or modify the configurations of the VLAN. The vlan batch commands multiple times creates VLANs in multiple batches.

Before deleting a VLAN, run the undo interface vlanif command to delete the corresponding VLANIF interface.

  • The AR500 series (except AR502G-L-D-H, AR502GR-L-D-H)support a maximum of 128 VLANs.
  • The AR502G-L-D-H, AR502GR-L-D-Hsupport a maximum of 64 VLANs.
  • The AR510 supports a maximum of 64 VLANs.
  • The AR530 supports a maximum of 128 VLANs.

Currently, the AR510 series (except AR515GW-LM9–D) support a maximum of 64 VLANs, other modes support a maximum of 128 VLANs.

Example

# Create VLAN 100 and enter the VLAN 100 view. If VLAN 100 exists, the VLAN 100 view is displayed directly.

<Huawei> system-view
[Huawei] vlan 100
[Huawei-vlan100]
Related Topics

vlan priority

Function

Using the vlan priority command, you can configure the 802.1p priority for a VLAN.

Using the undo vlan priority command, you can cancel the configuration.

By default, the system retains the original 802.1p priority of packets.

NOTE:

AR509G-L-D-H, AR502G-L-D-H, AR502GR-L-D-H, and AR509GW-L-D-H do not support this command.

Format

vlan vlan-id priority new-priority-value

vlan batch vlan-id1 to vlan-id2 priority new-priority-value

undo vlan vlan-id priority

undo vlan batch vlan-id1 to vlan-id2 priority

Parameters

Parameter

Description

Value

vlan-id

Specifies a VLAN ID.

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

new-priority-value

Specifies the 802.1p priority of a VLAN.

The value is an integer that ranges from 0 to 7.

batch

Configures VLANs in batches.

-

vlan-id1 to vlan-id2

Specifies range of VLANs to be configured in batches.

The vlan-id1 and vlan-id2 are integers ranging from 1 to 4094.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By configuring 802.1p priorities for VLANs, you can ensure that packets from the VLAN with the highest priority are transmitted first when congestion occurs.

Prerequisites

The specified VLAN has been created.

Configuration Impact

This command changes the 802.1p priority of packets from the specified VLAN. When congestion occurs, packets from the VLAN with the highest priority are transmitted first.

Precautions

The vlan priority command takes effect only for VLANs containing interfaces on the main control board of the devices.

Example

# Set the priority of VLAN 11 to 3.

<Huawei> system-view
[Huawei] vlan 11 priority 3
Related Topics

vlan vlan-name

Function

The vlan vlan-name command displays the view of a VLAN with the specified VLAN name.

The undo vlan vlan-name command deletes a VLAN with the specified VLAN name. After the command is used, the VLAN name is also deleted.

Format

vlan vlan-name vlan-name

undo vlan vlan-name vlan-name

Parameters

Parameter Description Value
vlan-name Specifies the VLAN name. The name is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the name command is run to set a VLAN name, you can run the vlan vlan-name command in the system view to enter the corresponding VLAN view.

Assume that a device has multiple VLANs and each VLAN has a name. If you need to delete the VLAN that is used to transmit voice services but cannot remember the ID of the VLAN, you can run the undo vlan vlan-name command to delete the VLAN by inputting the VLAN name.

Prerequisites

Before running the vlan vlan-name command, ensure that the name command is run to set the VLAN name.

Precautions

When you run the undo vlan vlan-name command to delete a VLAN, services configured for the VLAN are deleted at the same time. The deleted services cannot be restored even if you recreate the VLAN. Therefore, exercise caution when running the undo vlan vlan-name command.

Example

# Enter the view of the VLAN named user1.
<Huawei> system-view
[Huawei] vlan vlan-name user1
[Huawei-vlan2]
Related Topics
Translation
Download
Updated: 2019-02-18

Document ID: EDOC1000097293

Views: 35397

Downloads: 101

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