The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter contains the following sections:
This section describes how to configure Layer 2 switching ports as access or trunk ports.
Note |
For information about configuring a Switched Port Analyzer (SPAN) destination interface, see the Cisco Nexus 1000V InterCloud System Management Configuration Guide. |
Note |
For information about VLANs, MAC address tables, see the Cisco Nexus 1000V InterCloud Layer 2 Configuration Guide. |
The software supports high availability for Layer 2 ports.
VLAN trunking has the following prerequisite:
You are logged into the CLI.
VLAN trunking has the following guidelines and limitations:
Parameters | Default |
---|---|
Switchport mode |
Access |
Allowed VLANs |
1 to 3967, 4048 to 4094 |
Access VLAN ID |
VLAN1 |
Native VLAN ID |
VLAN1 |
Native VLAN ID tagging |
Disabled |
Administrative state |
Shut |
An access port transmits packets on only one untagged VLAN. You can specify the VLAN, and it becomes the access VLAN. If you do not specify a VLAN for an access port, that interface carries traffic only on the default VLAN 1.
switch# configure terminal switch(config)# port-profile type vethernet mgmt-access switch(config-port-prof)# switchport mode access switch(config-port-prof)# switchport access vlan 72 switch(config-port-prof)# no shutdown switch(config-port-prof)# state enabled switch(config-port-prof)# system vlan 72 switch(config-port-prof)# publish port-profile mgmt-access switch(config-port-prof)#
You can use this procedure to configure a Layer 2 port as a trunk port.
Step 1 |
switch# configure terminal Enters global configuration mode. |
||
Step 2 |
switch(config)# [no] vlan vlan-id Creates or deletes, and saves in the running configuration, a VLAN or a range or VLANs. |
||
Step 3 |
switch(config)# port-profile [type vethernet] name Enters port profile configuration mode for the named port profile. If the port profile does not already exist, it is created using the following characteristics: |
||
Step 4 |
switch(config-port-prof)# switchport mode trunk Designates that the interfaces are to be used as a trunking ports. A trunk port transmits untagged packets for the native VLAN and transmits encapsulated, tagged packets for all other VLANs. |
||
Step 5 |
switch(config-port-prof)# switchport trunk allowed vlan {allowed-vlans | add add-vlans | except except-vlans | remove remove-vlans | all | none} Designates the port profile as trunking and defines VLAN access to it as follows:
|
||
Step 6 |
switch(config-port-prof)# no shutdown Administratively enables all ports in the profile. |
||
Step 7 |
switch(config-port-prof)# state enabled Enables the port profile and applies its configuration to the assigned ports. |
||
Step 8 |
switch(config-port-prof)# system vlan vlan-id Adds system VLAN to this port profile. |
||
Step 9 |
switch(config-port-prof)# publish port-profile <name> Publishes port profile to Cisco Prime Network Services Controller. |
||
Step 10 |
(Optional)switch(config-port-prof)# copy running-config startup-config Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration. |
This example shows how to configure a trunk port profile.
switch# configure terminal switch(config)# port-profile port-profile type vethernet Trunk_To_Cloud switch(config-port-prof)# switchport mode trunk switch(config-port-prof)# switchport trunk allowed vlan 72,2315-2350 switch(config-port-prof)# no shutdown switch(config-port-prof)# state enabled switch(config-port-prof)# max ports 64 switch(config-port-prof)# system vlan 72 switch(config-port-prof)# publish port-profile switch(config-port-prof)#
Use one of the following commands to verify the access and trunk interface configuration information:
Command | Purpose |
---|---|
show interface vethernet [ brief | capabilities | counters | mac-address | status | switchport | trunk] |
Displays the interface configuration. |
show interface brief |
Displays interface configuration information, including the mode. |
show interface switchport |
Displays information, including access and trunk interface, information for all Layer 2 interfaces. |
show interface trunk [module module-number | vlan vlan-id] |
Displays trunk configuration information. |
show interface capabilities |
Displays information on the capabilities of the interfaces. |
show running-config interface vethernet |
Displays configuration information about the specified interface. |
Use one of the following commands to display access and trunk interface configuration information:
Command | Purpose |
---|---|
clear counters [ interface ] |
Clears the counters. |
show interface counters [ module module ] |
Displays input and output octets unicast packets, multicast packets, and broadcast packets. |
show interface counters detailed [ all ] |
Displays input packets, bytes, and multicast as well as output packets and bytes. |
show interface counters errors [ module module] |
Displays information on the number of error packets. |
Feature Name |
Releases |
Feature Information |
---|---|---|
Layer 2 interface parameters |
Release 5.2(1)IC1(1.1) |
This feature was introduced |