keepcalculator

06 Numbers and Powers

Managed vs Unmanaged Switches: Why Loops Happen

Card No. 06·40299 · Updated · Standard formula, shown below

Mixing managed and unmanaged switches can create network loops because unmanaged switches lack Spanning Tree Protocol (STP), so they will forward frames back and forth between redundant links indefinitely. A loop occurs when two switches are connected by more than one path; managed switches run STP to block the extra path, but an unmanaged switch in the path does not participate, so the loop stays active. This article explains the technical reasons, how to detect loops, and how to prevent them.

What Is a Network Loop?

A network loop is a path that allows a frame to return to the same switch from which it started, creating an endless cycle of forwarding. In Ethernet networks, switches forward frames based on MAC addresses. When a switch receives a frame with an unknown destination, it floods the frame out every port except the one it came in on. If two switches are connected by two cables, a broadcast frame from a PC will be sent out both links, and each switch will receive the same frame twice. Each switch then floods it again, and the frame multiplies exponentially, saturating the network. This is called a broadcast storm, and it can make a network unusable within seconds.

How Spanning Tree Protocol (STP) Prevents Loops

Managed switches run Spanning Tree Protocol (STP) or its faster variant Rapid Spanning Tree Protocol (RSTP). STP detects redundant links and logically blocks one of them, so only one active path exists between any two switches. It elects a root bridge, calculates the shortest path to the root, and disables ports that are not on the shortest path. When a link fails, STP recalculates and unblocks a previously blocked port, restoring connectivity. Unmanaged switches do not run STP at all. They simply forward frames with no awareness of loops, so if you connect an unmanaged switch to a managed switch with two cables, the unmanaged switch will happily forward frames on both cables, and the managed switch’s STP cannot block the loop because the unmanaged switch does not cooperate.

Why Mixing Managed and Unmanaged Switches Is Problematic

When you mix managed and unmanaged switches, the unmanaged switch acts as a silent bridge that breaks STP’s loop prevention. For example, consider a managed switch connected to an unmanaged switch with two Ethernet cables. The managed switch sees two links to the same device (the unmanaged switch) and runs STP to block one. But the unmanaged switch does not send STP Bridge Protocol Data Units (BPDUs) and does not honor the blocking decision. It forwards frames out both ports, so the loop remains active. The managed switch may also receive its own BPDUs back on the blocked port, which can confuse its STP state and cause it to continuously recalculate, leading to instability.

Common Scenarios That Create Loops

  • Connecting a managed switch to an unmanaged switch with two cables (redundant uplinks).
  • Daisy-chaining multiple unmanaged switches and then connecting both ends back to a managed switch.
  • Plugging a cable from an unmanaged switch into two different ports on the same managed switch.
  • Using an unmanaged switch to extend a network segment that already has a loop elsewhere.

In each case, the unmanaged switch does not participate in STP, so the loop is not broken.

How to Detect a Loop

The most obvious symptom of a loop is a network that becomes extremely slow or completely unresponsive. Switches will show high CPU usage, and port LEDs may blink rapidly. You can also check the switch’s MAC address table: if you see the same MAC address on multiple ports, that is a sign of a loop. On a managed switch, you can use commands like show spanning-tree or show mac address-table to look for anomalies. A quick physical check is to disconnect one of the redundant cables and see if the network recovers immediately.

How to Prevent Loops When Mixing Switches

  1. Never connect two switches with more than one cable unless you are sure both support STP and are configured correctly.
  2. Use only managed switches for any topology that requires redundant links.
  3. If you must use an unmanaged switch, connect it as a leaf device with only one uplink to the managed switch, and do not create any other path back to the managed network.
  4. Enable loop protection features on managed switches, such as BPDU guard, loop guard, or root guard, if available. These features can detect an unmanaged switch sending BPDUs or a port that is receiving its own frames and shut it down.
  5. Use a single cable between any two switches, and rely on link aggregation (LACP) only if both switches support it and are configured as a single logical link.

Frequently Asked Questions

Can an unmanaged switch cause a loop by itself?

No, a single unmanaged switch cannot create a loop by itself; a loop requires at least two paths between switches. However, if you connect an unmanaged switch to a managed switch with two cables, the unmanaged switch will not block one path, so a loop forms.

Does STP work through an unmanaged switch?

No, STP does not work through an unmanaged switch because the unmanaged switch does not forward BPDUs in a way that STP can use. It may transparently forward BPDUs, but it does not participate in the protocol, so STP cannot block the redundant path that goes through the unmanaged switch.

What is a broadcast storm?

A broadcast storm is a situation where broadcast frames are continuously forwarded in a loop, multiplying exponentially. It saturates the network bandwidth and causes all devices to slow down or stop responding. It is the most common result of a network loop.

Can I use a managed switch with STP and an unmanaged switch together safely?

Yes, but only if you ensure there is exactly one physical path between the managed switch and the unmanaged switch. If you need redundancy, you must use managed switches on both ends and configure STP properly.

What is BPDU guard?

BPDU guard is a feature on managed switches that shuts down a port if it receives a BPDU from an unexpected device. It can help protect your network from loops caused by unmanaged switches, but it does not prevent the loop if the unmanaged switch is already forwarding frames.

Why does my network work fine with two cables to an unmanaged switch sometimes?

It may work for a short time if the traffic is low and the loop has not yet caused a broadcast storm, but the loop is still there. Any broadcast or unknown unicast frame will be duplicated and forwarded, and eventually the network will collapse under the load.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →