Specifications
2-851
Catalyst 4500 Se ries S wit ch C is co IO S C om mand R efer ence —Re lease I OS XE 3 .3.0 XO(1 5.1 (1)XO)
OL_28738 -01
Chapter 2 Cisco IOS Commands for the Catalyst 4500 Series Switches
switchport access vlan
switchport access vlan
To set the VLAN when an interface is in access mode, use the switchport access vlan command. To
reset the access mode VLAN to the appropriate default VLAN for the device, use the no form of this
command .
switchport access [vlan {vlan-id | dynamic }]
no switchport access vlan
Syntax Description
Defaults The default settings are as follows:
• The access VLAN and trunk int erface native VLAN are defa ult VLANs that correspon d to the
platform or the interface hardware.
• All VLAN lists include all VLANs.
Command Modes Interface configur ation mode
Usage Guidelines You must enter the switchport command without any keywords to configure the LAN interface as a
Layer 2 interface before you c an enter the switchport access vlan command. This action is required only
if you have not already entered the switchport command for the interface.
Entering the no switchport command shuts the port down and then reenables it, which could generate
messages on the device to which the port is connected.
The no form of the switchport access vlan command resets the access mode VLAN to the appropriate
default VLA N for th e devic e.
Valid values for vlan-id are from 1 to 4094.
Examples This exampl e shows how to cause the po rt interface to stop operating as a Cisco-routed port and convert
to a Layer 2-switched interface:
Switch(config-if)# switchport
Switch(config-if)#
Note This command is not used on platfor ms that do not su pport Cis co-routed ports. All physi cal ports o n such
platforms are assumed to be Layer 2-s witched interfaces.
This example shows how to cause a port interface that has already been configured as a switched
interface to operate in VLAN 2 instead of the platform’s default VLAN when in access mode:
Switch(config-if)# switchport access vlan 2
Switch(config-if)#
vlan-id (Optional) Number of the VLAN on the interface in access mode; valid values are from
1 to 4094.
dynamic (Optional) Enables VMPS control of the VLAN.