1231
Cisco Nexus 5500 Series NX-OS Layer 2 Interfaces Command Reference
OL-27880-02
Chapter S Commands
switchport mode
switchport mode
To configure the interface as a nontrunking nontagged single-VLAN Ethernet or virtual Ethernet
interface, use the
switchport mode
command. To remove the configuration and restore the default, use
the
no
form of this command.
switchport mode
{
access
|
trunk
|
vntag
}
no switchport mode
{
access
|
trunk
|
vntag
}
no switchport mode
Syntax Description
Command Default
An access port carries traffic for VLAN 1.
Command Modes
Interface configuration mode
Virtual Ethernet interface configuration mode
Command History
Usage Guidelines
An access port can carry traffic in one VLAN only. By default, an access port carries traffic for VLAN 1.
To set the access port to carry traffic for a different VLAN, use the
switchport access vlan
command.
The VLAN must exist before you can specify that VLAN as an access VLAN. The system shuts down
an access port that is assigned to an access VLAN that does not exist.
A virtual network tag (VNTag) port helps to identify the virtual interfaces on that physical port.
For a virtual Ethernet interface, use the
no
form of the command without the keywords.
Examples
This example shows how to set an interface as an Ethernet access port that carries traffic for a specific
VLAN only:
switch(config)#
interface ethernet 2/1
switch(config-if)#
switchport mode access
switch(config-if)#
switchport access vlan 5
switch(config-if)#
This example shows how to set an interface as a VNTag port:
switch(config)#
interface ethernet 1/5
access
Specifies that the interface is in access mode.
trunk
Specifies that the interface is in trunk mode.
vntag
Specifies that the interface is in port mode.
Note
This keyword does not apply to a virtual Ethernet interface.
Release
Modification
5.2(1)N1(1)
This command was introduced.