Maintaining and Configuring STP
How to configure a root bridge

The switch with the lowest BID will become the root bridge for a VLAN. Specific configuration commands are used to affect which switch will become the root bridge.

A Catalyst switch running PVST (Per VLAN Spanning Tree) maintains an instance of spanning tree for each active VLAN configured on the switch. A unique Bridge ID is associated with each instance. For each VLAN, the switch with the lowest BID will become the root bridge for that VLAN. Whenever the bridge priority changes, the BID also changes. This result is the re-computation of the root bridge for the VLAN.

To configure a switch to become the root bridge for a specified VLAN, use the command spanning-tree vlanvlan-ID root primary. Assuming the other bridges in the VLAN retain their default STP priority, this switch will become the root bridge.

NOTE:

The root bridge for each instance of spanning tree should be a Building Distribution switch. On a network with a collapsed backbone and Building Distribution layer, one of the backbone switches should be the root bridge.

A secondary root is a switch that may become the root bridge for a VLAN if the primary root bridge fails. To configure a switch as the secondary root bridge for the VLAN, use the command spanning-tree vlanvlan-ID root secondary. Assuming the other bridges in the VLAN retain their default STP priority, this switch will become the root bridge in the event that the primary root bridge fails. This command can be executed on more than one switch to configure multiple backup root bridges.


Lab Activity

Lab Exercise 1: Spanning-Tree Protocol (STP) Default Behavior

The purpose of this lab is to observe the default behavior of STP.

Lab Activity

Lab Exercise 2: Use Network Inspector to Observe STP Behavior

The purpose of this lab is to observe STP behavior with the Network Inspector switch trace feature.

Lab Activity

Lab Exercise 3: Advanced PVST+ Configuration

The purpose of this lab is to modify the default per-VLAN spanning tree plus (PVST+) configuration to control the spanning tree behavior.

Lab Activity

Lab Exercise 4: Per-VLAN Spanning-Tree Load Balancing

The purpose of this lab is to modify the default behavior of spanning tree for VLAN load balancing using Cisco IOS commands.