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

12,904

Solution 1

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.

Solution 2

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.

Solution 3

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

Solution 4

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.

Share:
12,904

Related videos on Youtube

Mokubai
Author by

Mokubai

I am a community elected moderator on Super User. First, please put down the chocolate-covered banana and step away from the European currency systems. You may consider how to ask a question. You might also want to use the right tools for the job, rather than pounding a nail with an old shoe or glass bottle. But above everything else, please, never use regex to parse HTML. Crawling abominations from the depths await those who venture down that path... Lastly, remember the golden rule of question migrations.

Updated on September 18, 2022

Comments

  • Mokubai
    Mokubai over 1 year

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

    • Jon Story
      Jon Story about 8 years
      As 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.
    • Navin
      Navin about 8 years
      FYI all GigE ports support Auto-MDIX. As long as one of the 2 devices is GigE, you do not need a crossover cable.
    • Lightness Races in Orbit
      Lightness Races in Orbit about 8 years
      Devices similar to what?
    • tvdo
      tvdo about 8 years
      @BarryTheHatchet I'm guessing he means "similar to each other", e.g. a pair of switches, a pair of computers, etc.
    • skrrgwasme
      skrrgwasme about 8 years
      @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.
  • Eric F
    Eric F about 8 years
    No problem! Hopefully that makes it clear for you :)
  • Ismael Miguel
    Ismael Miguel about 8 years
    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.
  • Eric F
    Eric F about 8 years
    @IsmaelMiguel You are correct. I have added information about Auto-MDIX to my answer. Thanks for catching that.
  • Ismael Miguel
    Ismael Miguel about 8 years
    The edit seems to be on point and I've upvoted acordingly. It definetively deserves every single upvote.
  • Monty Harder
    Monty Harder about 8 years
    @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.
  • Ismael Miguel
    Ismael Miguel about 8 years
    @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.
  • Dut A.
    Dut A. about 8 years
    Note 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.
  • Ben Voigt
    Ben Voigt about 8 years
    "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)
  • Eric F
    Eric F about 8 years
    @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?
  • IMSoP
    IMSoP about 8 years
    This 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?"
  • Alexander
    Alexander about 8 years
    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).