The vlan command creates a VLAN and displays the VLAN view. If the VLAN already exists, you can enter its view directly.
The undo vlan command deletes a VLAN.
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>
| Parameter | Description | Value |
|---|---|---|
| vlan-id | Specifies the VLAN ID. | The value is an integer ranging from 1 to 4094. |
| batch | Configures VLANs in batch. | - |
| vlan-id1 [ to vlan-id2 ] | Specifies a VLAN range to be created in batch, including:
In one vlan batch command, a maximum of 10 VLAN ranges can be specified by using to. |
The value is an integer ranging from 1 to 4094. |
Usage Scenario
Create a VLAN to isolate multiple hosts that are not required to communicate with each other. This configuration reduces broadcast domains and improves security of user information in the complex network environment. If multiple VLANs are required to be created, run the vlan batch command to create VLANs in batch, simplifying the configuration process.
Follow-up Procedure
Assign VLANs according to network requirements.
Precautions
Run the vlan command to create a VLAN. If the command is run for several times, all the created VLANs are valid. An existing VLAN cannot be created. The existing VLAN and its related configuration will keep unchanged.
Run the vlan batch command to create multiple VLANs in batch. An existing VLAN cannot be created. The existing VLAN and its related configuration will keep unchanged. Run the vlan batch command to create a VLAN. If the command is run for several times, all the created VLANs are valid.
Before deleting a VLAN, run the undo interface vlanif command to delete the corresponding VLANIF interface for the VLAN.