【Default】
Default port mode is access port.
【Command configuration mode】
Interface configuration mode
【Usage】
Use switchport mode command to configure a port to be trunk port or access port.
If a port configures to be a trunk port, the vlan mode changes untagged into
tagged, and if a port configures to be an access one, the vlan mode changes
tagged into untagged. In addition, configure a port to be a trunk one, then create a
vlan, this port will automatically be added to the vlan.
【Example】
!Configure Ethernet 0/0/1 to be trunk port
QTECH(config-if-ethernet-0/0/1)#switchport mode trunk
2.1.17 switchport trunk allowed vlan
2-21