8

I know that a crossover cable should be used to directly connect devices of the same type and patch cable is used to connect devices of different types.

But I never understood why is it so exactly? Why does such design has been chosen? Does the device used together with a patch cable always perform crossover?

  • Wow - did you manage to post through a time tunnel from the 1990s? I'd really have to dig to find something that didn't autosense around here, and I'm a long way from the bleeding edge (most of my stuff is semi-obsolete, but not THAT obsolete.) – Ecnerwal Aug 28 '16 at 18:24
14

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.

PC to PC

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:

PC to PC

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.

PC to Switch to PC

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:

PC to Switch to PC

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).

PC to Switch to Switch to PC

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:

enter image description here

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.

  • Great answer. But could you explain why we don't just make all cables crossover (with switches having the same port as stations). That would be simpler. Are crossover cables more expensive to manufacture? – afuna Dec 18 '17 at 15:58
  • 1
    I see that my question has been addressed here: superuser.com/a/1061360/590280 – afuna Dec 18 '17 at 16:00
  • @afuna Good find. That link answers that question better than I could have. – Eddie Mar 17 '18 at 19:07
5

This fact is applied only to the devices that don't have an auto sensing mechanism, which can detect the direction of the transmitted traffic on each pin of the 8 RJ pins.

When connecting same type of network devices together (switch to switch, router to router or PC to PC ), we need to use cross-over cables so that the emitting pair from one device goes to the receiving pair of the other device.

Nowadays, most devices are smart enough to understand the direction of the traffic and handle it whatever the type of cable.

4

According to your answer, I think first you should have a basic understanding of the Crossover cable.

A Crossover cables, as the name implies, are the cables with the Tx and Rx lines crossed. While the other type of the ethernet cable is straight-through cable that has the pin assignments on each end of the cable.

In short, as we use two PCs (same devices), straight cable will connect TX to TX and RX to RX of two computers, so the devices wouldn't be able to communicate. That's why you need a crossover cable. A crossover cable redirect the output of one RJ-45 port into the input of the other RJ-45 port.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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