Usually older Ethernet switches needed to be connected using a crossover cable. Now, most modern switches have auto-crossover feature that lets you use a straight Ethernet cable. You could also connect two computers using a crossover cable, but like with switches, most Ethernet interfaces on computers also support auto-crossover.