3.
(Optional.) Set a name for the VLAN.
name text
By default, the name of a VLAN is VLAN vlan-id. The vlan-id argument specifies the VLAN ID in
a four-digit format. If the VLAN ID has fewer than four digits, leading zeros are added. For
example, the name of VLAN 100 is VLAN 0100.
4.
(Optional.) Configure the description for the VLAN.
description text
By default, the description of a VLAN is VLAN vlan-id. The vlan-id argument specifies the VLAN
ID in a four-digit format. If the VLAN ID has fewer than four digits, leading zeros are added. For
example, the default description of VLAN 100 is VLAN 0100.
Enabling packet dropping in the VLAN
About packet dropping in the VLAN
This feature enables the device to drop packets (including protocol packets) forwarded by the
software in a VLAN. To drop all packets that are received and transmitted in the VLAN, you must
configure a QoS policy. For more information about configuring QoS policies, see QoS configuration
in ACL and QoS Configuration Guide.
Procedure
1.
Enter system view.
system-view
2.
Enter VLAN view.
vlan vlan-id
3.
Enable packet dropping in the VLAN.
block outbound
By default, packet dropping is disabled in a VLAN.
Configuring port-based VLANs
Restrictions and guidelines for port-based VLANs
•
When you use the undo vlan command to delete the PVID of a port, either of the following
events occurs depending on the port link type:
For an access port, the PVID of the port changes to VLAN 1.
For a hybrid or trunk port, the PVID setting of the port does not change.
You can use a nonexistent VLAN as the PVID for a hybrid or trunk port, but not for an access
port.
•
As a best practice, set the same PVID for a local port and its peer.
•
To prevent a port from dropping untagged packets or PVID-tagged packets, assign the port to
its PVID.
Assigning an access port to a VLAN
About assigning an access port to a VLAN
You can assign an access port to a VLAN in VLAN view or interface view.
7