Spanning Tree Protocol (STP) in Ethernet networks is used to build a loop-free logical topology to prevent bridge loops which result in broadcast storms. When a loop is detected, STP automatically shuts down an interface or port channel, as shown in the figure below. Virtually all topologies should implement spanning tree as a precaution. There are multiple spanning tree protocols supported in SmartFabric OS10 including Rapid Spanning Tree Protocol (RSTP), Rapid Per-VLAN Spanning Tree+ (RPVST+), and Multiple Spanning Tree (MST). These protocols are covered in detail in the SmartFabric OS10 User Guide.
Configuring the RPVST+ protocol is demonstrated in the example below. The commonly used RPVST+ is enabled by default in SmartFabric OS10, and is also supported on the Cisco Nexus 5000. Port-channels or physical interfaces must be a member of a VLAN to participate in RPVST+. A spanning tree instance is created for a VLAN upon adding the first member port to the VLAN.
There are several global and port level configuration commands for spanning tree. Global commands are used to enable/disable spanning tree on the entire switch, whereas port level commands are used to limit or supplement spanning tree features on individual ports.
From global configuration mode, the example commands below set the spanning tree mode on each switch to RPVST+ (default), and then sets the priorities for each VLAN on each switch. This bridge priority helps determine which switch on the network is more likely to become the root bridge for a VLAN when loops are detected on that particular VLAN. There are 16 bridge priorities ranging from 0 to 61440, in increments of 4096. Lower priority numbers are more likely to become the root bridge. Switches that you do not care about becoming root can usually be left at the default priority of 32768, or raised as high as the highest setting of 61440.
Configure RPVST+ and set the priority for the wanted root bridges for each VLAN | Configure RPVST+ and set the priority for the wanted non-root bridges for each VLAN |
On the first Dell EMC switch (wanted root bridge)
| On the second Dell EMC switch On the Cisco Nexus switch
|
Notice that one of the trunks in the Port channels figure is not used to pass traffic for either VLAN since a single switch on the network was assigned the root bridge role. For RPVST+ demonstration purposes, give VLAN 10 the lower priority on one switch, and VLAN 20 the lower priority on another switch. This change creates two root bridges, one for each VLAN, as shown in the RPVST+ using all port channel trunks figure. When designing or modifying a network, the topologies need to be carefully designed, with all possible root bridge assignments considered and properly configured.
The show spanning-tree active and show spanning-tree brief commands are used to see the spanning tree configuration and status, including which ports are currently blocking and which ports are forwarding for each VLAN on the switch.