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?
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?
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.
A similar issue occurred at my work - but I was told that this situation (ethernet cable plugged into two separate network ports) would not bridge the networks unless it was a crossover cable. We found an instance where someone in a conference room plugged a single cable into the female ports of two completely separate networks. There was lively discussion on whether this was the smoking gun or not (the networks need to be separate) - but recently, the switches on one network had been upgraded & autosense was not turned off - or maybe it's auto-mdix (where it automatically configures the connection to cross over even if you are not using a crossover cable) - so it is possible that was what happened.
Wonder if is useful bumping this old post but I just wanted to add that I experimented this on a home network with two routers, the second to extend the wifi and use the it's switch. Once I created the loop in the second switch the entire network went offline. No DHCP released from both of the routers and even Wifi dead on both of them and it stayd like this until I removed the loop after few minutes of testing.