CLI Guide

Layer 2 Switching Commands 889
Example
The following example shows how to configure the PVID for 1/0/8, when the
interface is in general mode.
console(config)#interface gigabitethernet 1/0/8
console(config-if-Gi1/0/8)#switchport general pvid 234
switchport mode
Use the switchport mode command in Interface Configuration mode to
configure the VLAN membership mode of a port. To reset the mode to the
appropriate default for the switch, use the no form of this command.
Syntax
switchport mode {access | trunk | general}
no switchport mode
access—An access port connects to a single end station belonging to a
single VLAN. An access port is configured with ingress filtering enabled
and will accept either an untagged frame or a packet tagged with the access
port VLAN. Tagged packets received with a VLAN other than the access
port VLAN are discarded. An access port transmits only untagged packets.
trunk—A trunk port connects two switches. A trunk port may belong to
multiple VLANs. A trunk port accepts only packets tagged with the VLAN
IDs of the VLANs to which the trunk is a member or untagged packets if
configured with a native VLAN. A trunk port only transmits tagged packets
for member VLANs other than the native VLAN and untagged packets for
the native VLAN.
general—Full 802.1Q support VLAN interface. A general mode port is a
combination of both trunk and access ports capabilities. It is possible to
fully configure all VLAN features on a general mode port. Both tagged and
untagged packets may be accepted and transmitted.
Default Configuration
The default switchport mode is access.
Command Mode
Interface Configuration Ethernet and port-channel mode