The vlan command creates a VLAN and displays the VLAN view. If the VLAN already exists, the VLAN view is displayed.
The undo vlan command deletes the VLAN.
By default, no VLAN exists.
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 with each other.
Precautions
The vlan command creates a VLAN and displays the VLAN view. If a VLAN has been created, the VLAN view is displayed after this command is used. If you run the vlan command more than once, all the created VLANs take effect. If a VLAN has been created, using this command does not create the same VLAN or modify the VLAN configuration. After a VLAN is created, both the vlan and vlan batch configurations exist in the configuration file.