Send document comments to nexus7k-docfeedback@cisco.com
3-14
Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 5.x
OL-23435-03
Chapter 3 Configuring Layer 2 Interfaces
Configuring Access and Trunk Interfaces
DETAILED STEPS
This example shows how to set Ethernet 3/1 as a Layer 2 trunk port:
switch# configure terminal
switch(config)# interface ethernet 3/1
switch(config-if)# switchport mode trunk
switch(config-if)#
Configuring the Native VLAN for 802.1Q Trunking Ports
You can configure the native VLAN for 802.1Q trunk ports. If you do not configure this parameter, the
trunk port uses the default VLAN as the native VLAN ID.
Note You cannot configure an FCoE VLAN as a native VLAN for an Ethernet interface.
Command Purpose
Step 1
configure terminal
Example:
switch# configure terminal
switch(config)#
Enters configuration mode.
Step 2
interface {type slot/port | port-channel
number}
Example:
switch(config)# interface ethernet 3/1
switch(config-if)#
Specifies an interface to configure, and enters interface
configuration mode.
Step 3
switchport mode {access | trunk}
Example:
switch(config-if)# switchport mode trunk
Sets the interface as a Layer 2 trunk port. A trunk port
can carry traffic in one or more VLANs on the same
physical link (VLANs are based on the trunk-allowed
VLANs list). By default, a trunk interface can carry
traffic for all VLANs. To specify that only certain
VLANs are allowed on the specified trunk, use the
switchport trunk allowed vlan command.
Step 4
exit
Example:
switch(config-if)# exit
switch(config)#
Exits the interface mode.
Step 5
show interface
Example:
switch# show interface
(Optional) Displays the interface status and
information.
Step 6
copy running-config startup-config
Example:
switch(config)# copy running-config
startup-config
(Optional Copies the running configuration to the
startup configuration.