Users Guide

Layer 2 Switching Commands 868
no switchport access vlan
vlan-id — The identifier of the VLAN associated with the access port.
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