Many people are unaware of the difference between a router and a switch. All it takes is a few minutes to learn about this distinction.
A router is an internetworking device that directs packets from one network to another, based on destination IP address information in the packet header.
A router is a networking device that is used to connect two separate networks, or to act as a gateway between two or more networks. It works at Network Layer.
A switch is a piece of networking hardware that only sends data in one direction at a time. It works at the data link layer.
These devices are both used in computer networks, but each has its own specific function.