Why do similar devices use a cross-over cable instead of a straight-through cable?

30

5

Why do similar devices use a cross-over cable instead of a straight-through cable?

user576476

Posted 2016-04-04T11:44:26.800

Reputation:

8As an aside, it's worth noting that many (but certainly no all) modern devices are able to detect that they are using the wrong cable and will switch their Tx/Rx pairs over automatically, as long as at least one end of the connection has this capability. – Jon Story – 2016-04-04T13:36:27.410

4FYI all GigE ports support Auto-MDIX. As long as one of the 2 devices is GigE, you do not need a crossover cable. – Navin – 2016-04-04T13:54:23.147

8Devices similar to what? – Lightness Races with Monica – 2016-04-04T17:26:16.560

3@BarryTheHatchet I'm guessing he means "similar to each other", e.g. a pair of switches, a pair of computers, etc. – Bob – 2016-04-04T23:33:38.193

1

@manjesh23 There was no need for you to make 8 different edits to this question, most of which didn't improve anything, and some of which made it worse. Please read over the editing section of the Help Center.

– skrrgwasme – 2016-04-05T01:42:07.403

Answers

61

Definition of a cross over cable:

A cross over cable is typically used between devices with the same type of interface (ie computer to computer, router to router, etc). Ethernet cables are usually made as an A or B type interface (which matters simply how it is wired.

enter image description here

A crossover simply has A on one end and B on the other.

enter image description here

What is happening:

Basically what is happening is that the "send" and "receive" are switched so one of the devices "send" wires goes to the other device's "receive" wire, and visa versa with the other wire. (In reality the wires are in pairs, so there are two wires for send and two wires for receive.)

If you were to use a straight through (where the wires are all in line) then a "send" would be going to a "send" and a "receive" to a "receive" so the devices wouldn't be able to communicate.

Auto MDI-X:

Keep in mind that many modern devices use Auto MDI-X which is a way for a device to automatically switch the wiring method on its own. If either device on the two ends of the ethernet have Auto MDI-X, then it does not matter if you use a cross over OR straight ethernet cable. Auto MDI-X was introduced in Gigabit ethernet so if either of your devices use Gigabit, such as routers or computers, it has an extremely high chance of having Auto MDI-X already on it.

Eric F

Posted 2016-04-04T11:44:26.800

Reputation: 3 070

No problem! Hopefully that makes it clear for you :) – Eric F – 2016-04-04T12:29:23.007

3

I think this isn't entirelly true. There's Auto-MDIX that removes the need for this kind of cable. So, no, they would still comunicate. Obviously, both ends need to support Auto_MDI-X for this to work.

– Ismael Miguel – 2016-04-04T13:45:34.980

@IsmaelMiguel You are correct. I have added information about Auto-MDIX to my answer. Thanks for catching that. – Eric F – 2016-04-04T14:23:30.553

1The edit seems to be on point and I've upvoted acordingly. It definetively deserves every single upvote. – Ismael Miguel – 2016-04-04T15:12:45.483

6@IsmaelMiguel you say that both ends need to support Auto_MDI-X, but it's clear that if only one does, it will adapt to the other's behavior. – Monty Harder – 2016-04-04T15:20:50.147

3@MontyHarder You are right, and Eric wrote it properly on his answer. I've taken a 3rd read on it and it is right. It seems that only one is required to support it. – Ismael Miguel – 2016-04-04T15:24:47.190

6"Auto MDI-X was introduced in Gigabit ethernet" isn't accurate AFAIK. Gigabit makes it mandatory, but it was developed earlier (only some non-gigabit devices supported it) – Ben Voigt – 2016-04-04T21:49:37.353

@BenVoigt From what I have ever read or heard it was introduced and even though it is in most Gigabit, I have also read that it is not in ALL. I don't have any concrete confirmation either way. Do you? – Eric F – 2016-04-05T13:31:12.857

My 4-port 100 MBit Netgear SoHo Switch from 1997 has a pushkey that switches send and receive on port 4. I also have a dusty 24-port 100 MBit SuperStack III from the end of the 90's, which supports autodetect on all 24 ports (and has a 1000 MBit fiber uplink). – Alexander – 2016-04-06T14:58:04.097

13

Once you put crosses into a cable you build into the cable application-specific assumptions. This is undesirable in cases where the same cable can be used for multiple applications. By making the cables straight through the same cables could be used for ethernet, phone, ISDN etc without too much confusion (there was still the issue of which pairs of pins corresponded to a twisted pair in the cable but everyone seemed to settle on an agreement for that).

Unfortunately straight through cables pose a problem for communication standards that use seperate wires for each direction (like 10BASE-T and 100BASE-TX). If you connect two identical devices with a straight through cable then you end up with the transmitter connected to the transmitter and the receiver connected to the receiver. Not good.

The soloution used by 10BASE-T (and later carried forward to 100BASE-TX) was to have two types of ports. "MDI" ports were used on end devices, "MDI-X" ports were used on hubs. Since the pair assignment was swapped between the two port types PCs could be connected to hubs with a straight through cable. Many hubs had an "uplink" port which was wired as "MDI" so that you could connect your hubs together with straight cables too.

Switches followed the same convention as hubs, routers followed the same convention as end devices.

Sometimes you ended up needing to connect two MDI ports (i.e. computer to computer with no hub) or two MDI-X ports (i.e. connecting two hubs where neither hub has an available uplink port). So an external crossover was needed to connect transmiter to receiver. This was most commonly implemented as a special cable (though it could also be implemented as an adaptor).

Later Auto-MDIx came along, this allowed devices to automatically swap transmit and receive. If either of the devices on a link supports auto-mdix then you don't need a crossover cable. My experiance with 100 megabit equipment is that most switches supported auto-MDIx but most NICs did not.

At gigabit all four pairs are used in both directions and afaict basically all gigabit devices support auto-MDIx for figuring out pair arrangement (though IIRC it's not strictly mandated).

plugwash

Posted 2016-04-04T11:44:26.800

Reputation: 4 587

2This answer seems to me to get further to the heart of the issue than others, because it explains why people would bother developing both types of cable, rather than just what a crossover cable is. Or, put another way, it simultaneously answers "why do complementary devices use straight, not crossover cables?" – IMSoP – 2016-04-06T11:09:21.477

12

Ethernet defines interfaces MDI and MDI-X.

This terminology refers to variants of the Ethernet over twisted pair technology that use a female 8P8C port connection on a computer, or other network device.

Ethernet over twisted pair uses 2 wires (one pair) to transmit and other 2 wires (other pair) to receive.

MDI (ethernet card on a PC for example) uses wires 1 and 2 to transmit and 3 and 6 to receive. If this device connects to a switch, the switch needs to use MDI-X that is defined as: 1 and 2 to receive and 3 and 6 to transmit.

If I need to connect two MDI interfaces (one PC to another) then I need a crossover cable. This cable crosses the transmssion pair on one side with the receiving pair on the other side.

There is another standard called Auto MDI-X that automatically detects the required cable connection type and configures the connection appropriately, removing the need for crossover cables to interconnect switches or connecting PCs peer-to-peer.

jcbermu

Posted 2016-04-04T11:44:26.800

Reputation: 15 868

4Note that this isn't quite accurate for Gigabit Ethernet. In GigE, both devices use all four pairs to simultaneously transmit and receive data, which largely obviates the need for MDI/MDI-X negotiation. – duskwuff -inactive- – 2016-04-04T18:08:01.670

3

Crossover cables redirect the output of one RJ-45 port into the input of the other RJ-45 port.

If you connect the output of PC1 to the output of PC2 (With a straight cable), you won't get anywhere.

Nowadays, NICs are smart enough to automatically reverse the IO pins, so you can achieve the same effect with a straight cable as you would with a crossover cable as long as you are dealing with a recent NIC.

You'reAGitForNotUsingGit

Posted 2016-04-04T11:44:26.800

Reputation: 614

0

Straight-through cables get their name from how they are made. Out of the 8 pins that exist on both ends of an Ethernet cable, each pin connects to the same pin on the opposite side, for local area network (LAN) use for which the RJ-45 connectors at each end have the same pinout (i.e., arrangement of conductors).

Crossover cables are very similar to straight-through cables, except that they have pairs of wires that crisscross. This allows for two devices to communicate at the same time. Unlike straight-through cables, crossover cables are used to connect like devices without the use of an uplink port.

katiesi

Posted 2016-04-04T11:44:26.800

Reputation: 155