Both Router and Switch are the connecting devices in
networking. A router is employed to settle on the littlest path for a
packet to achieve its destination.
The main objective of router is to connect various networks simultaneously and it works in network layer, whereas the main objective of switch is to connect various devices simultaneously and it works in data link layer.