When do you need a crossover cable instead of a straight-through cable, and what does Auto-MDIX change?
Show the answer
Say this first
For 10 and 100 Mbps, PCs and routers (MDI) send on pins 1 and 2 and receive on 3 and 6, while switches and hubs (MDI-X) do the reverse. Unlike devices (PC to switch) use straight-through; like devices (switch to switch, PC to PC, router to PC) need crossover. Auto-MDIX detects the wiring and swaps the pairs electronically, so on modern gear either cable works. It is on by default on current Cisco switches.
Go deeper
Pinouts
| Pin | T568A | T568B |
|---|---|---|
| 1 | white-green | white-orange |
| 2 | green | orange |
| 3 | white-orange | white-green |
| 4 | blue | blue |
| 5 | white-blue | white-blue |
| 6 | orange | green |
| 7 | white-brown | white-brown |
| 8 | brown | brown |
- Straight-through: the same standard on both ends (usually T568B to T568B).
- Crossover: T568A on one end, T568B on the other. That swaps pairs 1-2 and 3-6. A full gigabit crossover also swaps 4-5 with 7-8.
- Rollover (console): pin 1 to 8, 2 to 7 and so on, for RJ-45 console ports.
Auto-MDIX on Cisco
interface GigabitEthernet1/0/10
speed auto
duplex auto
mdix automdix auto is the default. On older Catalyst platforms it only works when speed and duplex are left on
auto, so hard-coding speed could silently disable it and bring the link down with the wrong cable.
They will ask next
Why does gigabit Ethernet care less about crossover?
1000BASE-T sends and receives on all four pairs at the same time, so there is no fixed transmit pair. Auto-MDIX is part of the 1000BASE-T PHY behavior in practice, and every gigabit port I have used handles either cable.
Router to PC with no switch in between, which cable?
Crossover, because both are MDI devices. With Auto-MDIX on either end a straight cable also works.
Traps
- Saying router to switch needs crossover. Router (MDI) to switch (MDI-X) is straight-through.