What is a router and what does it do when you access the Internet?
Published on 2026-10-20 by frfrand
Qué es un router, cómo decide las rutas de los paquetes, diferencias con Wi-Fi, módem y switch y cómo diagnosticar una conexión.

A router is a device or program that connects different IP networks and decides where to send data packets. At home it is usually the box with lights that also offers Wi-Fi, but its main function is not to generate a wireless signal: it is routing traffic between networks.
When you open a page, your computer needs to send requests to a server that may be thousands of kilometers away. Your router is usually the first important intermediary outside the local network.
An example we all know
Imagine a city with many neighborhoods and streets. To reach an address, you need to know which path to take. A router consults routing information and decides what the next step is toward a destination network.
It does not necessarily know every building on the planet in advance. Many networks use default routes and protocols that allow exchanging information between routers.
Internet traffic passes through many devices from different operators before reaching the requested service. Your home router is only the first leg.
What is inside the home router?
Many home devices combine several components into a single box: router, Ethernet port switch, Wi-Fi access point, and in some cases a modem or fiber termination.
Being inside the same device does not make the functions synonymous. You can have a router without Wi-Fi or several Wi-Fi access points connected to a single router.
How does it know where to send the packets?
IP packets include a destination address. The router consults its routing table to determine which next hop or interface to send them to.
If the address belongs to the local network, traffic may follow a different path than if it belongs to the Internet. If no specific route exists, a default route toward the provider may be used.
In large networks, routing protocols allow updating those decisions. The details are more complex, but the central idea is always to choose a path toward the destination network.
Router, modem and switch: three different functions
Router: connects networks and makes routing decisions based on IP information.
Modem or termination equipment: adapts or terminates the link used to communicate with your provider, depending on the technology.
Switch: connects devices within a local network and, in its traditional Layer 2 function, forwards frames based on MAC addresses.
In an apartment, all of this may be done by the same operator device. In an office or data center, they are usually separate devices.
What about DHCP and NAT?
Many home routers also run DHCP, which assigns addresses and configuration to devices. In addition, they can perform NAT, which allows sharing a public IPv4 address among several internal devices.
But none of those functions is mandatory for a device to be a router. In IPv6 networks and enterprise infrastructures there are designs that do not exactly follow the pattern of a home.
Is a router a firewall?
Not automatically. It may include filtering rules and a firewall, but routing and security are distinct functions.
A misconfigured router can expose services that do not need public access. It is advisable to review port forwarding, device software, and administration access.
If I have Wi-Fi but no Internet, did the router fail?
Not necessarily. The cell phone may be perfectly connected to the access point, although the operator's connection, DNS, or destination service may fail.
You can start by checking if other devices browse, what IP your device obtained, what its gateway is, and if it can reach external services. Changing all settings blindly usually makes diagnosis more difficult.
How does it relate to servers?
On a platform with VPS and containers there are physical and virtual routers that allow networks to communicate. Not all are devices with antennas: a Linux host can also perform routing functions.
At ArduMaker, understanding the concept helps explain why an application may be accessible from an internal network, but not from the Internet until routes and inbound rules are correctly defined.
In short: the router decides where to send packets between networks. Wi-Fi, DHCP, NAT, and firewall may accompany it, but they are not the same thing.
Sources: What is a router · What is routing · What is NAT.
