What is a Loop (Networking)?

Hello,
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?

Thanks!
eshiramAsked:
Who is Participating?
 
burdcellConnect With a Mentor Commented:
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.  
0
 
fhillyer1Commented:
here you might get your question answered
http://en.wikipedia.org/wiki/Routing_loop_problem
0
 
Don JohnstonInstructorCommented:
>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).
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
dbtouraustCommented:
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.
0
 
Don JohnstonInstructorCommented:
>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.
0
 
tmoore1962Commented:
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.  
0
 
madunixCommented:
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
http://www.cisco.com/en/US/tech/tk389/tk621/technologies_tech_note09186a0080094640.shtml#loop_guard
BPDUGuard:
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.

LoopGuard:
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.

madunix



0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.