1223
Cisco Nexus 5500 Series NX-OS Layer 2 Interfaces Command Reference
OL-27880-02
Chapter S Commands
switchport access vlan
switchport access vlan
To set the access VLAN when the interface is in access mode, use the
switchport access vlan
command.
To reset the access-mode VLAN to the appropriate default VLAN for the switch, use the
no
form of this
command.
switchport access vlan
vlan-id
no switchport access vlan
Syntax Description
Command Default
VLAN 1
Command Modes
Interface configuration mode
Virtual Ethernet interface configuration mode
Command History
Usage Guidelines
Use the
no
form of the
switchport access vlan
command to reset the access-mode VLAN to the
appropriate default VLAN for the switch. This action may generate messages on the device to which the
port is connected.
Examples
This example shows how to configure an Ethernet interface to join VLAN 2:
switch#
configure terminal
switch(config)#
interface ethernet 1/7
switch(config-if)#
switchport access vlan 2
switch(config-if)#
This example shows how to configure a virtual Ethernet interface to join VLAN 5:
switch#
configure terminal
switch(config)#
interface vethernet 1
switch(config-if)#
switchport access vlan 5
switch(config-if)#
vlan-id
VLAN to set when the interface is in access mode. The range is from 1 to
4094, except for the VLANs reserved for internal use.
Release
Modification
5.2(1)N1(1)
This command was introduced.