Skip to content

Routing Across the Internet ​

Season 2 · Note 5

In Plain English (30-Second Refresher) ​

TL;DR

The internet is about 75,000 separate networks joined together, and no one has a map of the whole thing.

  1. Every router reads only a packet's destination IP (Internet Protocol) address, looks it up in its forwarding table, and sends it one hop closer.
  2. A hop counter called the TTL (time to live) drops by 1 at each router; at 0 the packet is discarded, so it can't loop forever.
  3. Networks fill those tables by announcing "I can reach these addresses" to their neighbours using BGP (Border Gateway Protocol).
  4. When a link breaks, the announcements change and traffic flows around the damage automatically.

The Mission We Follow ​

Your score has left home and reached your ISP (Internet Service Provider). Coin Dash is on another continent, about 100 ms (milliseconds) away. Around 15 routers will pass the packet along, and none of them knows the whole route.

Real-World Analogy: Sorting Centres Passing a Parcel 📮 ​

In the postIn routingWhat it does
🏭 A sorting centreRouterReads the address, sends the parcel one step on
📋 The centre's sorting chartForwarding table"Addresses like this → that van"
🦘 One van ride between centresHopOne router-to-router step
🔢 A limited number of stampsTTLStops parcels circling forever
📢 Postal services telling each other where they deliverBGPBuilds the sorting charts
🚢 The overseas shipping laneUndersea cableCarries traffic between continents
🚧 A detour when a road is closedReroutingTraffic flows around failures

Visual Mental Model ​

Routing: a packet goes from the internet provider through routers with forwarding tables, over an undersea cable to the data centre, with a backup cable for detours

How It Works (Interactive Animated Flow) ​

Hop by Hop to Coin Dash
Every router makes one local decision
🎯 Mission Carry your score from your provider to Coin Dash, one hop at a time.
HOP 2🏢Your providerfirst router outTTL 62🧭Router Areads the address≈ 30 ms🌊Ocean cable6,000 km of glassPLAN B🛟Backup cablefurther southARRIVED🖥️Coin Dashdata centrehopbest routehops 8–15detour+ a few ms

Inside one router: the forwarding table ​

Destination (address block)MeaningSend to
198.51.100.0/24Coin Dash's 256 addresseseast, over the ocean cable
203.0.113.0/24homes on your providerback west
0.0.0.0/0everything elseupstream provider

/24 means "the first 24 bits (three numbers) must match". The most specific match wins, so 198.51.100.20 takes the first row.

The 4 Core Principles ​

  1. Destination-only, one hop at a time. No packet carries a route; each router just picks the next hop.
  2. Tables come from announcements. Inside a network, routers share routes automatically; between networks, BGP does it.
  3. TTL prevents disasters. A routing mistake can't trap packets forever.
  4. Many paths, no centre. The internet bends around damage instead of breaking.

See It Yourself: traceroute ​

bash
traceroute example.com      # Mac / Linux
tracert example.com         # Windows

It sends packets with TTL = 1, 2, 3… Each router that drops one (TTL hit 0) reports back, so you get a list of every hop and how long it took. A sudden jump of ~70 ms usually means "crossed an ocean".

Trade-offs ​

ChoiceUpsideDownside
No central mapNo single point of failure; scales to the whole planetNobody can guarantee a path or a travel time
BGP trusts announcementsSimple, works between competitorsA wrong announcement can misroute traffic (real outages have happened)
Shortest route by policy, not distanceNetworks control costs and partnershipsThe path isn't always the geographically shortest

Common Gotchas ​

Watch Out For

  • Your packets and the reply may take different paths. Routing is decided per direction, per hop.
  • More bandwidth doesn't shorten the trip. Distance and hop count set the delay.
  • Satellites carry very little. Almost all intercontinental traffic goes through 500+ undersea fibre cables.
  • TTL here ≠ TTL in DNS (Domain Name System). Same name, different jobs: here it counts hops, in DNS it counts seconds of caching.

Quick Self-Check (Restore Your Memory) ​

1. What does a router look at to decide where to send your packet?

Only the destination IP address, matched against its forwarding table (most specific row wins). It doesn't plan the whole route.

2. Why does every packet carry a TTL?

So a packet caught in a routing loop is dropped after a set number of hops instead of circling forever. traceroute uses it to list the hops.

3. An undersea cable is cut. Why does your game keep working?

Networks withdraw the broken route (via BGP) and routers switch to the next-best path, like a backup cable. It's a little slower, but it works.

🎬 Now Watch It Happen ​

2-minute episode

Ride along as the packet passed router to router, across the ocean, and around a cut cable. S2 · E5 — Hop by Hop →

Built for clear thinking and fast 2-minute refreshers.