Supported Platforms
Related Documentation
- MX Series
- Decision Sequence for a Loop-Free STP Topology
- Key Concepts in Spanning Tree Protocols
- Multiple Spanning Tree Protocol
- Overview of Spanning Tree Protocol on Juniper Networks MX Series 3D Universal Edge Routers
- Port Roles in STP
- Restrictions and Cautions for Implementing STP
- Spanning Tree Protocol Operation
- Spanning Tree Protocol States
- STP Scaling and Performance on Juniper Networks MX Series 3D Universal Edge Routers
- VLAN Spanning Tree Protocol
Rapid Spanning Tree Protocol Port States and Port Roles
The original Spanning Tree Protocol is defined in the IEEE 802.1D 1998 specification. A newer version called Rapid Spanning Tree Protocol (RSTP) was originally defined in the IEEE 802.1w draft specification and later incorporated into the IEEE 802.1D-2004 specification.
RSTP provides faster reconvergence time than the original STP by identifying certain links as point-to-point and by using protocol handshake messages rather than fixed timeouts. When a point-to-point link fails, the alternate link can transition to the forwarding state without waiting for any protocol timers to expire. Consequently, RSTP convergence is approximately 50 milliseconds for point-to-point links.
Port operation is similar between STP and RSTP. In both, the state of the port is variable, and determines if the port blocks or forwards traffic. Additionally, the role a port plays in the active topology varies, if it is calculated to be a root port, a designated port, and so on.
For example, in STP there are no operational differences between a port in the blocking state and a port in the listening state. Both port states discard frames and do not learn MAC addresses. The real difference is in the role the spanning tree assigns to the port. You can assume that a listening port is either a designated port or a root port, and is in the process of transitioning to the forwarding state. Once in the forwarding state, there is no way to infer from the port state whether the port is root or designated.
This is a weakness of the state-based terminology of STP. To address this issue, RSTP decouples the role and the state of a port.
Consequently, there are only three port states in RSTP that correspond to the operational states of STP. The disabled, blocking, and listening states of IEEE 802.1D STP are merged into a unique IEEE 802.1w RSTP discarding state, as shown in Table 1.
Table 1: Port States in STP and RSTP
STP (IEEE 802.1D) | RSTP (IEEE 802.1w) | Port Included in Active Topology? | Port is Learning MAC Addresses? |
---|---|---|---|
Disabled | Discarding | No | No |
Blocking | Discarding | No | No |
Listening | Discarding | Yes | No |
Learning | Learning | Yes | Yes |
Forwarding | Forwarding | Yes | Yes |
Port Roles in RSTP
In RSTP, the port role is a variable assigned to a given port. The root port and designated port roles remain, and the blocking port role is replaced with the alternate and backup port roles. The Spanning Tree Algorithm (STA) determines the role of a port based on BPDUs.
Root Port and Root Bridge
The port closest to the root bridge in terms of least path cost (based on BPDU) is determined to be the root port. The STA elects a single root bridge in the entire bridged network of each VLAN. The root bridge sends BPDUs that have a lower bridge priority than the BPDUs that any other bridges send. The root bridge is the only bridge in the network that does not have a root port. All other bridges receive BPDUs on at least one port.
Designated Port
The designated port is the port that can send the best BPDU on the segment to which it is connected. The IEEE 802.1D bridges link different Ethernet segments to create a bridged domain. On a given segment, there can be only one path toward the root bridge. If there are two paths, there is a bridging loop in the network. All bridges connected to a given segment listen to the BPDUs of all bridges on that segment and agree on the bridge that sends the best BPDU as the designated bridge for the segment. The port on that bridge becomes the designated port for that segment.
Alternate and Backup Port
The alternate and backup port roles correspond to the blocking state of STP. A blocked port is defined as not being the designated or root port. A blocked port receives a more useful BPDU than the one it sends out on its segment. A port must receive BPDUs in order to stay blocked. For this purpose, RSTP introduces these two port roles:
- An alternate port receives more useful BPDUs from another bridge and is a blocked port.
- A backup port provides redundant connectivity to the same segment and cannot guarantee alternate connectivity to the root bridge.
When a port is selected by the STA to become a designated port in STP, the port still waits for two times the forward delay seconds (2 x 15 default) before it transitions to the forwarding state. In RSTP, this condition corresponds to a port with a designated role but with a blocking state that directly transitions to the forwarding state. It skips the listening and learning states, helping it converge faster than original STP.
RSTP has a backward compatibility mode in which it can fall back to STP operation on links.
The following shows the configuration statement syntax for RSTP.
![]() | Note: The extended-system-id statement is used to specify different bridge IDs for different STP or RSTP routing instances. In MSTP, each routing instance has its own bridge ID, so the extended-system-id statement is not used. |
![]() | Note: To force RSTP to run in STP mode, include the force-version stp statement at the [edit protocols rstp] hierarchy level. Convergence time will then be the same as in original STP. |
Related Documentation
- MX Series
- Decision Sequence for a Loop-Free STP Topology
- Key Concepts in Spanning Tree Protocols
- Multiple Spanning Tree Protocol
- Overview of Spanning Tree Protocol on Juniper Networks MX Series 3D Universal Edge Routers
- Port Roles in STP
- Restrictions and Cautions for Implementing STP
- Spanning Tree Protocol Operation
- Spanning Tree Protocol States
- STP Scaling and Performance on Juniper Networks MX Series 3D Universal Edge Routers
- VLAN Spanning Tree Protocol
Published: 2012-11-14
Supported Platforms
Related Documentation
- MX Series
- Decision Sequence for a Loop-Free STP Topology
- Key Concepts in Spanning Tree Protocols
- Multiple Spanning Tree Protocol
- Overview of Spanning Tree Protocol on Juniper Networks MX Series 3D Universal Edge Routers
- Port Roles in STP
- Restrictions and Cautions for Implementing STP
- Spanning Tree Protocol Operation
- Spanning Tree Protocol States
- STP Scaling and Performance on Juniper Networks MX Series 3D Universal Edge Routers
- VLAN Spanning Tree Protocol