Files
CCNA-Notes/22 Rapid Spanning Tree Protocol.md
2026-06-02 09:35:28 +02:00

186 lines
6.1 KiB
Markdown

---
id: 22 Rapid Spanning Tree Protocol
aliases: []
tags:
- CCNA
---
# Rapid Spanning Tree Protocol
## Spanning Tree Version
### Industry standards (IEEE)
Spanning Tree Protocol (802.1D)
- The original STP
- ALl VLANs share one STP instance.
- Therefore, cannot load balance.
Rapid spanning Tree Protocol (802.1w)
- Much faster at converging/adaptating to network changes than 802.1D
- All VLANs share one STP instance.
- Therefore, cannot load balance
Multiple Spanning Tree Protocol (802.1s)
- Uses modified RSTP mechanics.
- Can group multiple VLANs into different instacnces (ie. VLANs 1-5 instance 1, VLANs 6-10 in instance
2 ) to perform load balancing
### CISCO Versions
Per-VLAN Spanning Tree Plus (PVST+)
- Cisco's upgrade to 802.1D
- Each VLAN has its own STP instance.
- Can load balance by blocking different ports in each VLAN.
Rapid Per-VLAN Spanning Tree Plus (Rapid PVST+)
- Cisco's upgrade to 802.1w
- Each VLAN has its own STP instance
- Can load balance by blocking different ports in each VLAN
## Rapid spanning Tree Protocol
Cisco's summary:
"RSTP is not a timer-based spanning tree algorithm like 802.1D. therefore, RSTP offers an improvement
over the 30 seconds or more that 902.1d takes to move a link to forwarding. the heart of
the protocol is new bridge-bridge handshake mechanism, which allows ports to move directly to forwarding."
### Similarities between STP and RSTP:
RSTP serves the same purpoe as STP, blocking specific ports to prevent Layer2 loops.
- RSTP elect a root bridge with same rules as STP
- RSTP elects root ports with the same rules as STP.
- RSTP elects designated ports with the same rules as STP
### Differences
#### COST
| speed | STP COST | STP COST |
| -------------- | --------------- | --------------- |
| 10 Mbps | 100 | 2,000,000 |
| 100 Mbps | 19 | 200,000 |
| 1 Gbps | 4 | 20,000 |
| 10 Gbps | 2 | 2,000 |
| 100 Gbps | x | 200 |
| 1 Tbps | x | 20 |
#### Port State
| STP Port State | Send/Receive BPDUs | Frame Forwarding | MAC Learning | Stable/Transitional |
| ------------- | -------------- | -------------- | -------------- | -------------- |
| Discarding | NO/YES | NO | NO | Stable |
| Learing | YES/YES | NO | YES | Tranisitional |
| Forwarding | YES/YES | YES | YES | Stable |
- if a port is administratively disabled (shutdown command) = discarding state
- if a port is enabled but blocking traffic to prevent Layer 2 loops = discarding state
#### Port Roles
*The root port role remains unchanged in RSTP.*
- The port wthat is closet to the root bridge becomes the root port for the switch.
- The root bridge is the only switch that doesn't have a root port.
*The designated port role remains unchanged in RSTP.*
- The port on a segment (collision domain) that sends the best BPDU is that
segment's designated port (only one per segment)
- *The non designated port role is split into two separate roles in RSTP*:
- The alternate port role
- the backup port role
##### Alternate port Role
The RSTP alternate port role is discarding port that receives a superior BPDU from another switch.
- This is the same as what you've learned about *blocking* ports in classic STP.
- Functions as a backup to the root port.
- If the root port fails, the switch can immediately move its best alternate port to forwarding
This immediate move to fowarding state functions like a classic STP optional feature called
UplinkFast. Because it is built into RSTP, you do not need to activate UplinkFast when using
RSTP/Rapid PVST+
One more STP optional feature that was built into RSTP is BackboneFast.
Backbone Fast allows SW3 to expire the made age timers on its interface and rapidly forward the superior
BPDUs to SW2.
This functionality is built into RSTP, so it does not need to be configured
##### Backup port role
The RSTP backup port role is a discarding port that receives a superior BPDU from another
interface on the same switch.
- This only happnes when two interfaces are connected to the same collision domain (via a hub)
- Hubs are not used in modern networks, so you will probably not encounter an RSTP backup port.
- Function as backup for a designated port
- The interface with the lowest port ID will be selected as the designated port and the other will be the
backup port
### BPDU
In classic [[STP]], only the root bridge originated BPDUs, and other switches just forwarded the BPDUs
they received.
In Rapid STP, all Switches originate and send their own BPDUs from their designated ports
All switches running Rapid STP send their own BPDUs every hello time (2 seconds).
- Switches 'age' the BPDU information much more quickly, in classic STP a switch waits 10 hello intervales
(20 seconds). In rapid STP, a switch considers a neighbor lost if it misses 3 BPDUs (6 seconds)
It will the 'Flush' All MAV addresses learned on that interface
## RSTP Link Types
RSTP distiguishes between three different 'link types'
- Edge: a port that is connected to an end host. Moves directly to forwarding without negotiation.
- Point-to-point: a direct connection between two switches
- Shared a connection to a [[hub]]. Must operate in half-duplex mode.
### Edge
Edge ports are connected to end hosts.
- Because ther is no risk of creating a loop, they can move stright to the forwarding state without the
negotiation process.
- They function like a classic STP port with PortFast enabled
```Cisco
SW1(config-if)# spanning-tree portfast
```
### Point-to-Point
Point-to-point ports connect directly to another switch
- They function in full-duplex
- you don't need to configure the interface as point-to-point (it should be detected)
```Cisco
SW1(config-if)# spanning-tree link-type point-to-point
```
### Shared
shared Ports connect to another switch (or switches) via a hub.
- They function in half-duplex
- You don't need to configure the interface as shared (it should be detected)
```Cisco
SW1(config-if)# spanning-tree link-type shared
```
### Configuration
```Cisco
SW3(config)# spanning-tree mode rapid-pvst
SW3(config)# do show spanning-tree
```
## Review
Comparison of [[STP]] versions (standard vs [[Cisco]])
Rapid PVST+