Wednesday, August 5, 2015

9 - RAPID SPANNING TREE PROTOCOL

What is RSTP

- New standard originaly defined in IEEE 802.1w
- Now incorporated as IEEE 802.1D-2004
- Simplifies port sates
- Aditional port roles (alternate, backup, designated ports)
- Rapid convergence based on synchronization process
- Path calculation remains the same


RSTP port states

- Legacy STP uses
  - Disabled
  - Blocking
  - Listenning
  - Learning
  - Forwarding

- RSTP simplifies to
  - Discarding : Dropping frames
  - Learning   : Dropping frames but building the CAM
  - Forwarding : Normal forwarding


RSTP Port Roles

- Root Port & Designated Port (same as before)

- New Roles
  - Alternate
    - Equivalent to uplinkfast port
    - Fast root path recovery
    - Automatic doen't requeire uplink command
    - Operates in the discarding state
  - Backup
    - Backup Designated (downstream) port
    - Activates if the primary designated port fails
    - Operates in discarding stage
  - Edge
    - Equivalent of PVST+ Porfast enabled ports
    - Immediately transitions to forwarding
    - Do not generate TCN for state changes
    - Configured with spanning-tree portfast command for backwards compability
    - If BPDU received, remove age status and generate TCN

- RSTP link types
  - Non edge ports fall into two types:
    - Point to Point (direct connection between the 2 switches)
       full-duplex ports
    - Shared
      - half-duplex ports (connected to hub)
    - Only point-to-point designated ports use the sync process for rapid convergence

- RSTP sync process
  - when a bridge elects a root port it asumes all non-edge ports to be designated
    - all non-edge ports are discarding at this moment
  - bridge sends proposals out all designated ports
    - proposal has port role set to designated
    - proposal contains root bridge info (priority, cost, etc)
  - downstream bridges review this information
    - if thet don't have better paths to the root they agree
    - if they do have it they announce their information
  - when designated port receives agreement, it is unblocked
  - if downstream bridge sends better root information, local bridge changes root port
  - if downstream bridge agrees to upostream proposal then it
    - elects a local root port
    - blocks all non-edge designated ports
    - starts sync process on all designated ports
  - Port blocking is essential in preventing transient loops
  - Sync process ensures all bridges agree on the same root bridge

- RSTP Fault Detection
  - In Legacy STP, BPDU are only generated by the root bridge
    - All otghers bridges forward them on
  - In RSTP, each bridge generate BPDU every hello interval
    - 2 seconds by default
  - if 3 hellos are missed from a neighbor, reconverge begins
    - 6 seconds vs 20 seconds MaxAge
  - MaxAge is used as hop count
    - every bridge sends BPDU's on its own
    - age incremented by every bridge
    - maxAge also used on shared ports for legacy STP backwards compability
  - Faults can be detected faster by means of physical layer signaling


- RSTP Convergence
  - RSTP needs to re-converge when root port is lost
  - If there is an alternate port, it is selected in place of the old root port
    - new root port is then synchronized with downstream bridges
  - If there is no alternate ports and no better info
    - Declare itself as root bridge
    - synchronize this decision
    - possibly adapt to better information
  - RSTP converges slow in meshy and large topologies
  - Root bridges failures may cause slow convergence
  - To ensure fast convergence
    - keep topology small and avoid excessive redundancy
    - Realy on physical layer failure detection not the hellos BPDU's

- RSTP topology change
  - generated when link becomes forwarding
    - originated by the switch that detected the event
    - use special BPDU bit to signal topology change
    - flooded by all switches using reverse path forwarding
 - Flushes mac address table

- RSTP CONFIGURATION
  - Enable RSTP
    - spanning-tree mode rapid-pvst
    - automatically backwards compatible with legacy STP
  - Sync only occurs on P2P non-edge ports
    - Implies link-type must be accurate
    - spanning-tree link-type (point-to-point|shared)
    - spanning-tree portfast (trunk)
  - Path selection remains unchanged
    - root bridge election
    - root port & designated port elections


Notes

- It is a good pratice to put the command "spanning-tree portfast default" (global config), automatically
  recognizes which ports should be running as edge and which ones should be running as point-to-point

No comments:

Post a Comment