< Home

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]
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic