Before You Begin
Be aware that the Cisco Nexus 1000V commands may differ from the Cisco IOS commands.
Procedure
PurposeCommand or Action
Enters global configuration mode.switch# configure terminal
Step 1
Specifies the interface that you are configuring and places you
in interface configuration mode. The interface argument is
defined as follows:
switch(config)# interface
interface
Step 2
•
For an Ethernet port, use the ethernet slot/port command,
where slot is the module slot number and port is the port
number.
•
For a vEthernet port, use the vethernet interface-number
command, where interface-number is a number from 1
to 1048575.
Designates the native VLAN for the 802.1Q trunk in the running
configuration. Valid values are from 1 to 4094, except those
VLANs reserved for internal use. The default value is VLAN1.
switch#(config-if) switchport
trunk native vlanvlan-id
Step 3
(Optional)
Displays the status and information of VLANs.
switch#(config-if) show vlan
Step 4
(Optional)
Saves the change persistently through reboots and restarts by
copying the running configuration to the startup configuration.
switch(config-if)# copy
running-config startup-config
Step 5
This example shows how to set the native VLAN for the Ethernet 3/1, Layer 2 trunk port to VLAN 5:
switch# configure terminal
switch(config)# interface ethernet 3/1
switch(config-if)# switchport trunk native vlan 5
switch(config-if)#
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 Begin
•
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.
•
Know that the Cisco Nexus 1000V commands may differ from the Cisco IOS commands.
Cisco Nexus 1000V for VMware vSphere Interface Configuration Guide, Release 5.x
29
Configuring Layer 2 Interfaces
Configuring the Allowed VLANs for Trunking Ports