# Router

> The box that connects your devices to each other and to the internet.

- Level: Basic
- Topics: Networks
- URL: https://tidbit.legios.com.ar/router/
- In Spanish: [Router](https://tidbit.legios.com.ar/es/router/)

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.

## An analogy

A roundabout with signposts. Each car arriving reads the sign for its destination and takes the right exit; the roundabout does not need to know the whole trip, only the next road.

## 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.

## Go deeper

- [What is a router? (Cloudflare)](https://www.cloudflare.com/learning/network-layer/what-is-a-router/)
- [Router (Wikipedia)](https://en.wikipedia.org/wiki/Router_(computing))

## Related terms

- [ISP](https://tidbit.legios.com.ar/isp/): The company you pay to connect your home or phone to the internet.
- [Data center](https://tidbit.legios.com.ar/data-center/): A building full of servers where the internet, the cloud and AI actually run.
- [Packet](https://tidbit.legios.com.ar/packet/): The small chunk every piece of internet data is cut into before it travels.
- [IP address](https://tidbit.legios.com.ar/ip-address/): The number that identifies a device on a network, like a postal address.
- [Server](https://tidbit.legios.com.ar/server/): A computer whose job is to answer requests from other computers, all day, every day.
- [Wi-Fi](https://tidbit.legios.com.ar/wi-fi/): Networking over radio waves: the internet without the cable, within a few rooms.
- [DHCP](https://tidbit.legios.com.ar/dhcp/): The service that gives each device an IP address automatically when it joins a network.
- [NAT](https://tidbit.legios.com.ar/nat/): How a whole home or office shares one public IP address on the internet.
