google.com, hit Enter, and a page appears in 200 milliseconds.
In between, your request crossed cities, maybe oceans. Today we trace that journey, step by step.
"The cloud", "wireless", "the web" — the words make it sound like magic floating around us. It isn't. The internet is physical: millions of kilometres of cable, including fibre-optic lines lying on the ocean floor between continents.
Wi-Fi is only the last few metres — from your phone to a router that's plugged into a wire. After that, it's cables all the way down.
"Internet" literally means inter-network — your home network, joined to your ISP's network, joined to thousands of others, all agreeing to pass each other's traffic.
# IPv4 — four numbers, each 0–255
142.250.183.206 # a google server
192.168.0.5 # probably your laptop at home
# We ran out of IPv4, so IPv6 exists too:
2404:6800:4007:80e::200e # much bigger pool
# Find yours:
$ ipconfig # Windows
$ ifconfig # Mac / Linux
You'll almost never type an IP address. Why? Because of the next slide…
Humans remember google.com. Computers need 142.250.183.206. DNS is the lookup that turns the name into the number.
$ nslookup google.com
Name: google.com
Address: 142.250.183.206 # ← the phonebook just answered
A big file isn't sent in one piece. It's chopped into thousands of small packets, each stamped with where it's going, where it's from, and its order number.
# Every packet carries a little header:
to: 142.250.183.206
from: 49.36.220.11
seq: 3 of 1500
data: "...a slice of the image..."
Packets can arrive out of order. The seq number lets the other end put them back together correctly.
No single wire goes from you to Google. Your packets hop router to router, each one reading the "to" address and passing it one step closer. You can watch it happen:
1 192.168.0.1 # your home router 1 ms
2 100.71.4.1 # your ISP, nearby town 8 ms
3 72.14.215.85 # into the backbone 21 ms
4 108.170.250.97 # google's network 24 ms
5 142.250.183.206 # arrived! 25 ms
# Each line is one "hop". 5 hops, ~25 ms, across the country.
Each layer trusts the one below it to do its job, so no single part has to understand everything.
Once connected, your browser and the server talk in plain text: a request goes out, a response comes back.
GET /search?q=cats HTTP/1.1
Host: google.com
User-Agent: Firefox
# "Please send me this page."
HTTP/1.1 200 OK
Content-Type: text/html
<html>...the page...</html>
# 200 = success. 404 = not found.
google.com into an IP address.GET / — "send me the page."200 OK with the HTML, in packets.
In a terminal run tracert google.com (Windows) or traceroute google.com (Mac/Linux). Count the hops. Which is slowest?
Run nslookup youtube.com. Run it twice — do you get different IPs? (Big sites have many servers.)
import socket; socket.gethostbyname("github.com"). You just did a DNS lookup in code — the same step your browser does first.