The Internet
Every git push you have made this year crossed the planet in packets, addressed to a name resolved by DNS, routed by machines that know nothing about each other. This is the reference for how that works — and the TCP/UDP trade the exam asks about every single year.
Packets, not streams
Nothing crosses the internet whole. Data is chopped into packets — typically up to about 1,500 bytes each — and every packet carries a header: source address, destination address, sequence number, checksum. Packets from the same file may take different physical routes; the receiver reassembles by sequence number, and a lost packet is resent individually, not the whole file.
laptop → campus router → ISP → (several unknown hops) → github.com
packet 1 ──────────────────────→ arrives
packet 2 ──→ lost → resent, new route → arrives
packet 3 ───────────────────────────────→ arrives
receiver reassembles 1, 2, 3 by sequence number
The design's superpower is that no single route is sacred — "the internet routes around damage" because every router makes only local decisions about the next hop. There is no map, no master, and no single point of failure. That decentralization is also the exam's favorite property of the internet's design.
TCP vs UDP — the reliability trade
| TCP | UDP | |
|---|---|---|
| Promise | All packets arrive, in order, or the transfer fails | Best effort; loss and disorder tolerated |
| Mechanism | Handshake, acknowledgments, retransmission, sequencing | Fire and forget |
| Cost | Latency — waiting for receipts | No receipts, no order, no retry |
| Your life | git push, web pages, downloads, email | Game packets, voice, video calls |
The one-sentence exam answer: games prefer UDP because a late packet is worthless (the state has moved on) while downloads prefer TCP because losing one byte of the file corrupts it. Your own games run locally for now, but the card jam's hypothetical leaderboard (9.8) is exactly the moment these choices become real.
DNS — names to numbers
Machines route by IP address (like 140.82.112.3); humans type github.com. DNS is the lookup system that converts — and its hierarchy is worth being able to sketch:
- Your machine checks its own cache — hit? done in microseconds
- It asks the configured resolver (campus, home router, or public DNS) — which also caches
- The resolver walks the hierarchy if needed: root servers (know the TLDs) → .com servers (know who runs the domain) → github.com's servers (know the actual records)
- Every level caches its answer for a time-to-live, which is why the SECOND lookup is always faster than the first
Caching exists at every level because lookup latency is real — and cache invalidation is why "turn it off and on again" is actual engineering: you are flushing the machine's memory of a lie.
Routing and latency
traceroute github.com shows every hop and its
round-trip time. Big jumps usually mark ISP boundaries or ocean
crossings. Two facts to carry: latency is physics
(nothing beats the speed of light across an ocean), and
bandwidth is not latency — a fat pipe still
takes the same 80 ms to start answering. A laggy game and a
slow download are different diseases.
What the internet is, one paragraph (memorize the shape)
The internet is a network of networks, connected by routers, using shared standards (the TCP/IP family) so that any machine can talk to any other without central coordination. The web is NOT the internet — the web (HTTP pages) is one service that rides on it, like email, game traffic, and git itself. Encryption (the next page) is also a rider: TLS wraps the packets, it does not change the routing.
The exam-question shapes
- "Which protocol for X?" — TCP for anything that must arrive complete; UDP for anything that must arrive NOW
- "Why can the internet keep working when a router fails?" — packets reroute; no single path; local decisions
- "What does DNS do?" — converts human-readable names to IP addresses; hierarchy + caching
- "Why do packets include sequencing information?" — so the receiver can reassemble regardless of arrival order
- "Latency vs bandwidth" — read carefully; they are never the same answer
Where you meet networks this year
- 9.8 — The Internet — the lesson (ping, traceroute, cache flush)
- 9.9 — Encryption — what happens on top of these packets
- Encryption reference — TLS rides on this