Rapid transition mechanism
In STP, a port must wait twice the forward delay (30 seconds by default) before it transits from the blocking state to the forwarding state. The forward delay is related to the hello time and network diameter. If the forward delay is too short, loops might occur. This affects the stability of the network.
RSTP, PVST, and MSTP all use the rapid transition mechanism to speed up port state transition for edge ports, root ports, and designated ports. The rapid transition mechanism for designated ports is also known as the proposal/agreement (P/A)_transition.
Edge port rapid transition
As shown in Figure 36, Port C3 is an edge port connected to a host. When a network topology change occurs, the port can immediately transit from the blocking state to the forwarding state because no loop will be caused.
Because a device cannot determine whether a port is directly connected to a terminal, you must manually configure the port as an edge port.
Figure 36: Edge port rapid transition
Root port rapid transition
When a root port is blocked, the bridge will elect the alternate port with the highest priority as the new root port. If the new root port's peer is in the forwarding state, the new root port immediately transits to the forwarding state.
As shown in Figure 37, Port C2 on Device C is a root port and Port C1 is an alternate port. When Port C2 transits to the blocking state, Port C1 is elected as the root port and immediately transits to the forwarding state.
Figure 37: Root port rapid transition
P/A transition
The P/A transition enables a designated port to rapidly transit to the forwarding state after a handshake with its peer. The P/A transition applies only to point-to-point links.
P/A transition for RSTP and PVST.
In RSTP or PVST, the ports on a new link or recovered link are designated ports in blocking state. When one of the designated ports transits to the discarding or learning state, it sets the proposal flag in its BPDU. Its peer bridge receives the BPDU and determines whether the receiving port is the root port. If it is the root port, the bridge blocks the other ports except edge ports. The bridge then replies an agreement BPDU to the designated port. The designated port immediately transits to the forwarding state upon receiving the agreement BPDU. If the designated port does not receive the agreement BPDU, it waits for twice the forward delay to transit to the forwarding state.
As shown in Figure 38, the P/A transition operates as follows:
Device A sends a proposal BPDU to Device B through GigabitEthernet 2/1/1.
Device B receives the proposal BPDU on GigabitEthernet 2/1/2. GigabitEthernet 2/1/2 is elected as the root port.
Device B blocks its designated port GigabitEthernet 2/1/1 and alternate port GigabitEthernet 2/1/3 to eliminate loops.
The root port GigabitEthernet 2/1/2 transits to the forwarding state and sends an agreement BPDU to Device A.
The designated port GigabitEthernet 2/1/1 on Device A immediately transits to the forwarding state after receiving the agreement BPDU.
Figure 38: P/A transition for RSTP and PVST
P/A transition for MSTP.
In MSTP, an upstream bridge sets both the proposal and agreement flags in its BPDU. If a downstream bridge receives the BPDU and its receiving port is elected as the root port, the bridge blocks all the other ports except edge ports. The downstream bridge then replies an agreement BPDU to the upstream bridge. The upstream port immediately transits to the forwarding state upon receiving the agreement BPDU. If the upstream port does not receive the agreement BPDU, it waits for twice the forward delay to transit to the forwarding state.
As shown in Figure 39, the P/A transition operates as follows:
Device A sets the proposal and agreement flags in its BPDU and sends it to Device B through GigabitEthernet 2/1/1.
Device B receives the BPDU. GigabitEthernet 2/1/2 of Device B is elected as the root port.
Device B then blocks all its ports except the edge ports.
The root port GigabitEthernet 2/1/2 of Device B transits to the forwarding state and sends an agreement BPDU to Device A.
GigabitEthernet 2/1/1 of Device A immediately transits to the forwarding state upon receiving the agreement BPDU.
Figure 39: P/A transition for MSTP