STP (Loops, Root bridge, Port roles/states)

5.3 Given a scenario, troubleshoot common issues with network services

Switching Issues

📘CompTIA Network+ (N10-009)


1. Why STP Exists

In networks, switches often have redundant paths. Redundancy is good for reliability, but without STP, these redundant paths can create loops:

  • A loop happens when a frame keeps circulating between switches endlessly.
  • Loops can flood the network, cause broadcast storms, and bring the network down.

STP solves this by logically blocking some paths while keeping a backup path ready.


2. STP Terminology You Must Know

a. Root Bridge

  • The root bridge is the most important switch in the STP topology.
  • It acts as the reference point for all path calculations.
  • All switches decide which ports to block or forward based on their distance to the root bridge.

How it is chosen:

  • Each switch has a Bridge ID (BID), which is made of:
    • Bridge Priority (default is 32768)
    • MAC Address of the switch
  • The switch with the lowest Bridge ID becomes the root bridge.
  • If you want a specific switch to be the root, lower its priority.

b. Port Roles

Each port on a switch in STP has a role based on how it connects to the network:

  1. Root Port (RP)
    • The port on a non-root switch closest to the root bridge.
    • Always in forwarding state.
    • Each non-root switch has only one root port.
  2. Designated Port (DP)
    • The port on a segment that has the lowest path cost to the root bridge.
    • It forwards traffic for that segment.
    • Every segment has one designated port.
  3. Blocked Port
    • Ports that do not forward traffic to prevent loops.
    • They can become active if the network topology changes.

c. Port States

STP ports go through several states before forwarding traffic:

  1. Blocking – Port does not forward traffic. Receives BPDU messages only.
  2. Listening – Port listens to BPDUs to determine if it should forward.
  3. Learning – Port starts learning MAC addresses but does not forward frames.
  4. Forwarding – Port forwards frames and continues learning MAC addresses.
  5. Disabled – Port is administratively shut down and does nothing.

Tip: For the exam, remember: Blocking → Listening → Learning → Forwarding.


d. BPDUs (Bridge Protocol Data Units)

  • Switches exchange BPDUs to share STP information.
  • BPDUs help elect the root bridge, determine port roles, and detect network changes.

3. Common STP Issues

a. Loops

  • A loop occurs when multiple active paths exist between switches without blocking.
  • Symptoms:
    • High CPU load on switches
    • Network flooding
    • Slow network response or outages
  • Cause: STP failed or misconfigured, or redundant links without STP.

b. Incorrect Root Bridge

  • If the wrong switch becomes the root bridge:
    • Traffic may take suboptimal paths.
    • Some links might block unnecessarily, reducing network performance.
  • Solution:
    • Adjust bridge priorities to set the correct switch as root.

c. Port Role/State Issues

  • A port might be incorrectly blocked or forwarding due to misconfiguration.
  • Example: Connecting a new switch can cause a port to temporarily block, which is normal as STP recalculates the topology.
  • Solution:
    • Check STP status (show spanning-tree on Cisco devices).

d. Convergence Delay

  • STP takes some time to move ports from blocking to forwarding.
  • Traditional STP can take up to 30-50 seconds to converge.
  • Faster alternatives: RSTP (Rapid Spanning Tree Protocol), which converges in 1-5 seconds.

4. Troubleshooting STP Issues

For the CompTIA Network+ exam, you should know how to identify and fix STP problems:

  1. Identify loops
    • Symptoms: broadcast storms, high CPU, repeated frames.
    • Solution: Check STP topology, blocked ports, root bridge.
  2. Check root bridge
    • Ensure the most appropriate switch is the root.
    • Use commands like: show spanning-tree
    • Adjust bridge priorities if needed.
  3. Check port roles/states
    • Ensure proper ports are forwarding or blocked.
    • Verify the network segments have one designated port each.
  4. Upgrade to RSTP if needed
    • Reduces downtime caused by STP recalculation.

5. Key Exam Tips

  • STP prevents loops in switched networks.
  • Root bridge = reference point for the topology.
  • Port roles: Root Port, Designated Port, Blocked Port.
  • Port states: Blocking → Listening → Learning → Forwarding.
  • Check BPDUs for troubleshooting.
  • Know common problems: loops, wrong root bridge, port misconfigurations, convergence delays.

Focus on being able to explain the problem, identify the cause, and recommend a solution — CompTIA often asks scenario-based questions.

Leave a Reply

Your email address will not be published. Required fields are marked *

Buy Me a Coffee