< Home

display vlan

Function

The display vlan command displays information about all VLANs.

Format

display vlan [ vlan-id [ verbose ] | summary ]

Parameters

Parameter Description Value
vlan-id

Specifies the VLAN ID.

If vlan-id is specified, the ports contained in a VLAN are displayed. The ports include tagged ports and untagged ports.

The value is an integer ranging from 1 to 4094.
verbose Displays the detailed information of the specific VLAN. -
summary Displays summary of VLANs. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

After a device is configured with VLANs, you can run the display vlan command to check whether the configurations, names and status of each VLAN are correct.

The display vlan command displays the name, type, status, and port list of each VLAN, and checks whether each VLAN is enabled with broadcast, multicast, unicast, MAC address learning, statistics, and description.

Prerequisite

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

Note

Ports in the command output include:
  • Ports that add tags to packets

  • Ports that do not add tags to packets

If a large number of VLANs are configured on a device, you are recommended to specify vlan-id or vlan-name to filter the command output. Otherwise, the following problems may occur due to excessive output information:
  • The displayed information is repeatedly refreshed, and therefore required information cannot be located.

  • The system does not respond because of prolonged information traversing and searching.

Example

# Display information about all VLANs.

<sysname> display vlan
The total number of vlans is : 2               
VLAN ID Status   Unknown-Unicast Description   
------------------------------------------     
10      enable   forward         VLAN 0010     
20      enable   forward         VLAN 0020      
Table 1 Description of the display vlan command output

Item

Description

The total number of vlans is

Indicates the total number of VLANs.

VLAN ID

Indicates the VLAN ID.

Status

Indicates the VLAN status. The value can be:
  • disable: indicates that the VLAN is disabled. You can use the shutdown vlan command to disable the VLAN.

  • enable: indicates that the VLAN is enabled. You can use the undo shutdown vlan command to enable the VLAN.

Unknown-Unicast

Indicates the processing method of unknown unicast packets.
  • forward: forwarding unicast packets
  • discard: discarding unicast packets

Description

Indicates the VLAN description.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >