Switchport Access Vlan - Cisco Catalyst 2960-X Command Reference Manual

Layer 2
Hide thumbs Also See for Catalyst 2960-X:
Table of Contents

Advertisement

Layer 2 Commands

switchport access vlan

To configure a port as a static-access, use the switchport access vlan command in interface configuration
mode. To reset the access mode to the default VLAN mode, use the no form of this command.
switchport access vlan vlan-id
no switchport access vlan
Syntax Description
vlan-id
Command Default
The default access VLAN and trunk interface native VLAN is a default VLAN corresponding to the platform
or interface hardware.
A dynamic-access port is initially a member of no VLAN and receives its assignment based on the packet it
receives.
Command Modes
Interface configuration
Command History
Release
Cisco IOS 15.0(2)EX
Usage Guidelines
The port must be in access mode before the switchport access vlan command can take effect.
If the switchport mode is set to access vlan vlan-id, the port operates as a member of the specified VLAN.
An access port can be assigned to only one VLAN.
The no switchport access command resets the access mode VLAN to the appropriate default VLAN for the
device.
Examples
This example shows how to change a switched port interface that is operating in access mode to operate in
VLAN 2 instead of the default VLAN:
Switch(config-if)# switchport access vlan 2
Related Commands
Command
switchport mode
OL-29043 -01
VLAN ID of the access mode VLAN. The range is 1 to 4094.
Modification
This command was introduced.
Description
Configures the VLAN membership mode of a port.
Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX
switchport access vlan
115

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents