An interactive field guide
You type an address, press Enter, and a page appears a moment later. In that moment your request is cut into packets, sent as pulses of light and radio, passed between machines in several countries, and rebuilt on the other side. Each chapter below has a lab where you run one of those steps yourself, and chapter 11 follows real apps like WhatsApp, YouTube and Google Drive across the world.
Press Enter in the address bar to watch a request cross the internet and come back with a page. Use Next step to go at your own pace.
Go deeperClock values are rough, typical numbers. Real page loads also include connection handshakes, covered in chapters 6 and 10.
Chapter 1 · Physical layer
Text, photos and video calls all travel as long strings of bits. What carries those bits depends on the medium: voltage on copper, flashes of light in glass, or radio waves through the air.
Each character you type is stored as a number. The letter H is 72, which is 01001000 in binary. A network card sends those eight bits one after another, then the next character, and so on.
On a copper cable, a 1 might be a higher voltage and a 0 a lower one. In optical fiber, a laser flickers on and off billions of times a second. Wi-Fi changes the shape of a radio wave.
Signals pick up noise along the way, and a receiver sometimes misreads a bit. That is why every chunk of data carries a checksum, a small number computed from the contents that exposes errors.
Type a short message, pick a medium and transmit. Turn up the noise to see errors creep in.
Press Transmit to send the message.
Chapter 2 · Internet layer
The internet never sends your photo or email in one piece. It cuts data into packets of about 1,500 bytes, and each packet makes its own way to the destination.
Every packet starts with a header, like the outside of an envelope. It says where the packet came from, where it is going, and where it fits in the sequence.
Cutting data into packets lets millions of people share the same cables. Your packets take turns with everyone else's, so no single download can hog a link.
Packets can arrive out of order, or not at all. The receiver uses the sequence numbers to put them back in order and asks again for anything missing.
Change the packet size and how many packets get lost, then send. Packets take different routes, arrive out of order, and the server rebuilds the message.
Rebuilt at the server
Arrival order appears here.
Chapter 3 · Physical layer
Most long-distance traffic travels as light through fiber on the sea floor. Light in glass covers about 200 km every millisecond, so distance alone sets a limit on how quickly a far-away server can answer.
Latency is the time a signal needs to get somewhere. Network engineers usually measure the round trip, there and back, called the RTT. Bandwidth is how much data per second a link can carry. They are different things.
A faster plan from your provider adds bandwidth. It cannot shorten the distance to a server on another continent.
That is why large websites keep copies of their content in data centers all over the world. This is called a content delivery network, or CDN.
Pick where you are and where the server is. The pulse on the map moves at the right speed relative to the distance. Click any dot to make it the server.
Satellite figures are rough. A geostationary satellite sits 35,786 km up, so every trip climbs there and back down. Low-orbit satellites fly about 550 km up and can relay by laser through the vacuum of space.
A download takes two things: the wait for the first byte, which depends on distance, and the time to move the rest, which depends on bandwidth.
Chapter 4 · Application layer
Every device on the internet has an IP address, such as 203.0.113.10. People remember names instead, so the Domain Name System, DNS, translates one into the other.
An IPv4 address is four numbers from 0 to 255, which allows about 4.3 billion addresses. That was not enough, so the newer IPv6 uses much longer addresses like 2001:db8::1.
No single computer knows every name. DNS is a hierarchy. Root servers know who runs each ending, such as .com or .org. Those servers know who runs each domain, and each domain’s own name server knows its addresses.
A resolver, usually run by your internet provider, walks that chain for you and remembers the answers for a while. The next lookup of the same name is almost instant.
Look up a name and watch the resolver work its way down the hierarchy. Then look it up again and see the cache answer.
Cached answers
| Where | Name | Type | Answer | Expires in |
|---|
Chapter 5 · Internet layer
No router knows the whole route to a destination. Each one reads the destination address, picks the best next hop from its routing table, and passes the packet on.
Networks tell their neighbours which addresses they can reach, so every router builds a picture of which direction leads where. When a link fails, the news spreads and traffic shifts to another path within seconds or minutes.
The internet has many paths between any two places. Cutting one cable rarely cuts anyone off, but it can send their traffic a long way round.
Each packet carries a counter called TTL, for time to live. Every router lowers it by one and throws the packet away at zero, so a packet can never loop forever. The traceroute tool uses this to reveal every router on a path.
Pick two cities. Click a cable once to fill it with traffic, twice to cut it, and again to repair it. The best route updates as you go.
Cables · click to change
Traceroute
| Hop | Router | Three probes, round trip |
|---|---|---|
| Run traceroute to reveal each router on the path. | ||
Chapter 6 · Transport layer
IP delivers packets on a best-effort basis, with no promises. Two protocols sit on top of it and make different ones. TCP delivers every byte, in order. UDP sends packets and hopes for the best.
TCP opens with a three-way handshake so both sides agree on starting numbers. After that, the receiver acknowledges what it gets. If an acknowledgement doesn’t come back, the sender tries again.
TCP also watches for congestion. It starts slowly, sends more while packets get through, and backs off sharply when they get lost.
UDP skips all of that. Video calls and online games often use it, because a packet that arrives late is useless. It is better to skip it and keep going.
Both protocols use port numbers to hand data to the right program: 443 for secure web traffic, 53 for DNS.
Every TCP connection opens with these three messages. Data can only flow once they finish, so each new connection costs one round trip.
Both lanes send the same picture, cut into 192 packets, over the same unreliable link. Raise the loss and race again.
Both lanes will send this picture. Press Start to race.
Chapter 7 · All layers
Networking is split into layers. Each layer does one job and wraps the data from the layer above in its own header, like a letter in an envelope, inside a mailbag, inside a truck.
Routers only open the outer envelopes. They read the IP header to choose the next hop, then wrap the packet in a fresh frame for the next leg of the trip.
Step through a request as it leaves your laptop, passes a router and arrives at the server.
Your laptop
A router
router 3c:22:fb:9a:10:04from laptop a4:83:e7:2b:5c:11192.0.2.25to 203.0.113.10TTL 6452814 → 443seq 1001GET /index.html HTTP/1.1 Host: www.example.com
0x9A3F21C4The server
Chapter 8 · Application layer
Once a connection is open, your browser and the server talk in HTTP. The browser sends a request. The server sends back a response that starts with a three-digit status code.
A request names a method, such as GET to fetch something or POST to send data, a path, and headers with extra details. In the status code, 2xx means success, 3xx means look elsewhere, 4xx means the request was wrong, and 5xx means the server failed.
One page usually needs dozens of requests: the HTML first, then stylesheets, scripts, images and fonts.
HTTP has no memory between requests. Cookies fill the gap. The server hands the browser a token, the browser sends it back with every request, and that is how a site keeps you logged in.
Build a request for the pretend server at www.example.com and send it. Try to collect every status code.
What your browser sends
What the server sends back
Status codes collected
| # | Method | Path | Status | Type | Size | Time |
|---|
Chapter 9 · Security (TLS)
Your packets pass through machines you don’t control: the café’s Wi-Fi, your provider, routers on other continents. HTTPS encrypts the conversation so only your browser and the real server can read it.
Without HTTPS, anyone on the same network can read passwords and messages as they pass. With HTTPS, they can still see which site you are visiting and how much data moves, but the contents look like random noise.
The hard part is agreeing on a secret key with a server you have never met, over a network where anyone could be listening. A key exchange solves this. The paint-mixing lab below shows the idea.
Encryption is not enough on its own. You also need to know you are talking to the real site. The server proves who it is with a certificate, signed by an authority your device already trusts.
You log in to a shop over public Wi-Fi. Eve is on the same network, recording everything. Compare what she sees with HTTPS off and on. Use a made-up password.
What Eve captured
Alice and Bob need a shared secret, but every message they send is visible to Eve. Paint shows the trick: mixing is easy, unmixing is practically impossible.
Her secret color
Common color
His secret color
Real key exchanges use huge numbers instead of paint. Combining them is quick for a computer, and undoing it would take longer than the age of the universe.
Your browser checks each signature in the chain until it reaches an authority built into your device. Let an attacker step in and check again.
Chapter 10 · All layers
Loading a web page combines everything above: a DNS lookup, a handshake, setting up encryption, requests and downloads. For most pages, the waiting is mostly round trips rather than raw download speed.
Every round trip costs the full RTT. Before the first byte of a page arrives from a server 250 ms away, you pay that price for the TCP handshake, for setting up encryption, and for the request itself.
Newer protocols cut round trips. TLS 1.3 needs one round trip to set up encryption instead of two. HTTP/3 does the connection and the encryption setup together.
HTTP/2 and HTTP/3 also send many files over one connection at once. With HTTP/1.1, browsers open about six connections to a site and queue the rest of the files behind them.
Change the distance, the connection speed and the protocol, and watch where the time goes.
Chapter 11 · All layers
Everything so far, applied to apps you use every day. Pick an app, where each end is and how it connects. The lab lists every device and cable on the way, draws the route on a map, and shows what the app does at each end.
Every app follows the same basic trip. Your device turns what you did into packets. A short radio or cable hop reaches your router or a cell tower. From there it is fiber: to your provider, across the city, and, if the other end is far away, along cables on the sea floor.
What changes from app to app is the far end. A WhatsApp message stops at WhatsApp’s servers, then goes on to your friend’s phone. A popular YouTube video usually comes from a cache inside your own provider. A website may live on another continent unless a CDN keeps a copy nearby. Google Drive stores your file in Google’s data centers, then hands it to whoever you share it with.
Choose an app and the two ends, then press Play to follow the data hop by hop. Every row in the list is a real kind of device or cable.
Clock
What the data travels through, by distance
Every device and cable on the way
Chapter 12 · Physical layer
When your data crosses an ocean, it almost certainly travels through glass fiber lying on the sea floor. Satellites carry only a tiny share of the traffic between continents. Here is what the path is made of.
Why cables win. One modern cable carries far more than any satellite: MAREA, between the United States and Spain, carries about 224 terabits per second. Light in a cable also has a much shorter trip than a signal bounced off a satellite 35,786 km up.
Where satellites help. Ships, aircraft, remote villages, disaster zones, and places a cable break has cut off. Low-orbit satellites about 550 km up have made satellite internet much quicker: measured round trips are around 50 ms, against roughly half a second or more for a geostationary satellite.
Radio is only the first hop. Even on Wi-Fi or mobile data, radio carries your data for a few metres to a few kilometres. Everything after your router or the cell tower is cable, and almost all of it is fiber.
In deep water the cable is about as thick as a garden hose. The glass fibers that carry the light are as thin as a hair.
Every 50 to 100 km or so, an amplifier (repeater) on the sea floor boosts the light. Power for the amplifiers travels along the copper layer from equipment on each shore.
Rough, typical figures. The speed of a signal and the amount of data a link can carry are different things.
| Medium | Where you meet it | Distance per hop | Delay it adds | How much it carries |
|---|---|---|---|---|
| Wi-Fi radio | Home, office, café | Tens of metres | A few ms, from sharing the airwaves | Up to around a gigabit per second |
| 4G / 5G radio | Phone to cell tower | Up to a few km in cities | Tens of ms on 4G, less on 5G | Tens to hundreds of Mbit/s |
| Copper cable | Inside buildings, older phone lines | 100 m for Ethernet, a few km for DSL | Tiny | Up to 10 Gbit/s on short runs |
| Fiber on land | Fiber to the home, cities, countries | Thousands of km, with amplifiers | 5 µs per km | Terabits per second per fiber |
| Undersea fiber | Between continents | Thousands of km, with amplifiers | 5 µs per km | Hundreds of Tbit/s per cable |
| Low-orbit satellite | Rural areas, ships, aircraft | About 550 km up and back down | Round trips around 50 ms | A small fraction of one cable |
| Geostationary satellite | Remote areas, satellite TV | 35,786 km up and back down | At least 480 ms round trip from distance alone | A small fraction of one cable |
The devices you saw in the chapter 11 lab, and what each one does.
Chapter 13 · Review
Thirteen questions. Each answer comes with a short explanation.
Reference
No terms match that filter.