by C. Casquatch
Rooooooooooooooooooooooot
Lab by: https://gns3vault.com/switching/spanning-tree-root-guard

On all 3 switches:
conf t
hostname SWx ! Replace x with 1, 2, or 3
no ip routing
vlan 1
exit
Enable trunking and interfaces:
interface range gi0/0 - 3
no shutdown
switchport
switchport mode trunk
conf t
spanning-tree vlan 1 priority 0
end
conf t
spanning-tree vlan 1 priority 4096
end
Apply Root Guard on ports Gi0/2 and Gi0/3 (facing SW3):
conf t
interface range gi0/2, gi0/3
spanning-tree guard root
end
Run the following on all switches:
show spanning-tree vlan 1

Temporarily force SW3 to claim root:
conf t
spanning-tree vlan 1 priority 0
end
Then on SW1:
show spanning-tree inconsistentports
✅ Ports Gi0/2 and Gi0/3 should be in root-inconsistent state.

Restore SW3 to priority 4096:
conf t
spanning-tree vlan 1 priority 4096
end
Verify STP and ensure interfaces return to forwarding state.
