A router is a device that forwards data packets alongnetworks. A router is connected to at least two networks, commonly two LANs or WANs or a LAN and its ISP's network. Routers are located at gateways, the places where two or more networks connect.


Routers use headers and forwarding tables to determine the best path for forwarding the packets, and they use protocols such asICMP to communicate with each other and configure the best route between any two hosts.