Router
The box that connects your devices to each other and to the internet.
A router is a device that passes data between networks. The one at home connects your local network (phones, laptop, TV) to your internet provider's network, and from there to the rest of the world. Big routers at providers and data centers do the same job between huge networks, millions of times per second.
Its core trick is choosing the next hop. Every packet carries a destination IP address; the router looks it up in its routing table and forwards the packet out the right door. No single router knows the whole path to a server across the ocean; each one only knows which neighbour is closer, and the packet gets there by a chain of such decisions.
The home router actually bundles several things in one box: a router, a Wi-Fi access point, a small switch for the Ethernet sockets, a DHCP server that hands out private IP addresses, NAT so all devices share one public address, and a basic firewall. That is why turning it off and on again fixes so much: you are restarting half a dozen services at once.
Keep in mind
- A router forwards packets between networks using a routing table.
- Each router only decides the next hop; the internet is a chain of those decisions.
- Your home router also does Wi-Fi, NAT, DHCP and a basic firewall.
- A modem talks to the provider's line; the router shares that connection. Often it is the same box.