Administrator Guide

Layer 2 Switching Commands 824
Default Configuration
This command has no default values.
Command Mode
Interface Configuration (Ethernet and port channel) mode
User Guidelines
This command configures the interface access mode VLAN membership. The
no form of the command sets the access mode VLAN membership to VLAN
1. It is possible to configure the access mode VLAN identifier when the port is
in general or trunk mode. Doing so does not change the VLAN membership
of the interface until the interface is configured into access mode.
If the VLAN identified in the command has not been previously created, the
system creates the VLAN, issues a message, and associates the VLAN with the
interface.
Examples
The following example configures interface gi1/0/8 to operate in access mode
with a VLAN membership of 23. Received untagged packets are processed on
VLAN 23. Received packets tagged with VLAN 23 are also accepted. Other
received tagged packets are discarded.
console(config)#interface gigabitethernet 1/0/8
console(config-if-Gi1/0/8)#switchport access vlan 23
The following example sets the PVID for interface Gi1/0/12 to VLAN ID 33.
Since VLAN 33 does not exist, it is automatically created.
console(config)# interface gi1/0/12
console(config-if-Gi1/0/12)# switchport access vlan 33
Access VLAN does not exist. Creating VLAN 33
switchport dot1q ethertype (Global Configuration)
Use the switchport dot1q ethertype command to define additional QinQ
tunneling TPIDs for matching in the outer VLAN tag of received frames. Use
the no form of the command to remove the configured TPIDs.
2CSNXXX_SWUM204.book Page 824 Monday, January 25, 2016 1:25 PM