The port default vlan command sets a default VLAN for interfaces and adds interfaces to the VLAN.
The undo port default vlan command deletes the interfaces from the default VLAN and restores the default VLAN ID.
By default, no default VLAN is set for interface.
Usage Scenario
Frames sent from user hosts are untagged and those sent from a remote device may also be untagged. However, a switching device only processes and forwards tagged frames. Therefore, tags need to be added to the untagged frames on the switching device. To implement this function, run the port default vlan command to configure a default VLAN on an interface of the switching device. After this function is enabled, the interface adds the default VLAN ID to received untagged frames.
After a default VLAN is configured on an interface:Prerequisites
A VLAN has been created.
The link type of the interface has been configured as access or hybrid using the port link-type command.Precautions
A super VLAN cannot be configured as a default VLAN.
The port default vlan command has the same function as the port command in the VLAN view. The interface to be added to a VLAN must be a Layer 2 interface. If the interface is a Layer 3 interface, run the portswitch command to switch the interface to Layer 2. The port default vlan command cannot be configured on physical interfaces that are added to an Eth-Trunk.