When you need crossover cables is often explained, but why is seldom explained.
It has to do with the copper (often referred to as Ethernet) wire itself. In copper wiring, there are four pairs of two wires (eight total wires). The pairs are numbered 1-4.
The entire copper cable is full duplex, which means data can be sent and received at the same time. But individually, each pair of wires is dedicated to only send or only receive, and some pairs are not used at all. The specifics differ with each specific standard, but for the sake of the rest of this write up, we will be discussing 100BASE-TX.
100BASE-TX uses two of the four pairs (the other two are unused). One pair of wires are used for transmission, and the other pair is used for receiving.
Specifically, a PC using 100BASE-TX wil transmit over wire pair #2 (TX) and receive over wire pair #3 (RX). The NIC in this setup that this PC is using is referred to as a Media Dependent Interface (MDI) NIC.
But if we have two computers connected directly to each other. And they both try to transmit on wire pair #2, their signals will collide. Moreover, nothing will be sent on wire pair #3 and therefore neither computer will be able to receive anything.
So, the cables in the wires are crossed so that on one PC, the signal sent on Pair 2 from the first PC arrives on the second PC on Pair 3:
Both PC's are still using the MDI NIC, which means they are both sending on what they believe are Pair 2. But the individual wires are crossed so that what is sent on Pair 2 arrives on the other PC on Pair 3.
But what of a Switch, then? How do they fit in to the mix.
Switches are designed to be "in between" two PC's communicating. Therefore, switches are created with an innate crossing of the wires. This is accomplished by switches using the MDI-X standard, which is the opposite of the MDI standard. The MDI-X NICs send on pair3, and receive on pair2:
Notice we don't need the cable to cross the wires for us. What the PC sends on its TX wire is received by the switch on its RX wire, when then transmits on its TX wire and is then received by the other PC's RX wire. Therefore, when a Switch is connected to a PC, it can simply use a straight through cable (one that doesn't introduce an additional crossing of the wires).
What then happens if we have two switches in the mix? They each "cross" the wire once, therefore two PC's connected through to switches would have the switch's crossing effect negated.
Unless of course, we introduce another pair crossing in between the switches:
From the image above, we can see ...
- The PC connection to the Switch does not require a crossover cable
- The Switch connection to the other Switch does require a crosover cable
- The Switch's connection to the other PC does not require a cross over cable
Notice how in the diagram, with all the crossing, the path from one PC's TX wire to the other PC's RX wire is maintained. Anytime something is sent on a TX pair, it is always received by an RX pair, all the way through the communication.