by C. Casquatch
Lab from Renee Molenaar
| Switch | Connections |
|---|---|
| SW1 | Gi0/0 and Gi0/1 to SW3; Gi0/2 and Gi0/3 to SW2 |
| SW2 | Gi0/0 and Gi0/1 to SW1; Gi0/2 and Gi0/3 to SW3 |
| SW3 | Gi0/0 and Gi0/1 to SW1; Gi0/2 and Gi0/3 to SW2 |

Substitution:
- Gi0/0 used in place of Fa0/14
- Gi1/0 used in place of Fa0/5 (edge port)
Switch(config)# spanning-tree mode rapid-pvst
Switch(config)# vlan 10
Switch(config-vlan)# name VLAN10
Switch(config)# vlan 20
Switch(config-vlan)# name VLAN20
Switch(config)# vlan 30
Switch(config-vlan)# name VLAN30
Switch(config)# interface range gi0/0 - 3
Switch(config-if-range)# switchport trunk encapsulation dot1q
Switch(config-if-range)# switchport mode trunk
Switch(config-if-range)# no shutdown
SW1(config)# spanning-tree vlan 10 priority 4096
SW2(config)# spanning-tree vlan 20 priority 4096
SW3(config)# spanning-tree vlan 30 priority 4096
SW2(config)# interface range gi0/0 - 1
SW2(config-if-range)# spanning-tree vlan 10 cost 200
SW3(config)# interface gi0/0
SW3(config-if)# spanning-tree vlan 10 port-priority 64
Switch(config)# interface gi1/0
Switch(config-if)# spanning-tree portfast
โ ๏ธ Note: You may see this warning:
Portfast has been configured but will only have effect when the interface is in a non-trunking mode.

show spanning-tree summary
โ Should show:
Spanning tree enabled protocol rstp
Switch is in rapid-pvst mode
show vlan brief
โ Should show VLANs 10, 20, and 30 as active

show spanning-tree vlan 10
โ Should show:
This bridge is the root
Priority 4096 (+ 10 for extended ID)

show spanning-tree vlan 20
โ Should show:
This bridge is the root
Priority 4096 (+ 20 for extended ID)

show spanning-tree vlan 30
โ Should show:
This bridge is the root
Priority 4096 (+ 30 for extended ID)

show spanning-tree vlan 10
โ Root port should be Gi0/2 or Gi0/3 (to SW3), not Gi0/0 or Gi0/1
show spanning-tree vlan 10
โ Gi0/0 should be the root port, due to lower port priority
show spanning-tree interface gi1/0 detail
โ Look for:
Portfast (Edge Port) is enabled
Note: Will only take effect in access mode

| VLAN | Root Bridge | Switch Verified On | Special Behavior |
|---|---|---|---|
| 10 | SW1 | All | SW2 prefers path via SW3; SW3 prefers Gi0/0 |
| 20 | SW2 | All | Standard STP behavior |
| 30 | SW3 | All | Standard STP behavior |
spanning-tree mode rapid-pvst