What is a router and what does it do when you access the Internet?

Published on 2026-10-20 by frfrand

What is a router, how it decides packet routes, differences with Wi-Fi, modem and switch, and how to diagnose a connection.

What is a router and what does it do when you access the Internet?

Short answer: 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 provides 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 routers to exchange information.

Internet traffic passes through many devices from different operators before reaching the requested service. Your home router is just 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.

And 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 can 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.

What is a router and what does it do when you access the Internet?

From your home router to a published application

Your home router and a cloud provider's router perform routing tasks, but security and service publishing are separate issues. If you install an API on your computer and want others to visit it, you might need NAT, a public IP, and firewall rules. If you host it on an ArduMaker VPS, the VPS does not have its own public IP: it is a container within a shared physical server. You point the domain to that server's IP (or with a CNAME to the VPS's <slug>.arducloud.com name); ArduMaker's edge nginx terminates HTTPS and passes the request to the nginx inside your VPS, which sends it to your application's process. For other ports, an explicit redirection is created, which can be limited to certain IPs.

Quick diagnosis: if a website does not open, first check DNS, TCP connection to port 443, HTTPS certificate, and service status. Changing your home router will not resolve a 502 error that occurs between Nginx and an API on the server.

Frequently asked questions

What is the default gateway?

It is the address of the router to which your device delivers all traffic that does not go to its own local network. At home it is usually something like 192.168.1.1 or 192.168.0.1. If it is misconfigured, the device can communicate with the local network but cannot access the Internet.

How do I view my computer's routing table?

In Linux, with ip route; in Windows, with route print; in macOS, with netstat -rn. The default (or 0.0.0.0) line indicates the default route, i.e., which router packets go to when there is no more specific route.

Related: What is a subnet · What is a VPS.

  • router
  • redes
  • Internet
  • IP

Keep reading

All articles · VPS plans