handshake in lieu of timer expiration for every topology change ≡ no TCN BPDU
topology change ≡ non-edge → forwarding, sets TC bit
BPDU with TC are sent via designated non-edge ports and root
exception – port, that received TC flag in the first place
TC is sent during TC While timer
2 × hello
new: hello + 1s
when TC is received
clear CAM for all non-edge ports
exception – port where TC is received (NULL, if self-generated TC)
loss of 3 sequential BPDU instead of max_age for failure detection
based on peer timers
accepts inferior BPDU from designated: no waiting for 3×hello
local timers are used instead of root timers
all switches send BPDUs via designated ports (do not send via root or blocked by default)
STP compatibility – per port
migration delay timer
3s
freezes STP/RSTP mode
mode can be changed after timer expires and BPDU is received
max_age: how long to wait for 802.1D BPDU on alternate before switching to RSTP
(config)# spanning-tree mode rapid-pvst
; required on designated ports with 802.1D peer in order to switch to RSTP
; otherwise not possible to detect absence of STP on the port (no BPDUs to receive)
# clear spanning-tree detected-protocols
RSTP flags
0x80: TC
0x40: Proposal
0x30: port role
00 ≡ unknown
01 ≡ alternate/backup
10 ≡ root
11 ≡ designated
0x08: Learning
0x04: Forwarding
0x02: Agreement
0x01: TCA
RSTP port roles
root
designated: default
alternate: path to root with higher cost
backup: extra connection to segment via hub, 2+ links, hears own BPDUs
RSTP port states
Discarding
disabled + blocking + listening
default state
if no BPDUs are received, preserved for forward_delay duration
Learning
after discarding, on edge without PortFast
if no BPDUs are received, preserved for forward_delay duration
Forwarding
default for edge port
RSTP port types
normal
network
connected to other switch
BA enabled by default
edge
PortFast
loses its status if at least one BPDU is received
(config-if)# spanning-tree portfast
RSTP link type
significant for designated ports; root, alternate and backup to not take into account
types
point-to-point
full-duplex
handshake
shared
half-duplex
802.1D convergence style
(config-if)# spanning-tree link-type p2p|shared
RSTP synchronization
sync:
SW1 sends superior BPDU with Proposal flag, port – designated discarding
SW2 switches port, that received superior BPDU, into root discarding
All non-edge ports on SW2 → discarding
SW2 sends SW1 same BPDU (from SW1) with Agreement flag, root port → forwarding
SW1 designated port → forwarding
SW2 sends BPDUs to all non-edge with Proposal flag
if reply to Proposal not received, switch to 802.1D logic
discarding/learning send Proposal flag
UplinkFast and BackboneFast ideas are implicit
if ports towards PCs are not edge, they cycle through discarding/learning after sync