Overview
This lecture explains how network loops occur with switches, the problems they cause, and how the Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP) prevent these issues by managing switch port states.
Network Loops and Problems
- Connecting two switches with multiple Ethernet cables creates a loop that endlessly circulates Ethernet frames.
- Loops cause frames to multiply, quickly overwhelming switch capacity and leading to network failure.
- There is no Ethernet frame mechanism at the MAC address level to limit repeated frames in a loop.
Spanning Tree Protocol (STP)
- STP is defined by the IEEE 802.1D standard to automatically detect and prevent network loops.
- STP configures switch ports into three main states: blocking, listening, and forwarding.
- Blocking ports prevent traffic flow, stopping loops from forming on the network.
- Listening clears old tables and restarts topology discovery on switch ports.
- Forwarding ports allow data transmission as usual.
- Administratively disabled ports do not participate in STP.
STP Operation Example
- In a network, STP identifies a single root bridge and configures root ports, designated ports, and blocked ports on switches.
- Root Port: Connects directly to the root bridge and forwards traffic.
- Designated Port: Can forward traffic but is not the root port on the switch.
- Blocked Port: Disabled from sending or receiving traffic to prevent loops.
- If network topology changes (e.g., a link fails), STP reconverges by reconfiguring port states to restore connectivity without creating loops.
Rapid Spanning Tree Protocol (RSTP)
- RSTP is defined by the IEEE 802.1w standard and is an updated, faster version of STP.
- RSTP reduces convergence (recovery) time to about 6 seconds, compared to 30-50 seconds in standard STP.
- RSTP is backward compatible with STP and operates in a similar way but faster.
Key Terms & Definitions
- Network Loop — A redundant path between switches causing frames to circulate endlessly.
- Spanning Tree Protocol (STP) — A network standard (IEEE 802.1D) that prevents loops by controlling switch port states.
- Blocking State — Switch port state that blocks all traffic to prevent loops.
- Root Port — Port providing the best path to the root bridge in STP.
- Designated Port — Port allowed to forward traffic but not directly connected to the root bridge.
- Rapid Spanning Tree Protocol (RSTP) — Faster version of STP (IEEE 802.1w) with rapid convergence.
Action Items / Next Steps
- Review STP and RSTP configuration options on your switches.
- Read more about IEEE 802.1D and 802.1w standards.
- Practice identifying potential network loops and describing how STP or RSTP would resolve them.