Cisco Nexus 5000 Series Switch CLI Software Configuration Guide, NX-OS 4.0(1a)N1 (OL-16597-01, January 2009)

Send feedback to nx5000-docfeedback@cisco.com
12-7
Cisco Nexus 5000 Series Switch CLI Software Configuration Guide
OL-16597-01
Chapter 12 Configuring Access and Trunk Interfaces
Configuring Access and Trunk Interfaces
This example shows how to set the native VLAN for Ethernet 3/1 Ethernet trunk port to VLAN 5:
switch# configure terminal
switch(config)# interface ethernet 3/1
switch(config-if)# switchport trunk native vlan 5
Configuring the Allowed VLANs for Trunking Ports
You can specify the IDs for the VLANs that are allowed on the specific trunk port.
Before you configure the allowed VLANs for the specified trunk ports, ensure that you are configuring
the correct interfaces and that the interfaces are trunks.
To configure the allowed VLAN for a trunk port, perform this task:
This example shows how to add VLANs 15 to 20 to the list of allowed VLANs on the Ethernet 3/1
Ethernet trunk port:
switch# configure terminal
switch(config)# interface ethernet 3/1
switch(config-if)# switchport trunk allow vlan 15-20
Step 2
switch(config)# interface {type
slot/port | port-channel number}
Specifies an interface to configure, and enters interface
configuration mode.
Step 3
switch(config-if)# switchport trunk
native vlan vlan-id
Sets the native VLAN for the 802.1Q trunk. Valid
values are from 1 to 4094, except those VLANs
reserved for internal use. The default value is VLAN1.
Command Purpose
Command Purpose
Step 1
switch# configure terminal
Enters configuration mode.
Step 2
switch(config)# interface {type
slot/port | port-channel number}
Specifies an interface to configure, and enters interface
configuration mode.
Step 3
switch(config-if)# switchport trunk
allowed vlan {vlan-list all | none [add
|except | none | remove {vlan-list}]}
Sets allowed VLANs for the trunk interface. The
default is to allow all VLANs on the trunk interface: 1
to 3967 and 4048 to 4094. VLANs 3968 to 4047 are the
default VLANs reserved for internal use by default;
this group of VLANs is configurable. By default, all
VLANs are allowed on all trunk interfaces.
Note You cannot add internally allocated VLANs as
allowed VLANs on trunk ports. The system
returns a message if you attempt to list an
internally allocated VLAN as an allowed
VLAN.