Rapid Spanning Tree Protocol (RSTP), defined in IEEE 802.1w, updates the legacy Spanning Tree Protocol (STP).
Classic STP can take up to 50 seconds to recover from a topology change. RSTP reduces this to a few hundred milliseconds.
On Cisco switches, RSTP runs as Rapid PVST+, with one RSTP instance per VLAN. You configure it in the Rapid PVST+ Configuration lesson.
Answer the question below
RSTP converges faster than STP. True or false?
RSTP reduces the five STP port states to three.

Figure 1 – Comparison of STP and RSTP Port States
RSTP merges the Disabled, Blocking and Listening states of classic STP into a single Discarding state:
Discarding: the port drops data frames and does not learn MAC addresses
Learning: the port fills the MAC address table but does not forward data frames yet
Forwarding: the port learns MAC addresses and forwards data frames
RSTP has no Listening state: a port goes from Discarding to Learning, then Forwarding.
Answer the question below
Which RSTP state replaces Blocking, Listening, and Disabled?
Classic STP has two active roles: Root Port and Designated Port. RSTP keeps both and adds two non-forwarding roles for redundant links:
Root Port: the one port on a non-root switch with the lowest path cost to the root bridge
Designated Port: the port that forwards traffic onto a link
Alternate Port: a backup path to the root bridge, ready if the Root Port fails
Backup Port: a second connection to a shared segment, such as a hub

Figure 2 – Comparison of STP and RSTP Port Roles
Answer the question below
Which RSTP port role provides a backup path to the root?
Look at this topology to see how RSTP assigns the port roles.

Figure 3 – RSTP Port Role Assignment in a Network Topology
Root Port Selection
Every non-root switch selects the one port with the lowest path cost to the root bridge.
On SW2 and SW3, G0/0 connects directly to SW1 with the lowest cost. Both switches make G0/0 their Root Port.

Figure 4 – Root Port Selection in RSTP Topology
Answer the question below
Which port role is assigned to the port that gives the lowest-cost path to the Root Bridge?
Designated Ports on the Root Bridge
Every port of the root bridge offers the shortest path to the root on its own link.
So all the ports of the root bridge are Designated Ports.

Figure 5 – All Ports on the Root Bridge Are Designated Ports
Answer the question below
What role do all ports on the Root Bridge take?
Designated Port Election on a Link
SW2 and SW3 are linked through their G0/1 interfaces. Only one of these two ports can forward traffic onto the link as the Designated Port.
The switches compare these criteria in order:
Lowest path cost to the root bridge: both switches reach SW1 with a cost of 4
Lowest sender Bridge ID: SW2 has a lower Bridge ID than SW3
Lowest port ID: used only if the cost and the Bridge ID are equal
SW2 wins on its lower Bridge ID. G0/1 on SW2 becomes the Designated Port.

Figure 6 – RSTP Election Between SW2 and SW3 for Designated Port
Answer the question below
Which switch wins the Designated Port election on the SW2–SW3 link?
Alternate Port Assignment
The port that loses the election becomes an Alternate Port.
G0/1 on SW3 stays in the Discarding state as the Alternate Port. It keeps a backup path to SW1 and takes over if SW3 loses its Root Port.

Figure 7 – SW3’s G0/1 Port as an Alternate Port
Answer the question below
If SW3's Root Port fails, which of its ports takes over the path to the Root Bridge?
Backup Port Selection on Shared Media
A Backup Port appears only when one switch connects several interfaces to the same collision domain.

Figure 8 – Backup Port Assignment in a Shared Collision Domain
On SW2, G0/2 and G0/3 connect to the same hub. Both interfaces belong to the same switch, so their path cost and Bridge ID are identical.
RSTP breaks the tie with the port ID:
G0/2: lower port ID, becomes the Designated Port
G0/3: higher port ID, becomes the Backup Port in the Discarding state

Figure 9 – Backup vs. Designated Port Decision Within SW2
Backup Ports rarely appear in production networks, because modern switches use full-duplex links instead of hubs.
Answer the question below
Which port becomes the Designated Port in this shared collision domain?
Answer the question below
While SW3's Root Port is healthy, in which RSTP state does its Alternate Port G0/1 sit?
Answer the question below
If SW3's BID drops to 28673:5043.cd04.6700, which switch's G0/1 becomes Alternate?