Learn how to a build a cloud-first strategyRegister Now


What is a Loop (Networking)?

Posted on 2009-12-28
Medium Priority
Last Modified: 2012-05-08
I was recently troubleshooting a network that had an internet modem connected to an Apple Airport that connected to a switch and another switch was connected to that switch. The internet started going down every 20 minutes and I thought it was a bad switch because when I plugged my laptop into the AirPort the internet worked for me. However, it ended up being a loop which was causing the internet to go down. I had a thought that it might be a loop but I wouldnt have really known because I dont really know what it means and what causes it.

Can you please clearly explain to me (like I'm in grade school) what a loop is and how to fix it?

Question by:eshiram

Expert Comment

ID: 26135193
here you might get your question answered
LVL 50

Expert Comment

by:Don Johnston
ID: 26135454
>Can you please clearly explain to me (like I'm in grade school) what a loop is and how to fix it?

Sounds like the classic Broadcast Storm caused by a loop in the topology. Because bridges and switches flood (send a copy of the same frame out all ports) broadcasts, multicasts and frames to MAC addresses that it doesn't know the location of, a single frame can start multiplying into thousands of frames consuming all the bandwidth in the network.

Spanning Tree was created to prevent this from happening. But not all switches support STP (Spanning Tree Protocol).

Expert Comment

ID: 26137435
And a bit of a quick statement about STP....STP runs over trunks between switches and normally you would run at least 2 of these per switch. STP calculates a best path for traffic based on speed between the switches and shuts the other trunk down. Should the main one fail, STP recalculates and auto opens the one that was shut down. This mechanism prevents a full circle loop. As stated, not all switches are capable of running STP. If all of your swithces were daisy chained, in a circle so to speak, loops will occur and will be amplifies by broadcast storms.
When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

LVL 50

Expert Comment

by:Don Johnston
ID: 26137468
>And a bit of a quick statement about STP....STP runs over trunks between switches and normally you would run at least 2 of these per switch.

Spanning Tree can run over ANY link. Not just trunk links.

Accepted Solution

burdcell earned 500 total points
ID: 26137616
In grade school terms - When devices on a switch talk to each other they dont inherently know which switchport each other lives on.  To accomplish this they "Arp" or ask each other where they live.  This Arp request is sent to every port on every every switch in the subnet.  This is known as a "broadcast".  If a port is attached to another switch it sends the request out to every switchport in that switch and so on and so on.  In other words each tiny request is repeated out every port until an endpoint (server, router, or empty port) is reached.  If by chance somewhere in the network one of those switchports is connected back to a switch that has already received the broadcast it then repeats the broadcast back to the sending switch which creates a never ending "loop".  

The grade school experiment would be to take two cell phones and call each other.  Then put them on the table next to each other and turn on the speakerphone.  Every sound you make will go in to both phones and sent to both phones which in turn send it back to both phones and so on and so on.  The echo effect will be very noticeable and you wont be able to have a conversation because the echo will overpower everything.  This is a similar loop.  

In corporate networks Spanning tree checks for these loops.  In your home network you just need to make sure that you dont create one.  The two most common causes are 1.) you accidentally plug a cable intended for a pc back in to the same , or 2.) you have wireless AND wired networking on your laptop/pc and you "bridge" the networks. Bridging attempts to take your 100mb/s wired link and your 11mb/s wireless link and create a 111mb/s link.  This sounds good, but can inadvertently create a loop.  This is all too easy to do in the Windows world and probably the Mac world too.  
LVL 10

Expert Comment

ID: 26141733
A network loop is multiple connections are made from one or more devices.  IE if you ran two patch cords from switch A to Switch B a loop would be present. A data storm would be broadcast traffic (data that goes to all devices in network) constantly 'looping' on the two connections. This generally fills the buffers of most switches and / or routers causing the user to reboot the hardware to get connectivity restored until the buffers (mem) is filled again.  Most modern smart switches have programming to allow for these redundant connections and should pervent the 'loop' from occurring, but only if that ability is enabled.  This is typically called Spanning tree.  
LVL 25

Expert Comment

ID: 26161878
Network loop: Ensure that no redundant connections to the same station have both connections active simultaneously.
check this http://support.3com.com/infodeli/tools/netmgt/tncsunix/product/091500/c11ploss.htm

also check cisco.com  to learn more about loops
It is configured on access ports when STP is disabled (PortFast is
enabled) to prevent BPDU coming into that ports. Since there are STP disabled such BPDU would mess up.

Usually configured on inter-switch links (trunks) to prevent STP loops caused by unidirectional links.

I've seen loops caused by all sorts of things hardware/software, such as some virtualization software,  some teaming/failsafe network interface drivers...etc.

my recommendation is to find out the root cause and fix that.



Featured Post

A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This program is used to assist in finding and resolving common problems with wireless connections.
In this article, we’ll look at how to deploy ProxySQL.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question