Router

A router is a specialized networking device that operates at the network layer (Layer 3) of the OSI model. Its primary function is to intelligently forward data packets between two or more different computer networks. It accomplishes this by reading the destination IP address in a packet header and then using a predefined set of rules, known as a routing table, to determine the most efficient path for that packet to reach its final destination. Unlike a switch, which only forwards data within a single network (a LAN), a router is a gateway that connects different networks, such as your home network (a LAN) to the Internet (a WAN). This process of path selection is called routing.