Router
A router is a networking device that forwards data packets between different networks by reading the destination IP address of each packet and choosing the best next hop toward it. It operates at layer 3, the network layer, of the OSI model, which is why it is the device that joins a home network to an internet service provider, and the internet itself to its thousands of constituent networks. Where a switch moves frames within one network and a modem converts signals, the router decides where packets should go between networks.
Every router makes its decision with a routing table, a list of destination network prefixes paired with the next hop or interface to use, and it applies the most specific match. When a packet arrives, the router examines the destination address, finds the longest matching prefix (so a route for a narrow range beats a broad one), decrements the packet's time-to-live (TTL) counter, and sends the packet out the chosen interface toward the next router. If no specific route matches, the default route, often called the default gateway, sends it onward to a larger network. The TTL field, defined in the IPv4 specification (RFC 791) and decremented at each hop, ensures a packet caught in a routing loop is eventually discarded rather than circulating forever, and the traceroute tool exploits it to reveal the path.
Routing tables are filled in either by hand (static routes) or by routing protocols that let routers advertise to one another which networks they can reach. Inside one organization, protocols such as OSPF and IS-IS compute shortest paths through a shared map of the network; between independently run networks, the Border Gateway Protocol (BGP) exchanges reachability along with policy, and it is what makes the internet a network of networks. Historically the first routers were the Interface Message Processors built by BBN for the ARPANET in 1969, and early internet routers were called gateways, a term that survives in default gateway. A misconfigured BGP announcement can redirect or black-hole traffic for large parts of the internet, which shows how much depends on routers trusting one another.
A home router is in practice several devices in one box, which is the main reason it is confused with the other devices in this series. Alongside the true routing function, it normally contains a small Ethernet switch for the wired ports, a Wi-Fi access point, a DHCP server that assigns private addresses to devices, a firewall, and network address translation (NAT), which lets many private devices share a single public IP address by rewriting the address and port on outgoing packets and remembering the mapping for the replies. It also often sits beside, or is combined with, a modem. Telling the roles apart is useful when troubleshooting: the switch part moves frames by MAC address within the LAN, the modem part talks to the provider's line, and the router part is the one that connects the two networks and makes the routing and NAT decisions.
Common misconceptions are that the router is what gives internet access and that a faster router means faster internet. Access comes from the provider's line and plan; the router only passes traffic and can become a bottleneck if its processor, Wi-Fi radio or firmware is poor. Another pitfall is the belief that NAT is a security feature: it incidentally blocks unsolicited inbound connections, but a firewall configuration and updated firmware are what actually protect a network, and routers with default passwords or outdated software have been widely abused. Beyond homes, routers in data centers and carrier backbones handle enormous traffic with specialized hardware, and the same routing ideas appear in software in cloud virtual networks and container platforms, where traffic between AI training nodes depends on correct routes and addressing.
Read a router as the network's navigator at the junctions between networks: it looks only at the destination IP address, consults its routing table for the longest matching route, decrements the TTL, and hands the packet to the next hop, repeating a simple local decision until the whole internet behaves like one connected place.