Another Security Blog

A place to show my mad skills

TidBits Walkthroughs Resources Projects View on GitHub
10 July 2025

TB - GNS3 Lab: PVRST (Custom Topology) - Verification Guide

by C. Casquatch

Lab from Renee Molenaar

🧱 Topology

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

Screenshot 1

Substitution:

  • Gi0/0 used in place of Fa0/14
  • Gi1/0 used in place of Fa0/5 (edge port)

⚙️ Configuration Steps

1. Enable PVRST on all switches

Switch(config)# spanning-tree mode rapid-pvst

2. Create VLANs 10, 20, 30 on all switches

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

4. Set Root Bridges

SW1(config)# spanning-tree vlan 10 priority 4096
SW2(config)# spanning-tree vlan 20 priority 4096
SW3(config)# spanning-tree vlan 30 priority 4096

5. Make SW2 prefer path through SW3 to reach SW1 in VLAN 10

SW2(config)# interface range gi0/0 - 1
SW2(config-if-range)# spanning-tree vlan 10 cost 200

6. Make SW3 prefer Gi0/0 to reach root for VLAN 10

SW3(config)# interface gi0/0
SW3(config-if)# spanning-tree vlan 10 port-priority 64

7. Configure Gi1/0 as an edge port (PortFast)

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.

Screenshot 2


📷 Verification

1. Confirm PVRST is Enabled

show spanning-tree summary

✅ Should show:

Spanning tree enabled protocol rstp
Switch is in rapid-pvst mode

2. Confirm VLANs Exist

show vlan brief

✅ Should show VLANs 10, 20, and 30 as active

Screenshot 3

3. Confirm Root Bridges

SW1:

show spanning-tree vlan 10

✅ Should show:

This bridge is the root
Priority    4096 (+ 10 for extended ID)

Screenshot 4

SW2:

show spanning-tree vlan 20

✅ Should show:

This bridge is the root
Priority    4096 (+ 20 for extended ID)

Screenshot 5

SW3:

show spanning-tree vlan 30

✅ Should show:

This bridge is the root
Priority    4096 (+ 30 for extended ID)

Screenshot 6

4. SW2 Takes Path Through SW3 (VLAN 10)

show spanning-tree vlan 10

✅ Root port should be Gi0/2 or Gi0/3 (to SW3), not Gi0/0 or Gi0/1

5. SW3 Prefers Gi0/0 for VLAN 10

show spanning-tree vlan 10

✅ Gi0/0 should be the root port, due to lower port priority

6. Confirm Gi1/0 is Edge Port

show spanning-tree interface gi1/0 detail

✅ Look for:

Portfast (Edge Port) is enabled

Note: Will only take effect in access mode

Screenshot 6

✅ Summary Table

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

📝 Notes

Screenshot 7


tags: GNS3 - pvrst - Networking - spanning-tree