switchport access vlan
To configure a port as a static-access port, use the
switchport access vlan
command in interface configuration
mode. To reset the access mode to the default VLAN mode for the controller, use the
no
form of this command.
switchport access vlan vlan-id
no switchport access vlan
Syntax Description
VLAN ID of the access mode VLAN; the range is 1 to 4094.
vlan-id
Command Default
The default access VLAN and trunk interface native VLAN is a default VLAN corresponding to the platform
or interface hardware.
Command Modes
Interface configuration
Command History
Modification
Release
This command was introduced.
Cisco IOS XE 3.2SE
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:
Controller(config-if)#
switchport access vlan 2
Related Commands
Description
Command
Configures the VLAN membership mode of a port.
Layer 2/3 Command Reference, Cisco IOS XE Release 3E (Cisco WLC 5700 Series)
62
OL-32323-01
Layer 2/3 Commands
switchport access vlan