Why do similar devices use a cross-over cable instead of a straight-through cable?
Why do similar devices use a cross-over cable instead of a straight-through cable?
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.
A crossover simply has A on one end and B on the other.
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:
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).