Wired networking has its own feature thus here’s a reference on type of cables to use in what situation inclusive hubs, routers, switches and workstations.
Most networking equipment and gears have an auto MDI/MDIX (Medium-Dependent Interface/Medium-Dependent Interface Crossover) feature that automatically detects and switches to crossover or straight connection.
However, if one side of the device has the duplex and speed settings are hardly coded (unmanaged gears), the auto MDI/MDIX feature becomes useless.
So here’s a table with all the combinations and the type of cable to use:
Generally, when you try to connect two similar devices like – hub to hub, router to router, switch to switch, and workstation to workstation, while hubs-switches, or routers-workstations are considered as similar device, you will use a cross-over cable, and for all others use a straight through.
That’s a good way to remember what to use.