You are the network administrator, and three switches sit in a triangle with redundant links between them.
Without Spanning Tree, that redundancy turns into a Layer 2 loop that floods every port and slows the network to a crawl.
Figure 1 – A Layer 2 loop before anyone controls the election
STP already runs by default, but it elected the Root Bridge on its own, with no plan behind it.
In this lab, you take control of that election and decide which switch is Root, which is the backup, and which stays non-root.The Target Design
Here is the target design for this lab: SW1 Root Bridge, SW2 Backup Root Bridge, SW3 non-root.

Figure 2 – Target design: Root, Backup, and non-root switches
Answer the question below
What role will SW1 have in this lab's target design?
With nothing configured, PVST+ is already running on every switch and the election already happened by default, purely on MAC address.

Figure 3 – The three-switch lab before any configuration
Confirming the Default Root
You did not choose a Root, yet one already exists.
Check SW2 first to see who holds the role right now:SW2# show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 0001.63A6.E107 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0001.63A6.E107 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Gi0/1 Desg FWD 4 128.25 P2p Gi0/2 Desg FWD 4 128.26 P2pSW2 ended up Root purely by chance in your lab, because its MAC address happened to be the lowest.
That is exactly the problem: nothing here was engineered.
Figure 4 – Initial topology with SW2 as the unplanned Root
Where SW3 Blocks by Default
SW3 lost the election, so it had to block one port on its own to keep the topology loop-free.
Check which one:SW3# show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 0001.63A6.E107 Cost 4 Port 26(GigabitEthernet0/2) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0090.2BE2.8EE9 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Gi0/1 Altn BLK 4 128.25 P2p Gi0/2 Root FWD 4 128.26 P2pSW3 sees SW2 as Root and blocked Gi0/1, its link toward SW1.
Nothing planned that: the blocked port landed wherever the default election left it.
Keep that port in mind: it will move once you make SW1 the Root.Answer the question below
Which switch is Root by default, before any configuration?
Here is how to take control of the election.
Priority Values
Cisco lets you set the priority manually, from 0 to 61440 in increments of 4096.
The lower the value, the more likely the switch becomes Root..png)
Figure 5 – Bridge ID recap: priority and MAC decide the winner
A Bridge ID is not a single value: it is two parts joined together.
The first part is the priority, and the switch with the lowest priority wins the election.
Because every switch ships with the same default priority, and the VLAN ID adds the same value to all of them, the MAC address becomes the final tiebreaker.
That is why an untouched network picks its Root purely by MAC, exactly what happened to SW2.Priority Value
Description
0
Lowest possible, almost guaranteed Root
4096
Very high priority
61440
Highest value, least likely to become Root
Table 1 – STP priority values
Setting the Priority Manually
The most direct way to win the election is to give SW1 the lowest priority yourself.
Priority moves in steps of 4096, so 24576 sits two full steps below the default and beats every switch still at 32768.SW1# conf t Enter configuration commands, one per line. End with CNTL/Z. SW1(config)# spanning-tree vlan 1 priority 24576 SW1(config)# endThis works, but you had to know that 24576 was the right number.
On a larger network, computing that value by hand is easy to get wrong.Using the root primary Shortcut
Rather than compute a value by hand, use Cisco's shortcut on SW1:
SW1# conf t Enter configuration commands, one per line. End with CNTL/Z. SW1(config)# spanning-tree vlan 1 root primary SW1(config)# endThis one command computes the priority for you:
It sets SW1's priority to
24576 + VLAN ID. This is low enough to beat any switch left at the default 32768, so SW1 wins here.Only if another switch already sits below 24576 does it instead drop 4096 under that switch, still guaranteeing the win.
Answer the question below
root primary sets SW1's priority to ___ + VLAN ID.
Confirming SW1 as Root
Confirm the new election on SW1:
SW1# show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 24577 Address 0060.7085.E6B0 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 24577 (priority 24576 sys-id-ext 1) Address 0060.7085.E6B0 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Gi0/1 Desg FWD 4 128.25 P2p Gi0/2 Desg FWD 4 128.26 P2pPriority dropped from 32769 to
24577and SW1 now owns the election.
That is a deliberate, engineered outcome, not a MAC address coincidence.Answer the question below
In what increments must the STP bridge priority be set?
Answer the question below
SW3 is Root at priority 20480: which priority does SW1 show after root primary?
If SW1 fails, an unplanned election could hand the Root role to the switch with the lowest Bridge ID.
Setting SW2 as backup makes the failover predictable.The Backup Root Bridge
A backup only matters if it can take over the moment SW1 goes down.

Figure 6 – Target design with SW1 Root and SW2 Backup
Configuring and Verifying
Apply the same root secondary logic on SW2.
SW2# conf t Enter configuration commands, one per line. End with CNTL/Z. SW2(config)# spanning-tree vlan 1 root secondary SW2(config)# endThis assigns
28672 + VLAN ID, lower than the default but still higher than SW1's Root priority, so SW2 never competes while SW1 is up.SW2# show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 24577 Address 0060.7085.E6B0 Cost 4 Port 25(GigabitEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 28673 (priority 28672 sys-id-ext 1) Address 0001.63A6.E107 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20Answer the question below
What is SW2's Bridge ID priority after the root secondary command?
SW3 was never touched.
It keeps its default priority and simply recalculates its role once the new Root is in place.Checking SW3's Election View
SW3 never changed, so check how it now sees the topology.

Figure 7 – Verifying priority and Bridge ID across all three switches
SW3# show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 24577 Address 0060.7085.E6B0 Cost 4 Port 25(GigabitEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0090.2BE2.8EE9 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Gi0/1 Root FWD 4 128.25 P2p Gi0/2 Altn BLK 4 128.26 P2pThe Final Blocked Port
SW3 kept its default priority, recognized SW1 as the new Root, and moved its blocked port to Gi0/2.
Your topology is now fully engineered: SW1 Root, SW2 Backup, SW3 non-root with one port safely blocked.
Figure 8 – SW3 blocks the redundant port to keep the lab loop-free
You now control the Root Bridge for one VLAN. The next lesson, Multiple Spanning Tree (MST), groups your VLANs into instances so every uplink carries traffic.
Answer the question below
Which port does SW3 block after SW1 becomes Root?