Spanning Tree (RSTP/Rapid PVST+) for CCNA: Root Bridge and Port Roles

Redundant links between switches create layer 2 loops. Spanning Tree blocks the extra paths and leaves a loop-free topology. Rapid PVST+ converges in seconds and is the version you must master for the CCNA.

Exam domain: Network Access · Level: Intermediate · Updated on October 17, 2026 · 2 min read

Topology diagram “Spanning Tree (RSTP/Rapid PVST+) for CCNA: Root Bridge and Port Roles” with 5 devices and 5 links
Topology: Spanning Tree (RSTP/Rapid PVST+) for CCNA: Root Bridge and Port Roles

Edit this template Download .json

Learning objectives

Devices and addressing

DeviceTypeDetails
SW1SwitchRoot bridge
Priority 4096
SW2SwitchSwitch
Priority 32768
SW3SwitchSwitch
Priority 32768
PC1PC / userVLAN 1
PortFast
PC2PC / userVLAN 1
PortFast

Reference configuration (Cisco IOS)

SW1 (raíz)

spanning-tree mode rapid-pvst
spanning-tree vlan 1 priority 4096

SW2 / SW3

spanning-tree mode rapid-pvst
interface f0/1
 switchport mode access
 spanning-tree portfast
 spanning-tree bpduguard enable

Verification commands

CCNA exam tips

Root bridge election uses the lowest priority and, on a tie, the lowest MAC.

In the triangle there is always one blocked (alternate) port on a non-root switch.

How to use this template

Press “Edit this template”: the editor opens with the topology loaded and ready to change (undo with Ctrl+Z). You can also copy the JSON and paste it into the editor with File ▸ Import JSON…. Then add devices, change IPs and export to PDF, PNG or SVG.

To practice, rebuild the topology in Cisco Packet Tracer, GNS3 or Cisco Modeling Labs and paste the reference configuration on each device. Addresses and names are examples: change them to create your own variants.

JSON template for the editor

This is the full diagram in JSON format. Paste it into the editor (File ▸ Import JSON…) or press the edit button to load it automatically.

Edit this template

Frequently asked questions

How is the root bridge elected?

The switch with the lowest bridge ID wins: priority (multiples of 4096 + VLAN) and, on a tie, the lowest MAC address.

What is PortFast for?

It puts an access port into forwarding immediately; it is combined with BPDU Guard to prevent loops.

CCNA and Cisco are registered trademarks of Cisco Systems, Inc. This site is independent, not affiliated with Cisco and does not provide official exam material: the templates are study examples.

More related pages