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.
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
The IEEE 802.1Q trunks impose these limitations on the trunking strategy for a network:
In a network of Cisco controllers connected through IEEE 802.1Q trunks, the controllers maintain one spanning-tree instance for each VLAN allowed on the trunks. Non-Cisco devices might support one spanning-tree instance for all VLANs.
When you connect a Cisco controller to a non-Cisco device through an IEEE 802.1Q trunk, the Cisco controller combines the spanning-tree instance of the VLAN of the trunk with the spanning-tree instance of the non-Cisco IEEE 802.1Q controller. However, spanning-tree information for each VLAN is maintained by Cisco controllers separated by a cloud of non-Cisco IEEE 802.1Q controllers. The non-Cisco IEEE 802.1Q cloud separating the Cisco controllers is treated as a single trunk link between the controllers.
Make sure the native VLAN for an IEEE 802.1Q trunk is the same on both ends of the trunk link. If the native VLAN on one end of the trunk is different from the native VLAN on the other end, spanning-tree loops might result.
Disabling spanning tree on the native VLAN of an IEEE 802.1Q trunk without disabling spanning tree on every VLAN in the network can potentially cause spanning-tree loops. We recommend that you leave spanning tree enabled on the native VLAN of an IEEE 802.1Q trunk or disable spanning tree on every VLAN in the network. Make sure your network is loop-free before disabling spanning tree.
A trunk port cannot be a secure port.
We recommend that you configure no more than 24 trunk ports in Per VLAN Spanning Tree (PVST) mode and no more than 40 trunk ports in Multiple Spanning Tree (MST) mode.
If you try to enable IEEE 802.1x on a trunk port, an error message appears, and IEEE 802.1x is not enabled. If you try to change the mode of an IEEE 802.1x-enabled port to trunk, the port mode is not changed.
A port in dynamic mode can negotiate with its neighbor to become a trunk port. If you try to enable IEEE 802.1x on a dynamic port, an error message appears, and IEEE 802.1x is not enabled. If you try to change the mode of an IEEE 802.1x-enabled port to dynamic, the port mode is not changed.
Dynamic Trunking Protocol (DTP) is not supported on tunnel ports.
You cannot have a switch stack containing a mix of Catalyst 3850 and Catalyst 3650 switches.
Information About VLAN Trunks
A trunk is a point-to-point link between one or more Ethernet controller interfaces and another networking device such as a router or a controller. Ethernet trunks carry the traffic of multiple VLANs over a single link, and you can extend the VLANs across an entire network.
The following trunking encapsulations are available on all Ethernet interfaces:
Ethernet trunk interfaces support different trunking modes. You can set an interface as trunking or nontrunking or to negotiate trunking with the neighboring interface. To autonegotiate trunking, the interfaces must be in the same VTP domain.
Trunk negotiation is managed by the Dynamic Trunking Protocol (DTP), which is a Point-to-Point Protocol (PPP). However, some internetworking devices might forward DTP frames improperly, which could cause misconfigurations.
Mode |
Function |
---|---|
switchport mode access |
Puts the interface (access port) into permanent nontrunking mode and negotiates to convert the link into a nontrunk link. The interface becomes a nontrunk interface regardless of whether or not the neighboring interface is a trunk interface. |
switchport mode dynamic auto |
Makes the interface able to convert the link to a trunk link. The interface becomes a trunk interface if the neighboring interface is set to trunk or desirable mode. The default switchport mode for all Ethernet interfaces is dynamic auto. |
switchport mode dynamic desirable |
Makes the interface actively attempt to convert the link to a trunk link. The interface becomes a trunk interface if the neighboring interface is set to trunk, desirable, or auto mode. |
switchport mode trunk |
Puts the interface into permanent trunking mode and negotiates to convert the neighboring link into a trunk link. The interface becomes a trunk interface even if the neighboring interface is not a trunk interface. |
switchport nonegotiate |
Prevents the interface from generating DTP frames. You can use this command only when the interface switchport mode is access or trunk. You must manually configure the neighboring interface as a trunk interface to establish a trunk link. |
By default, a trunk port sends traffic to and receives traffic from all VLANs. All VLAN IDs, 1 to 4094, are allowed on each trunk. However, you can remove VLANs from the allowed list, preventing traffic from those VLANs from passing over the trunk.
To reduce the risk of spanning-tree loops or storms, you can disable VLAN 1 on any individual VLAN trunk port by removing VLAN 1 from the allowed list. When you remove VLAN 1 from a trunk port, the interface continues to send and receive management traffic, for example, Cisco Discovery Protocol (CDP), Port Aggregation Protocol (PAgP), Link Aggregation Control Protocol (LACP), DTP, and VTP in VLAN 1.
If a trunk port with VLAN 1 disabled is converted to a nontrunk port, it is added to the access VLAN. If the access VLAN is set to 1, the port will be added to VLAN 1, regardless of the switchport trunk allowed setting. The same is true for any VLAN that has been disabled on the port.
A trunk port can become a member of a VLAN if the VLAN is enabled, if VTP knows of the VLAN, and if the VLAN is in the allowed list for the port. When VTP detects a newly enabled VLAN and the VLAN is in the allowed list for a trunk port, the trunk port automatically becomes a member of the enabled VLAN. When VTP detects a new VLAN and the VLAN is not in the allowed list for a trunk port, the trunk port does not become a member of the new VLAN.
Load sharing divides the bandwidth supplied by parallel trunks connecting controllers. To avoid loops, STP normally blocks all but one parallel link between controllers. Using load sharing, you divide the traffic between the links according to which VLAN the traffic belongs.
You configure load sharing on trunk ports by using STP port priorities or STP path costs. For load sharing using STP port priorities, both load-sharing links must be connected to the same controller. For load sharing using STP path costs, each load-sharing link can be connected to the same controller or to two different controllers.
When two ports on the same controller form a loop, the controller uses the STP port priority to decide which port is enabled and which port is in a blocking state. You can set the priorities on a parallel trunk port so that the port carries all the traffic for a given VLAN. The trunk port with the higher priority (lower values) for a VLAN is forwarding traffic for that VLAN. The trunk port with the lower priority (higher values) for the same VLAN remains in a blocking state for that VLAN. One trunk port sends or receives all traffic for the VLAN.
You can configure parallel trunks to share VLAN traffic by setting different path costs on a trunk and associating the path costs with different sets of VLANs, blocking different ports for different VLANs. The VLANs keep the traffic separate and maintain redundancy in the event of a lost link.
Trunking interacts with other features in these ways:
A trunk port cannot be a secure port.
We recommend that you configure no more than 24 trunk ports in Per VLAN Spanning Tree (PVST) mode and no more than 40 trunk ports in Multiple Spanning Tree (MST) mode.
If you try to enable IEEE 802.1x on a trunk port, an error message appears, and IEEE 802.1x is not enabled. If you try to change the mode of an IEEE 802.1x-enabled port to trunk, the port mode is not changed.
A port in dynamic mode can negotiate with its neighbor to become a trunk port. If you try to enable IEEE 802.1x on a dynamic port, an error message appears, and IEEE 802.1x is not enabled. If you try to change the mode of an IEEE 802.1x-enabled port to dynamic, the port mode is not changed.
To avoid trunking misconfigurations, configure interfaces connected to devices that do not support DTP to not forward DTP frames, that is, to turn off DTP.
If you do not intend to trunk across those links, use the switchport mode access interface configuration command to disable trunking.
To enable trunking to a device that does not support DTP, use the switchport mode trunk and switchport nonegotiate interface configuration commands to cause the interface to become a trunk but to not generate DTP frames.
Configuring an Ethernet Interface as a Trunk Port
Because trunk ports send and receive VTP advertisements, to use VTP you must ensure that at least one trunk port is configured on the controller and that this trunk port is connected to the trunk port of a second controller. Otherwise, the controller cannot receive any VTP advertisements.
By default, an interface is in Layer 2 mode. The default mode for Layer 2 interfaces is switchport mode dynamic auto. If the neighboring interface supports trunking and is configured to allow trunking, the link is a Layer 2 trunk or, if the interface is in Layer 3 mode, it becomes a Layer 2 trunk when you enter the switchport interface configuration command.
1.
enable
3.
interface
interface-id
4.
switchport mode {dynamic {auto |
desirable} |
trunk}
5.
switchport access vlan
vlan-id
6.
switchport trunk native vlan
vlan-id
8.
show interfaces
interface-id
switchport
9.
show interfaces
interface-id
trunk
10.
copy running-config startup-config
VLAN 1 is the default VLAN on all trunk ports in all Cisco controllers, and it has previously been a requirement that VLAN 1 always be enabled on every trunk link. You can use the VLAN 1 minimization feature to disable VLAN 1 on any individual VLAN trunk link so that no user traffic (including spanning-tree advertisements) is sent or received on VLAN 1.
1.
enable
3.
interface
interface-id
4.
switchport mode trunk
5.
switchport trunk allowed
vlan {
word |
add |
all
|
except |
none
|
remove}
vlan-list
7.
show interfaces
interface-id
switchport
8.
copy running-config startup-config
The pruning-eligible list applies only to trunk ports. Each trunk port has its own eligibility list. VTP pruning must be enabled for this procedure to take effect.
1.
enable
3.
interface
interface-id
4.
switchport trunk pruning
vlan {add |
except
|
none |
remove}
vlan-list [,vlan [,vlan [,,,]]
6.
show interfaces
interface-id
switchport
7.
copy running-config startup-config
A trunk port configured with IEEE 802.1Q tagging can receive both tagged and untagged traffic. By default, the controller forwards untagged traffic in the native VLAN configured for the port. The native VLAN is VLAN 1 by default.
The native VLAN can be assigned any VLAN ID.
If a packet has a VLAN ID that is the same as the outgoing port native VLAN ID, the packet is sent untagged; otherwise, the controller sends the packet with a tag.
1.
enable
3.
interface
interface-id
4.
switchport trunk native vlan
vlan-id
5.
end
6.
show interfaces
interface-id
switchport
7.
copy running-config startup-config
Configuring Trunk Ports for Load Sharing
These steps describe how to configure a network with load sharing using STP port priorities.
1.
enable
2.
configure terminal
3.
vtp domain
domain-name
4.
vtp mode server
6.
show vtp status
7.
show vlan
8.
configure terminal
9.
interface
interface-id
10.
switchport mode trunk
11.
end
12.
show interfaces
interface-id
switchport
13. Repeat the above steps on Controller A for a second port in the controller.
14. Repeat the above steps on Controller B to configure the trunk ports that connect to the trunk ports configured on Controller A.
15.
show vlan
16.
configure terminal
17.
interface
interface-id
18.
spanning-tree vlan
vlan-range
port-priority
priority-value
19.
exit
20.
interface
interface-id
21.
spanning-tree vlan
vlan-range
port-priority
priority-value
22.
end
23.
show running-config
24.
copy running-config startup-config
These steps describe how to configure a network with load sharing using STP path costs.
1.
enable
2.
configure terminal
3.
interface
interface-id
4.
switchport mode trunk
5.
exit
6. Repeat Steps 2 through 4 on a second interface in Controller A .
8.
show running-config
9.
show vlan
10.
configure terminal
11.
interface
interface-id
12.
spanning-tree vlan
vlan-range
cost
cost-value
13.
end
14. Repeat Steps 9 through 13 on the other configured trunk interface on Controller A, and set the spanning-tree path cost to 30 for VLANs 8, 9, and 10.
15.
exit
16.
show running-config
17.
copy running-config startup-config
After configuring VLAN trunks, you can configure the following:
Related Topic | Document Title |
---|---|
CLI commands |
VLAN Command Reference (Catalyst 3850 Switches) VLAN Command Reference (Cisco WLC 5700 Series) |
Standard/RFC | Title |
---|---|
RFC 1573 |
Evolution of the Interfaces Group of MIB-II |
RFC 1757 |
Remote Network Monitoring Management |
RFC 2021 |
SNMPv2 Management Information Base for the Transmission Control Protocol using SMIv2 |
MIB | MIBs Link |
---|---|
All supported MIBs for this release. |
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: |
Description | Link |
---|---|
The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies. To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds. Access to most tools on the Cisco Support website requires a Cisco.com user ID and password. |
Release |
Modification |
---|---|
|