The port command configures a VLAN as the default VLAN of an interface and adds the interface to the VLAN.
The undo port command restores the default VLAN of an interface to the default setting.
By default, VLAN 1 is the default VLAN of all interfaces.
port interface-type { interface-number1 [ to interface-number2 ] } &<1-10>
undo port interface-type { interface-number1 [ to interface-number2 ] } &<1-10>
Parameter |
Description |
Value |
---|---|---|
interface-type { interface-number1 [ to interface-number2 ] } |
Configures the default VLAN for multiple interfaces.
If to interface-number2 is not specified, only one interface is specified. You can specify 10 interface ranges at one time. |
- |
Usage Scenario
All frames sent from a user device are untagged, and frames sent from a remote device may also be untagged. However, the device processes only tagged frames. Therefore, the device adds a tag to each untagged frame received by an interface. The default VLAN ID of the interface can be added to untagged frames so that these frames are forwarded in the default VLAN.
Prerequisites
The link-type of specified interfaces cannot be access or trunk before you run the port command.
Precautions
A super VLAN cannot be configured as the default VLAN of interfaces.
The undo port command deletes the default VLAN of the specified interfaces only if the current VLAN is the default VLAN of these interfaces.
If you run the port command multiple times in the same VLAN view, the VLAN is configured as the default VLAN of all the specified interfaces.
You can also run the port default vlan command in the interface view to configure the default VLAN for an interface. The two commands have the same function.