Updated 8 hours ago
When you load a webpage, your request doesn't follow a predetermined path. There's no master routing computer, no central authority directing traffic. Instead, your data hops from router to router, each one making an independent guess about the best direction to throw the packet next.
No router sees the whole Internet. Each one sees only its neighbors and trusts that if it passes the packet in roughly the right direction, the next router will figure out the rest. Somehow, billions of devices find each other this way.
The Network of Networks
The Internet isn't one network—it's thousands of independent networks agreeing to pass each other's traffic. Each of these networks is called an Autonomous System (AS).
Your ISP is an autonomous system. So is Google (AS15169), Cloudflare (AS13335), Amazon, Microsoft, and thousands of universities, companies, and regional providers. Each runs its own internal routing however it wants. The magic happens at the boundaries, where these independent systems meet and exchange traffic using a common language: the Border Gateway Protocol (BGP).
Think of it as controlled anarchy. Inside their borders, network operators have complete authority. At the borders, they negotiate and cooperate—or don't. An AS can refuse to carry another's traffic, prefer certain paths for business reasons, or change routing on a whim. There's no Internet police enforcing optimal routing.
How a Packet Finds Its Way
The journey of a packet from your laptop to a server across the world:
Your device looks at the destination IP address and realizes it's not on your local network. It hands the packet to your home router—the default gateway.
Your home router knows even less. It just sends everything to your ISP.
Your ISP's routers consult their routing tables. These tables say things like: "For addresses starting with 142.250.x.x, send packets toward Google's network via this link." The router doesn't know the full path to Google—just the next hop in that direction.
The packet crosses network boundaries, perhaps passing through three or four autonomous systems. At each hop, a router examines the destination, consults its table, and forwards the packet one step closer. Each router is essentially saying: "I don't know exactly where this goes, but that direction seems right."
The destination network receives the packet and routes it internally to the specific server.
The response takes a different path. Internet routing is asymmetric—your request might go through Chicago, but the response might come back through Dallas. Neither path is "correct." Both work.
Routing Tables: What Routers Actually Know
Every router maintains a routing table—a list of destinations and which direction to send packets for each:
| Destination | Next Hop | How I Learned This |
|---|---|---|
| 192.0.2.0/24 | 10.0.0.1 | BGP from AS64500 |
| 203.0.113.0/24 | 10.0.0.5 | BGP from AS64501 |
| 0.0.0.0/0 | 10.0.0.9 | Default route |
When a packet arrives, the router finds the most specific match. A packet destined for 192.0.2.50 matches the /24 route, so it goes to 10.0.0.1. A packet for some random address that doesn't match anything specific follows the default route.
The routing table is the router's entire worldview. It doesn't know what happens after the next hop. It doesn't know if the path is congested, or if there's a better route three hops away. It just knows: for this destination, send it there.
How Routers Learn Routes
Routers don't come pre-loaded with knowledge of the Internet. They learn through routing protocols—ongoing conversations with their neighbors.
Within a network (inside an autonomous system), protocols like OSPF let routers map the internal topology. They share information about which links exist and their costs, then each router independently calculates the shortest path to every internal destination.
Between networks, BGP handles the coordination. Autonomous systems announce to their neighbors: "I can reach these address ranges." The neighbors record this, then tell their neighbors: "I can reach those ranges through AS64500." The information propagates, router by router, until the whole Internet roughly knows how to reach everything.
This process is continuous. Links fail. New networks connect. Policies change. Routers constantly exchange updates, and the routing tables slowly shift to reflect the current topology.
Why Multiple Paths Exist
For any significant destination, routers typically know several possible routes. How do they choose?
Shortest path counts router hops—fewer is better. Simple, but a path through three fast links beats two slow ones.
Cost metrics consider link capacity. A 10 Gbps link has lower "cost" than a 1 Gbps link, so routers prefer paths with more bandwidth.
Policy preferences implement business decisions. An ISP might prefer routes through partners who've negotiated favorable terms, avoiding expensive transit providers when possible.
BGP's selection algorithm weighs multiple factors in sequence: local preference, AS path length, origin type, and more. Network operators tune these to implement surprisingly sophisticated routing policies.
The result: two packets to the same destination, sent seconds apart, might take completely different paths. Both arrive. Neither path was wrong.
When Things Break
A fiber cut in Nebraska. A router crashes in Frankfurt. A misconfiguration in São Paulo. The Internet handles failures constantly.
Detection happens fast for directly connected links—routers notice immediately when a neighbor stops responding. More distant failures take longer to detect, as routing protocol messages stop arriving.
Recalculation begins once failure is confirmed. Routers compute new paths using remaining links. If there's any alternative route, they find it.
Propagation spreads the news. Routers tell neighbors about the change, who tell their neighbors, until the whole affected region has updated routing tables.
Convergence time varies. Modern protocols within a network reconverge in seconds. BGP across the Internet can take minutes. During this window, some packets wander into dead ends and get dropped.
The Internet's resilience comes from redundancy. Most destinations are reachable via multiple independent paths. Cut one link, traffic flows around it. This works remarkably well—until it doesn't, and a single misconfiguration cascades into a regional outage.
Internet Exchange Points: Where Networks Meet
In certain buildings around the world, hundreds of networks physically connect to each other. These Internet Exchange Points (IXPs) are where the magic of peering happens.
DE-CIX in Frankfurt. AMS-IX in Amsterdam. Equinix facilities in dozens of cities. Inside, a massive switching fabric lets any connected network exchange traffic with any other.
Why does this matter? Without IXPs, if your ISP wanted to exchange traffic with a content provider, they'd either need a dedicated connection or would route through intermediaries—paying transit costs and adding latency. IXPs let networks that exchange significant traffic connect directly, improving performance and reducing costs.
The largest IXPs handle multiple terabits per second. When you stream video that loads instantly, an IXP likely played a role.
The Security Problem No One Solved
BGP was designed in an era when network operators knew and trusted each other. It has no built-in authentication. If an autonomous system announces "I can reach Google's addresses," other routers believe it.
This enables route hijacking. A malicious or misconfigured network announces routes for addresses it doesn't own. Traffic that should go to Google instead flows through the attacker's network. This has happened—accidentally and deliberately—with surprising regularity.
Route leaks are the accidental version. A network misconfigures BGP and suddenly announces it can reach half the Internet. Traffic floods in, overwhelming infrastructure never meant to carry it.
RPKI (Resource Public Key Infrastructure) adds cryptographic validation—networks can prove they're authorized to announce specific routes. Adoption is growing but incomplete. Much of the Internet still runs on trust.
What Routing Doesn't Guarantee
Routers provide best-effort delivery. They'll forward your packet if they can. They'll drop it without apology if they can't.
Congestion fills router buffers. When there's no room for new packets, routers discard them. This isn't a failure—it's the signal that tells sending systems to slow down.
Corruption from electrical interference or hardware errors damages packets. Routers detect this and drop corrupted packets rather than forwarding garbage.
Retransmission isn't the router's job. That's TCP's responsibility. Routing gets packets most of the way, most of the time. Higher layers handle reliability.
Seeing the Invisible
Routing is invisible until you look for it:
Traceroute reveals the path by sending packets with deliberately short lifespans. Each router along the way responds when the packet "expires," revealing itself.
BGP looking glasses let you peer into a network's routing tables. Many providers offer these publicly—you can see exactly which paths they've learned for any destination.
Route monitoring services track BGP changes globally, detecting hijacks, leaks, and anomalies. When a major routing incident happens, these services often spot it before the affected networks do.
The Elegant Absurdity
Step back and consider what Internet routing achieves:
Thousands of independent networks, each pursuing their own interests, running their own hardware, implementing their own policies—yet collectively enabling any device on Earth to reach any other.
No central planning. No global routing authority. No master table of the Internet's topology.
Just protocols. Agreements. And routers doing the same simple thing over and over: look at the destination, consult the table, forward one hop closer.
The packet doesn't know its path. The routers don't know the full journey. But somehow, your video call connects, your email arrives, and the webpage loads. Billions of times per second, across a system no one fully controls.
That's Internet routing. Controlled chaos that works.
Frequently Asked Questions About Internet Routing
Was this page helpful?