Table of Contents
Type a URL, press Enter, and about 300 milliseconds later a page appears. In between, your request crossed a dozen networks owned by organisations that have never spoken to each other, and it found its way there and back without anyone drawing it a map. Understanding how routers send data across networks really comes down to a few million boxes, each making one small decision very quickly, over and over again.
A Router Is a Traffic Cop Between Networks
The word “router” gets used loosely. A switch moves frames around inside a single network. A hub shouts at everyone. A router is the thing that sits at the border between two different networks and decides which side a piece of traffic belongs on.
The box in your hallway is doing at least five jobs stacked on top of each other: a modem or gateway that talks to your ISP, a switch for the wired ports, a Wi-Fi access point, a DHCP server handing out local addresses, and a router doing the actual forwarding. That last role is the one that matters for this story.
Your Data Leaves as Packets, Not as a File
Nothing travels as a single blob. Your operating system chops outgoing data into packets, each one capped at the network’s maximum transmission unit. On most Ethernet and Wi-Fi links that limit is 1,500 bytes, and after the IP and TCP headers take their share you’re left with roughly 1,460 bytes of actual payload. A 3 MB photo therefore leaves your machine as something close to 2,100 separate packets.
Each packet carries a small header, and that header is all a router needs to make a decision:
- Source address — where the reply should go back to
- Destination address — the target the router is trying to reach
- Time to Live (TTL) — a counter, usually starting at 64 or 128, that drops by one at every hop and stops the packet looping forever
- Protocol and port numbers — which service the packet belongs to, such as HTTPS on port 443
- Checksum — a quick integrity check so damaged headers get discarded
Packets from the same download can take different routes and arrive out of order. The receiving machine reassembles them by sequence number and asks for anything missing.
Every Hop Reads the Address, Not the Contents
A router does not care what is inside your packet. It looks up the destination IP address in a routing table, a list that maps blocks of addresses to a next hop and an outbound interface. Entries come with a metric so the router can prefer a fast link over a slow backup, and the lookup uses longest prefix match: a specific /32 route beats a broad /8 route every time.
If nothing matches, the router falls back to its default route, often written as 0.0.0.0/0, which usually points toward the ISP. Every router on the public internet has a table small enough to hold in memory because of aggregation — one entry for a whole neighbourhood of addresses rather than one per device. If you want the background on how those addresses are structured and assigned, this plain-English guide to how IP addresses work covers the numbering scheme in detail.
DNS Answers the Question Before the First Packet Leaves
Before a single packet is routed, something has to turn a name into an address. Your device asks a DNS resolver, which either has the answer cached or walks the hierarchy to find it. Resolvers hold records for a set period defined by the record’s TTL — often 300 to 3,600 seconds — so most lookups never leave your provider’s network. The full lookup chain, from root servers down to an individual record, is explained in this piece on what DNS is and how it works.
DNS problems are a common source of confusion, because a failed lookup looks exactly like a broken internet connection. If ping 1.1.1.1 works but ping example.com does not, routing is fine and the resolver is the culprit.
The Hop-by-Hop Journey
Inside your own network
Your laptop first checks whether the destination is on the same subnet. If it is, the packet goes directly. If not, it goes to the default gateway — your router. To put the packet on the wire, the machine needs a MAC address, so it sends an ARP request asking who owns the gateway’s IP. That MAC address only matters for this one hop; it gets replaced at every stage.
Out to the ISP and beyond
Your router strips the old frame, decrements the TTL, repacks the packet in a new frame for the ISP link, and sends it on. The IP addresses in the header stay the same from start to finish. The link-layer wrapping changes at every hop.
From the ISP’s edge router the packet climbs to the backbone, where it may cross an internet exchange point — a physical building where hundreds of networks interconnect and swap traffic under peering agreements. Big content providers often place caches inside those exchanges or inside ISPs directly, so a video stream might travel 8 kilometres instead of 8,000. That kind of placement is one of the core internet technologies that power modern websites, and it is why a site hosted on the other side of the planet can still feel local.
NAT: Why the Server Never Sees Your Real Address
Your laptop probably has an address like 192.168.1.24, which is private and meaningless outside your home. Your router rewrites the source address to its public IP and tracks the change in a translation table, assigning a unique port number to each outbound conversation. When a reply arrives, the router scans that table, finds the matching entry, rewrites the destination back to 192.168.1.24 and forwards it inward.
This is why you can have forty devices online with a single public address, and also why unsolicited inbound connections get dropped by default. Entries expire after a period of inactivity, typically anywhere from a few minutes to a few hours depending on the vendor.
When Packets Go Missing
Links fail, buffers overflow, and Wi-Fi drops frames. TCP handles it: the receiver acknowledges what it has, the sender retransmits anything unacknowledged, and congestion control shrinks the sending window when loss signals trouble. Even 1% packet loss can cut throughput dramatically on a long-distance connection, because the sender backs off hard and climbs slowly.
Bufferbloat is the sneakier problem. A router with an oversized queue keeps packets waiting instead of dropping them, so latency climbs from 20 ms to 400 ms while a large upload runs. The transfer completes; every video call in the house suffers.
Where the Security Sits
That same NAT behaviour doubles as a crude firewall, and most home routers add stateful inspection on top. The weak point is rarely the routing logic itself but the admin interface: factory passwords, remote management left switched on, firmware from 2019. A router is a small computer with a public-facing role, and it needs the same attention as anything else on your network. Several of the most common cybersecurity mistakes — reused passwords, unpatched firmware — start at the gateway.
Watching It Happen Yourself
You can see the hop count from your own machine. On Windows, run tracert example.com; on macOS or Linux, traceroute example.com. The tool sends packets with deliberately tiny TTL values, starting at 1, so each router along the path reports itself when the counter hits zero. You will usually see your own gateway first, then an ISP address, then a run of unnamed backbone routers that suppress replies, then the destination.
Run it twice and the path may differ slightly, which is the routing table doing its job. Latency jumping from 12 ms to 90 ms halfway down the list tells you roughly where a problem lives. That single command has settled more “the internet is broken” arguments than any other tool.


