Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What is likely to happen when you plug two ends of a network cable to a single switch/router? Will this create problems on the network, or just be ignored?

share|improve this question
19  
This happened at one of my workplaces. A board meeting attendee took the patch cable that he kept in his laptop's bag and stuck both ends into some open female 8P8C plugs. The network instantly ground to a halt. It was then that the IT department learned that we had not enabled STP on our MDF's switch stack. It took a sad amount of time to track down where the physical problem was too. –  Wesley Mar 4 '12 at 0:02

1 Answer 1

up vote 78 down vote accepted

Depends on the router/switch.

If it's "Managed" - Like decent Netgear, Cisco or HP Procurve, or has STP (Spanning Tree Protocol) or one of its variants enabled, there's a few seconds of absolute insanity, then the switch realises that there's a loop in the network topology, and blocks one of the ports.

(I've only described the STP re-convergence as "absolute insanity" because if you're using old-style, slow, STP then re-convergence can take 30s or more, depending on network complexity. Vendor specific STP extensions such as BackboneFast and so on will decrease this, but you might still end up with a short period of a slightly unstable network. Rapid STP is a lot quicker to converge, due to a different algorithm)

If it's "Unmanaged"- Like pretty much all SOHO grade gear, and a fair proportion of small 4-8 port switches, then all hell breaks loose, as you've just created a loop in a network, and all the traffic tends to just bounce about inside the loop.

The reason this happens is because switches rely on a process of MAC address learning to map MAC addresses to physical ports. In a non-looped network, one MAC address will only be visible to the switch on a given physical port. If you have a loop, then the switch will see multiple paths to the same MAC address, and possibly multiple MAC addresses on multiple ports, so instead of the traffic being switched efficiently, it will be broadcast to wherever it sees the MACs. This is known as a "Broadcast Storm".

This can quickly use up all of a switch's CPU power, fill the transmit and receive buffers, as well as polluting the MAC address table.

Basically, if you create a loop in the network, you'll know about it, either through monitoring (detecting a change in the STP topology [you do have monitoring, right?]), or in everything falling over dramatically.

If you look at a switch that has a broadcast storm on it, you tend to find that all of the port activity lights are blinking all at the same time.

share|improve this answer
3  
Just to add to the above, the managed switches I've seen normally have a setting/threshold for max broadcasts - if you plug a cable back into the came switch you run the risk of a broadcast storm - en.wikipedia.org/wiki/Broadcast_radiation. –  Robin Gill Mar 4 '12 at 2:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.