RSTP

  1. BPDU
    1. RSTP flags
    2. RSTP port roles
    3. RSTP port states
    4. RSTP port types
    5. RSTP link type
    6. RSTP synchronization
  2. Bridge Assurance (BA)

BPDU

  • 802.1D BPDU, utilizes unused flags
  • version ≡ 2
  • does not use timers to converge – event-driven
    • 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

  1. root
  2. designated: default
  3. alternate: path to root with higher cost
  4. backup: extra connection to segment via hub, 2+ links, hears own BPDUs

RSTP port states

  1. Discarding
    • disabled + blocking + listening
    • default state
    • if no BPDUs are received, preserved for forward_delay duration
  2. Learning
    • after discarding, on edge without PortFast
    • if no BPDUs are received, preserved for forward_delay duration
  3. Forwarding
    • default for edge port

RSTP port types

  1. normal
  2. network
    • connected to other switch
    • BA enabled by default
  3. edge
    • PortFast
    • loses its status if at least one BPDU is received
(config-if)# spanning-tree portfast
  • significant for designated ports; root, alternate and backup to not take into account
  • types
    1. point-to-point
      • full-duplex
      • handshake
    2. shared
      • half-duplex
      • 802.1D convergence style
(config-if)# spanning-tree link-type p2p|shared

RSTP synchronization

  • sync:
    1. SW1 sends superior BPDU with Proposal flag, port – designated discarding
    2. SW2 switches port, that received superior BPDU, into root discarding
    3. All non-edge ports on SW2 → discarding
    4. SW2 sends SW1 same BPDU (from SW1) with Agreement flag, root port → forwarding
    5. SW1 designated port → forwarding
    6. 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

Bridge Assurance (BA)

  • send BPDUs via blocked and root ports as well
  • RSTP/MST only
  • P2P, network ports
  • must be supported by both peers, otherwise BA_Inc
(config)# spanning-tree bridge assurance
(config-if)# spanning-tree porttype network