🔄

Spanning Tree Protocol

Feb 21, 2025

Network Loops and Spanning Tree Protocol (STP)

Understanding Network Loops

  • Network Loop Formation: Occurs when two switches are connected by Ethernet cables forming a loop.
    • Ethernet frames loop indefinitely without a mechanism to count their occurrences at the MAC address level.
    • Results in network congestion and potential switch capacity overload.
    • Quick network failure and user complaints if not addressed.
  • Resolving Loops: Disconnect the cable causing the loop to restore network functionality.

Preventing Network Loops

  • Automation Needed: Manual disconnection impractical; requires an automated solution.
  • IEEE 802.1D Standard: Known as the Spanning Tree Protocol (STP), helps prevent loops by configuring switch interfaces.
    • Port States:
      • Blocking: Prevents traffic forwarding, used to stop loops.
      • Listening: Clears existing tables to restart the process.
      • Learning: Identifies other switches and detects loops.
      • Forwarding: Allows traffic transmission.
      • Administratively Disabled: Non-participatory in STP.

Spanning Tree Protocol (STP) in Action

  • Network Topology: Example with multiple switches (bridges) labeled Bridge 1, Bridge 6, Bridge 5, etc.
    • Root Port (RP): Connects to the single root bridge.
    • Designated Port: Can forward traffic but not directly connected to root bridge.
    • Blocked Port: Disabled by STP to prevent loops.
  • Communication Example: Network A to Network M via Bridge 6.
    • Failure Scenario: If Bridge 6 is unavailable, STP reconfigures the network.
    • Recovery: STP modifies bridge 5 and unblocks bridge 11 to restore connectivity.

Rapid Spanning Tree Protocol (RSTP)

  • Improved Version: IEEE 802.1w standard enhances original STP.
    • Faster Convergence: Reduces downtime from 30-50 seconds to ~6 seconds.
    • Backward Compatibility: Works alongside original STP devices.

Key Takeaways

  • Importance of STP/RSTP: Critical for maintaining network stability and preventing loops.
  • Configuration: Ensuring STP is enabled on networks is crucial.
  • RSTP Familiarity: Shares similarities with STP, easing transition and understanding.