PracticeVideosBlogFlashcards

3.3 RSTP Rapid Convergence & Link Types

Key Takeaways

  • RSTP achieves sub-second convergence through an active Proposal/Agreement handshake mechanism rather than passive timer expiration.

  • Edge ports bypass Discarding and Learning states to enter Forwarding immediately upon link-up and do not generate Topology Change Notifications.

  • The synchronization process forces non-edge designated ports into the Discarding state before returning an Agreement, guaranteeing a loop-free transition.

  • RSTP detects neighbor failure within 3 missed Hello intervals (6 seconds) instead of waiting for the legacy 20-second Max Age timer.

  • Topology change events cause switches to immediately flush MAC address entries across all non-edge ports except the port receiving the TC notification.

Last updated: October 2026

Legacy IEEE 802.1D spanning tree networks rely on passive timers to converge. When a link state changes, an interface must remain in the Listening state for the duration of the Forward Delay timer (15 seconds) to clear out stale BPDUs, and then remain in the Learning state for an additional Forward Delay period (15 seconds) to populate the MAC address table. If a root or designated port fails, the switch must first wait for the Max Age timer (20 seconds) to expire before even beginning this 30-second cycle. Consequently, standard 802.1D convergence imposes an outage lasting 30 to 50 seconds.

IEEE 802.1w Rapid Spanning Tree Protocol (RSTP) eliminates these delays. Instead of waiting passively for timer expirations, RSTP bridges actively negotiate port state transitions through an explicit Proposal/Agreement handshake on point-to-point links, achieving sub-second (typically under 100 milliseconds) convergence.


RSTP Link Types and Duplex Detection

RSTP's convergence behavior depends directly on the physical and logical characteristics of the connected media. Junos categorizes RSTP ports into three distinct link types:

  1. Point-to-Point (point-to-point): The link directly connects exactly two switches. Junos automatically designates any interface operating in full-duplex mode as a point-to-point link. Full-duplex guarantees that no other bridges share the medium, allowing the two switches to safely execute the Proposal/Agreement handshake.
  2. Shared (shared): The link operates in half-duplex mode, indicating connection to a shared collision domain (such as a legacy hub). Because multiple unknown bridges could reside on the segment, RSTP cannot guarantee that an agreement represents all attached bridges. Therefore, on shared links, RSTP disables the Proposal/Agreement handshake and falls back to legacy 802.1D timer-based convergence (15 seconds Listening, 15 seconds Learning).
  3. Edge Ports (edge): An interface directly connected to an end-station host (such as a workstation, server, printer, or router interface) that will never connect to another switch.

Engineers can explicitly enforce link types in Junos under [edit protocols rstp interface <interface-name>]:

[edit protocols rstp]
user@EX4300# set interface ge-0/0/0.0 link-type point-to-point

Edge Port Concepts and Junos Configuration

In campus networks, end-user PCs and IP phones frequently boot, reboot, sleep, or disconnect. In a default spanning tree configuration, every time an access port transitions to link-up, the switch waits 30 seconds before forwarding user traffic (causing DHCP and PXE boot timeouts) and generates a network-wide Topology Change Notification (TCN). TCNs cause every switch in the campus to flush its MAC address table, leading to massive unicast flooding.

Configuring an interface as an edge port solves both problems:

  • Immediate Forwarding: An edge port bypasses the Discarding and Learning states entirely, transitioning into the Forwarding state immediately upon physical link-up (in less than 10 milliseconds).
  • TCN Suppression: Transitions on edge ports never generate Topology Change Notifications. End-user workstations can connect and disconnect freely without disrupting the campus forwarding fabric.

In Junos OS, access interfaces are designated as edge ports with the edge statement:

[edit protocols rstp]
user@EX4300# set interface ge-0/0/10.0 edge

Exam Trap & Operational Gotcha: An edge port continues to send periodic BPDUs unless configured otherwise. If a rogue switch or hub is patched into an edge port and sends a BPDU, the interface immediately loses its edge port status and reverts to a normal non-edge RSTP port, subjecting the segment to standard spanning tree elections. In Chapter 4, we examine BPDU protect (bpdu-block-on-edge), which err-disables the port instead to prevent unauthorized topology takeover.


The Proposal/Agreement Handshake Mechanism

The foundation of RSTP's sub-second convergence on point-to-point links is the Proposal/Agreement handshake. The process follows a synchronized sequence:

  1. Link Initialization: A new point-to-point link comes up between Switch A (the upstream Root Bridge) and Switch B. Both switches initialize their local ports in the Discarding state to prevent immediate loops.
  2. Proposal Transmission: Switch A, knowing it has a superior BID, sets the Proposal flag and the Designated role bits in its outgoing RST BPDU and transmits it to Switch B on the link.
  3. Superior BPDU Evaluation: Switch B receives the BPDU. Recognizing Switch A's superior BID, Switch B assigns its receiving port as its prospective Root Port.
  4. The Synchronization (Sync) Phase: Before Switch B can permit Switch A to forward traffic, Switch B must guarantee that no loops can form through its downstream connections. Switch B initiates a sync operation: it forces all of its non-edge Designated Ports into the Discarding state. Alternate ports, backup ports, and configured edge ports are unaffected because they cannot form loops.
  5. Agreement Transmission: Once all downstream non-edge designated ports are confirmed to be in the Discarding state (in sync), Switch B sets the Agreement flag and the Root role bits in an RST BPDU and transmits it upstream to Switch A.
  6. Immediate Port Transition: Upon receiving the valid Agreement matching its outstanding Proposal, Switch A immediately transitions its Designated Port to the Forwarding state. Switch B simultaneously transitions its Root Port to the Forwarding state. Both switches are now actively forwarding user data across the point-to-point link within milliseconds.
  7. Downstream Wave Propagation: Switch B now initiates the exact same Proposal/Agreement handshake sequence on each of its downstream designated ports, sending Proposals to downstream switches until the entire network converges.

Output note: Command output shown here is a schematic teaching example, not a captured device session. Field names and feature support depend on platform and Junos release.

Loading diagram...
RSTP Proposal/Agreement Handshake Synchronization Sequence

Topology Change (TC) Handling in RSTP

In legacy 802.1D, any port moving between states triggers a TCN BPDU that must travel hop-by-hop upstream to the Root Bridge. The Root Bridge then floods a Configuration BPDU with the TC flag set, instructing all switches to reduce their MAC table aging timer from 300 seconds to 15 seconds (Forward Delay). This legacy process is slow and clumsy.

RSTP handles topology changes with direct local action:

  • TC Generation Criteria: In RSTP, a Topology Change event occurs only when a non-edge port transitions to the Forwarding state. A port transitioning to Discarding (such as a link failure) does not generate a TC, because an inactive port cannot create a new forwarding path.
  • Direct TC BPDU Propagation: When a switch detects a non-edge port entering Forwarding, it immediately generates RST BPDUs with the TC bit set on all of its active non-edge designated ports and its root port. It floods these BPDUs for a period of twice the Hello Time (4 seconds).
  • Aggressive MAC Table Flushing: When an adjacent switch receives an RST BPDU with the TC bit set, it immediately flushes all MAC addresses learned on all non-edge interfaces except the interface that received the TC notification. It then sets the TC bit on its own outgoing BPDUs and propagates the notification across all other non-edge ports. This flushes invalid Layer 2 paths instantly across the enterprise network without waiting for aging timers.

RSTP Timers and Neighbor Failure Detection

Although RSTP relies on active negotiation rather than timers for convergence, it retains timer parameters for backward compatibility and protocol keepalives:

  • Hello Time: Default is 2 seconds. Every switch transmits RST BPDUs every 2 seconds on designated ports.
  • Forward Delay: Default is 15 seconds. Used as a fallback timer if Proposal/Agreement negotiation fails on a link (e.g., half-duplex shared links).
  • Max Age: Default is 20 seconds. Represents the maximum time BPDU information is retained if legacy 802.1D bridges are present.

Rapid Neighbor Loss Detection: 3 Missed Hellos

The most critical timer enhancement in RSTP is neighbor loss detection. Under legacy 802.1D, if an adjacent bridge fails without dropping physical link carrier (such as across an intermediate media converter or unmanaged optical repeater), the downstream switch must wait the entire Max Age (20 seconds) before declaring neighbor loss.

In RSTP, if a switch fails to receive BPDUs from its neighbor on a point-to-point link for three consecutive Hello intervals (3×2 seconds=6 seconds3 \times 2\text{ seconds} = \mathbf{6\text{ seconds}}), the switch immediately considers the neighbor unreachable, ages out the stored BPDU information, and initiates reconvergence. This reduces logical failure detection from 20 seconds to 6 seconds.


Junos RSTP Configuration and Verification

The following configuration snippet illustrates a production-ready Junos RSTP setup on a core-distribution EX switch:

[edit protocols rstp]
user@EX4300# show
bridge-priority 8192;
interface ge-0/0/0.0 {
    priority 64;
    cost 20000;
    link-type point-to-point;
}
interface ge-0/0/1.0 {
    priority 128;
    cost 20000;
    link-type point-to-point;
}
interface ge-0/0/10.0 {
    edge;
}
interface ge-0/0/11.0 {
    edge;
}

To verify RSTP status and port roles in Junos operational mode:

user@EX4300> show spanning-tree interface

Spanning tree interface parameters for instance 0

Interface    Port ID    Designated    Designated         Port    State      Role
                          port ID     bridge ID          Cost
ge-0/0/0.0     64:513     128:513     4096.000585112233  20000   FWD        ROOT
ge-0/0/1.0    128:514     128:514     8192.000585aabbcc  20000   BLK        ALT
ge-0/0/10.0   128:523     128:523     8192.000585aabbcc  20000   FWD        DESG (EDGE)

In this output:

  • ge-0/0/0.0 has assumed the ROOT role in the FWD (Forwarding) state, pointing to the Root Bridge with BID 4096.000585112233.
  • ge-0/0/1.0 is an ALT (Alternate) port in the BLK (Discarding) state, standing ready as an instant sub-second backup.
  • ge-0/0/10.0 is a DESG port in the FWD state with the (EDGE) attribute, protecting the campus from unnecessary topology flushes.

Configuring Legacy STP Compatibility

On supported ELS switches, legacy IEEE 802.1D behavior can be forced with set protocols rstp force-version stp. This selects STP-compatible version 0 operation; it does not preserve RSTP’s rapid handshake behavior. Verify the enabled protocol with show spanning-tree bridge, then compare interface roles/states and BPDU statistics. If an expected rapid transition instead waits for timers, check forced version, neighbor compatibility and shared-link behavior before reducing timers. To return to RSTP, remove the forced-version setting and follow the documented protocol-migration procedure. Juniper’s STP/RSTP procedure, checked 2026-10-18.

Test Your Knowledge

In a Juniper enterprise switched network running RSTP with default timer settings, how quickly does a switch detect the failure of an adjacent neighbor on a point-to-point link when physical link loss is not signaled?

A

20 seconds (the expiration of the Max Age timer)

B

15 seconds (the expiration of the Forward Delay timer)

C

2 seconds (one missed Hello BPDU interval)

D

6 seconds (three consecutive missed Hello BPDU intervals)

Test Your Knowledge

During the RSTP Proposal/Agreement handshake sequence on a point-to-point link, what critical action must a non-root switch perform before sending an Agreement BPDU back to the upstream designated bridge?

A

It must transition all non-edge designated ports to the Discarding state to achieve synchronization.

B

It must wait for the Forward Delay timer (15 seconds) to expire on all downstream interfaces.

C

It must transmit a Topology Change Notification (TCN) BPDU out of all edge interfaces.

D

It must flush its entire MAC address table including dynamic entries learned on the prospective root port.

Test Your Knowledge

An administrator configures an interface on a Juniper EX4300 switch with the command set protocols rstp interface ge-0/0/24.0 edge. Which of the following describes the operational behavior of this interface when an end-user workstation connects to it?

A

The interface enters the Listening state for 15 seconds, followed by the Learning state for 15 seconds, before forwarding traffic.

B

The interface immediately begins transmitting RSTP Proposal BPDUs every 2 seconds to detect rogue switches.

C

The interface immediately transitions to the Forwarding state and does not generate a Topology Change (TC) BPDU upon link-up.

D

The interface drops all untagged traffic and forwards only tagged 802.1Q control frames.

Sections you finish are checked off in the contents.