Low-voltage path · Division 11: Networks for low-voltage technicians · Lesson 212

Recognize loops and spanning-tree protections

Free for apprenticesRead it or play it. No card, no account, nothing to cancel.
Recognize loops and spanning-tree protections

What you should be able to do

Recognize a possible Layer 2 loop, interpret a protected redundant topology, and give the network administrator useful evidence without defeating the protection.

Foundation

A Layer 2 forwarding loop provides a circular path for Ethernet traffic. Repeated copies of flooded traffic can consume link and switch resources, disrupting camera, controller and other application traffic. Rapidly changing MAC-learning locations and excessive broadcast traffic can be clues, but neither symptom alone proves the cause. Legitimate mobility, configuration errors and other faults must be distinguished by the responsible administrator.

Spanning tree establishes a loop-free forwarding topology while allowing physical redundancy. In RSTP, a port's role and state are separate: an alternate role can be in the discarding state. It does not forward ordinary user data in that state, even though the physical connection is present. Spanning-tree control traffic has a separate purpose; do not interpret discarding as a cut cable.

Original Diagram

The diagram assumes a stable tree carrying VLAN 110:

  • SW1 is the selected root.
  • SW2 reaches the root directly through SW1.
  • SW3 also reaches the root directly through SW1.
  • SW2 and SW3 have an additional physical link.
  • On that extra link, SW2's end is designated and SW3's end is alternate/discarding.

Those roles are supplied assumptions, not results derived from the drawing's geometry. Actual election depends on the network's bridge identifiers, priorities, path costs and tie-breakers. The drawing does not give enough information to calculate that election.

The cyan links provide the active inter-switch path. The dashed yellow link remains physically connected, but SW3's alternate port prevents it from completing a user-data forwarding loop for the illustrated tree. The circle at the SW3 end marks the nonforwarding port, not a disconnected patch cord. A different VLAN or spanning-tree instance can use different roles; always record which tree the observation belongs to.

Why A Blocked Path May Be Healthy

A trainee sees the SW2-to-SW3 link up but not forwarding the illustrated data and proposes replacing the cable. The diagram gives a different explanation: spanning tree is intentionally excluding that port from the active forwarding path. Confirm the operational role and state before identifying a physical fault.

An alternate path is useful redundancy only within a working design. If the SW3-to-SW1 link fails, the protocol can select another valid path and converge. This is not a guarantee of uninterrupted video or controller service. Detection, compatibility, topology and application recovery all matter. An acceptance test needs the owner's permitted outage window and measured results.

Portfast And Bpdu Guard

PortFast accelerates forwarding on designated endpoint-facing connections in a suitable design. It does not mean spanning tree is universally disabled. BPDU guard can place a protected port into an error-disabled condition when it receives a BPDU. The administrator must investigate why bridge-control traffic appeared where it was not expected.

An edge-port feature is not a universal setting for every camera-network port. Switch uplinks, bridging devices and specialized arrangements need the platform-specific design. A guard event is also different from an ordinary alternate port discarding state. Do not erase that distinction by calling both a bad cable.

Original Incident Exercise

At 09:10 an installer reports that several cameras intermittently disappear. At 09:08 a small switch was added near a workbench. A second patch cord may have joined that device back to the same network. These are fictional observations, not proof of a loop.

Record the affected camera names, first observed time, recent physical changes and known switch ports. Preserve logs and a topology sketch. Ask the administrator to correlate MAC moves, broadcast rates and spanning-tree changes. Do not start repeatedly rebooting equipment or pulling unidentified cables. Follow the site's incident procedure and authorized isolation direction.

If an authorized investigation establishes an unintended circular path, removing the approved identified connection is different from disabling spanning tree. Correct the cause and retain the designed protection. A production network is not a place to demonstrate loops for training.

Original Recording Worksheet

For each relevant switch port record: Switch and port identity; neighbor; VLAN or instance; physical link state; spanning-tree role; forwarding state; guard status; observation time; evidence source.

Fill two example rows: SW3 toward SW2 / VLAN 110 / link up / alternate / discarding / no guard event reported. SW3 toward SW1 / VLAN 110 / link up / root port / forwarding / no guard event reported.

These rows describe the fictional stable topology. Do not copy them into a real commissioning record as measured results. A screenshot or administrator-provided output should retain its device identity and timestamp.

Test Planning

A controlled redundancy test should identify the exact link, affected systems, expected alternate path, recovery criteria and rollback owner. Record application evidence before and after the approved interruption. A recorder reconnecting does not alone establish that no footage was lost. An access-control server reconnecting does not alone establish every door function. Do not conduct a failure test on life-safety or critical systems under this generic lesson.

Knowledge Check

  1. Does an alternate/discarding port necessarily have a failed cable?
  2. Are both ends of the yellow link shown as alternate?
  3. Does PortFast mean every connected switch is safe?
  4. Does a BPDU-guard event prove the cable is damaged?
  5. Does the drawing promise instant recovery?
  6. Can the same physical port have a different role in another tree?

Answers

  1. No. The illustrated physical link is up.
  2. No. SW2 is designated; SW3 is alternate/discarding.
  3. No. Apply the approved edge-port design and protection.
  4. No. Investigate the received control traffic and actual cause.
  5. No. Recovery must be verified against the site's criteria.
  6. Yes, depending on the spanning-tree mode and configuration.

Where beginners go wrong

Mistake: Replacing the SW3-to-SW2 cable because the alternate port is discarding. Correction: Check the supplied VLAN110 role and state: that connected port intentionally prevents the redundant path from forming a forwarding loop.

Mistake: Re-enabling a BPDU-guard-disabled port to make it match a healthy alternate port. Correction: Preserve the guard event and have the administrator investigate the unexpected BPDU; guard shutdown and normal discarding are different conditions.

Mistake: Promising uninterrupted recording because spanning tree has a redundant path. Correction: Use the approved recovery criteria and compare application evidence across a controlled test; convergence alone does not prove continuous recording.

Sources

Cisco, Understand Rapid Spanning Tree Protocol (802.1w): https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/24062-146.html Basis for separate roles/states, alternate paths and convergence concepts. The diagram is original and assumes elected roles.

Cisco, Understand Spanning Tree PortFast and BPDU Guard Features: https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/10586-65.html Basis for endpoint-facing PortFast and BPDU guard behavior; actual platform and configuration govern implementation.

Cisco, Troubleshoot STP Issues on Catalyst Switches: https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/28943-170.html Basis for loop symptoms, evidence collection and protection context. This lesson does not reproduce its configuration procedures.

Scope Limits

National networking fundamentals; specialized system and jurisdictional requirements remain separate.

Supply The Costs And The Roles Stop Being Arbitrary

The diagram states SW3's roles rather than deriving them, because the drawing lacks the inputs. Supply the inputs and the derivation becomes a comparison anyone can repeat.

Assume the administrator gives these path costs for the illustrated tree. SW3's direct link to SW1 costs 20000. SW3's link to SW2 costs 20000, and SW2's own link to the root costs 20000, so the path to the root by way of SW2 totals 20000 + 20000 = 40000. Comparing 20000 against 40000, the direct link is the cheaper route to the root, so it becomes SW3's root port, and SW3's end of the extra link to SW2 takes the alternate role. That is the arrangement the diagram supplies, now with a reason attached.

Change one input and the roles move. Suppose the direct SW3-to-SW1 link is rebuilt over slower media and the administrator supplies a cost of 200000 for it. The path through SW2 still totals 40000, and 40000 is less than 200000, so SW3's root port moves to the SW2 link, the port that was alternate begins forwarding, and SW3's end of the direct link to SW1 becomes the alternate instead. No cable moved. One number changed.

This is why a role recorded without its date and its tree is close to useless. The same physical port can be root, designated or alternate at different times, and a worksheet saying only alternate cannot be compared against anything later.

No Hop Count, So Nothing Stops A Copy By Itself

A routed packet carries a field that counts down and eventually stops it. An ordinary Ethernet frame carries no such field, and that single difference is why a circular Layer 2 path escalates instead of settling.

Consider the scale involved. On a 1 Gbit/s link a 64-byte frame is 512 bits, and setting aside the preamble and the gap between frames, 1000000000 divided by 512 is about 1953125 frames per second. A link can therefore carry close to 2 million small frames every second, and a switch with a circular path available will keep flooding copies into it for as long as the path exists. Because a switch floods traffic for an unknown destination to every member port rather than to one, a single frame can leave more copies behind it than arrived, so the count grows rather than holding steady.

That growth is why the reported symptom is a collapse rather than a slowdown. Cameras do not degrade gently and then recover. They disappear, in groups, within seconds of the circular path appearing, which is why the time of the first report is such useful evidence beside the time of the last physical change.

Hand over the times and the port identities. The frame rate is there only to explain the urgency.

Add The Supplied Timers Before Promising A Recovery Time

A redundancy test needs a predicted recovery time to compare the measurement against, and the prediction comes from the configuration rather than from optimism.

Suppose the administrator supplies the configured timers for the illustrated tree as a 2-second hello, a 20-second maximum age and a 15-second forward delay, and states that these switches are running a timer-based mode rather than the rapid behaviour. A worst-case path then runs 20 + 15 + 15 = 50 seconds before the alternate port is forwarding user data. Under the rapid behaviour the same change is usually handled in a few seconds, but usually is not a number anyone can write into an acceptance record.

Now set the application requirement beside it. If the recorder's own reconnection attempt interval is 30 seconds, a 50-second network recovery can be followed by up to another 30 seconds before the stream is re-established, so 50 + 30 = 80 seconds is the figure the owner should be given rather than 50. The arithmetic is additive across layers, and each layer's number comes from its own configuration.

The exercise is to write the prediction before the test and the measurement after it, in the same row, with the difference stated. A measurement with no prediction beside it cannot say whether the design behaved as configured.

Also working toward the electrician journeyman licence? Take the free 15-question readiness check

Texas journeyman, 15 questions, scored by topic against the 70% mark. No card, and no account needed to start.

Free study material for low-voltage apprentices. This is a national foundation course: requirements differ by state and by local jurisdiction, and a practice that is common in one place is not a rule everywhere. Nothing here is a licence, a certification, or authority to work unsupervised, and completing it does not count as apprenticeship hours or continuing-education credit. Check the codes adopted where you are working, the licensing authority for that work, and your employer's safety programme. VoltMark is not affiliated with, endorsed by, or sponsored by NFPA, OSHA, NICET, BICSI, FOA, or any state or local licensing authority.

—
Help