Send document comments to nexus7k-docfeedback@cisco.com
3-10
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
• Configuring a LAN Interface as a Layer 2 Access Port, page 3-10
• Configuring Access Host Ports, page 3-11
• Configuring Trunk Ports, page 3-13
• Configuring the Native VLAN for 802.1Q Trunking Ports, page 3-14
• Configuring the Allowed VLANs for Trunking Ports, page 3-16
• Configuring a Default Interface, page 3-17
• Configuring SVI Autostate Exclude, page 3-18
• Configuring the Device to Tag Native VLAN Traffic, page 3-20
• Changing the System Default Port Mode to Layer 2, page 3-21
Note If you are familiar with the Cisco IOS CLI, be aware that the Cisco NX-OS commands for this feature
might differ from the Cisco IOS commands that you would use.
Guidelines for Configuring Access and Trunk Interfaces
All VLANs on a trunk must be in the same VDC.
Configuring a LAN Interface as a Layer 2 Access Port
You can configure a Layer 2 port as an access port. An access port transmits packets on only one,
untagged VLAN. You specify which VLAN traffic that the interface carries, which becomes the access
VLAN. If you do not specify a VLAN for an access port, that interface carries traffic only on the default
VLAN. The default VLAN is VLAN1.
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.
BEFORE YOU BEGIN
Ensure that you are configuring a Layer 2 interface.
SUMMARY STEPS
1. configure terminal
2. interface {{type slot/port} | {port-channel number}}
3. switchport mode {access | trunk}
4. switchport access vlan vlan-id
5. exit
6. (Optional) show interface
7. (Optional) copy running-config startup-config