So how do you know when to use a straight-through cable and when to use a crossover? That’s simple. You always use a straight cable when you’re connecting ports of different types. When you’re connecting devices of the same type, you always need a crossover cable. The table below outlines different scenarios and the cables required. Hub and switch ports are wired in the same way, as are PC and router ports.
Cable types used to connect devices:
Connection Cable Required
PC to Hub = Straight
PC to Switch = Straight
Router to Switch = Straight
Router to PC = Crossover
Hub to Hub = Crossover
Hub to Switch = Crossover
Switch to Switch = Crossover
Note from the previous figure that the crossover cable actually ensures that the transmit pins from one system connect to the receive pins of the other device when two devices have identical ports.