How the Internet works

Orientation, chapter 1 of 36

One Click, Twelve Milliseconds

Of the 45 ms between the click and the first byte of the page, the server needs 5 to produce it.

It is a weekday evening, and someone on a sofa types https://www.example.net/ into a browser that has never visited the site. The server is about 12 ms away, measured as a round trip. Before the first byte of the page comes back, the laptop resolves a name, opens a TCP connection, negotiates TLS 1.3, and sends an HTTP/2 request.

45 ms
from the click to the first byte of HTML: DNS, three 12 ms round trips, and 5 ms of server time
74 bytes
the reference SYN without its FCS, all headers, which a wired Ethernet hop turns into 98 byte times
1 in 1,100
packets that failed the TCP checksum after passing link CRCs, the high end of two years of traces, measured in 2000 [Stone2000]

Where the 45 ms go

The first exchanges after the click, timed with the scenario's resolver round trip, server round trip, and server time, above curl's timing of the real site on 12 November 2026. Drag the time, or give www.example.net an HTTPS record with h3 and watch a round trip disappear.

What happens between the click and the first byte?

The resolver at 198.51.100.53 answers from its cache in 4 ms, with NODATA for the HTTPS query, because www.example.net publishes none. An HTTPS record with h3 in its alpn list (RFC 9460, Section 7.1) would let the browser try QUIC. Without one, three steps each wait for a 12 ms round trip: the TCP handshake, TLS 1.3, and the HTTP/2 request.

The first byte of HTML arrives 36 ms after the SYN left, plus 5 ms of server time: about 45 ms after the click. The response offers alt-svc: h3=":443", and the next connection, over QUIC, is ready one round trip sooner (RFC 9000, Section 7).

How much of the frame is overhead?

All of it, in the case of the SYN. The dump's 74 bytes stop before the 4-byte frame check sequence, and a wired Ethernet hop adds a 7-byte preamble, a 1-byte start-of-frame delimiter, and a 12-byte idle gap. The SYN occupies 98 byte times and delivers nothing.

RFC 6349, Section 4.1.1 arrives at 1538 byte times for a full frame with 1500 bytes of IP. With timestamps, 1448 of them are payload, 94.1 percent. Every encrypted TLS 1.3 record with AES-GCM then adds at least 22 bytes of its own (RFC 9846, Section 5.2, and RFC 5116, Section 5.1).

Why are there layers at all?

The people who wrote the ARPANET host software did not control the network underneath. The IMPs could change, so the Network Working Group agreed that a protocol's control information should be treated strictly as data by the protocol below it. M. A. Padlipsky recalls in RFC 871 that violating layering was the charge heard most often at protocol design meetings, although nobody had a much clearer view of what layering meant than the one his RFC gives.

RFC 1122 wrote the model down in October 1989. It names four layers and numbers none, and a host typically must implement at least one protocol from each (RFC 1122, Section 1.1.3).

Why did the seven-layer model lose?

ISO/IEC 7498-1 numbers seven layers and derives a session and a presentation layer. RFC 1122 answers in one sentence: the Internet's application layer essentially combines the functions of the top two OSI layers (RFC 1122, Section 1.1.3). It never mentions a session layer, and TLS has no obvious OSI number at all.

The US Department of Commerce ruled in 1988 that from August 1990 US government agencies had to ask for OSI in the network products they bought. By the middle of the 1990s the Internet was the de facto standard, and Andrew Russell concludes that openness and modularity "ended up killing OSI" [Russell2013].

What is the end-to-end argument?

A rule for deciding where a function belongs. Saltzer, Reed, and Clark presented it in Paris in April 1981: a function can be implemented completely and correctly only with the knowledge and help of the application at the end points [Saltzer1984]. An incomplete version inside the network can sometimes be useful, but only as a performance enhancement.

The paper tells of a gateway at MIT that swapped a pair of bytes about once in every million bytes, on a network that relied on per-hop checksums. Our SYN carries the argument: the sender computes its TCP checksum, the receiver verifies it, and it covers both IP addresses (RFC 9293, Section 3.1).

Why does the stack look like an hourglass?

Below IP on our path are Wi-Fi, Ethernet, and the fiber access network. Above it are TCP and UDP, then TLS, HTTP/2, HTTP/3, and DNS. In the middle there is IP, in two versions. Steve Deering asked in a 1998 keynote why the waist exists, and answered that a single internet protocol maximizes interoperability [Deering1998]. He guessed that the shape "may evolve from an hourglass to a wineglass".

In 2011 Akhshabi and Dovrolis simulated new protocols competing at every layer, and an hourglass emerged even from other starting shapes [Akhshabi2011]. The most stable protocols near the waist were often not the ones of the highest quality.

laptophome routerNAT44AS64500access ISPIXPAS64510transitAS64505serverWi-FiFTTHbackupbackup
From the book: The networks between the laptop and the server

The book keeps asking

This chapter has 5,764 words and 10 questions. These 4 are answered only in the book and the audiobook.

  • Which networks does the packet cross?
  • What does the first packet look like?
  • Who says what these bytes mean?
  • Where does the layer model break?

Open the sources

  • RFC 1122 Requirements for Internet Hosts - Communication Layers 1989, Internet Standard, STD 3
  • RFC 1123 Requirements for Internet Hosts - Application and Support 1989, Internet Standard, STD 3
  • ISO/IEC 7498-1 Information technology - Open Systems Interconnection - Basic Reference Model: The Basic Model (second edition, 1994) 1994, free (ISO Publicly Available Standards, click-through license); the identical text of ITU-T X.200 (07/94) was read for this chapter
  • [Saltzer1984] End-to-End Arguments in System Design. ACM Transactions on Computer Systems 2(4), pp. 277-288 (revised from a 1981 conference paper) 1984, free
  • [Clark1988] The Design Philosophy of the DARPA Internet Protocols. Proceedings of ACM SIGCOMM '88, pp. 106-114 1988, free
  • RFC 1958 Architectural Principles of the Internet 1996, Informational
  • RFC 3439 Some Internet Architectural Guidelines and Philosophy 2002, Informational
  • RFC 3724 The Rise of the Middle and the Future of End-to-End: Reflections on the Evolution of the Internet Architecture 2004, Informational

All 47 documents this chapter cites, each with a link to its publisher and a copy kept here.

Orientation, chapter 2 of 36

From ARPANET to the Internet

Orientation, chapter 3 of 36

Rough Consensus and Running Code

The Link, chapter 4 of 36

Signals on Copper and Glass

The Link, chapter 5 of 36

Ethernet: Frames, Switches, and the 1500-Byte Legacy

The Link, chapter 6 of 36

Wi-Fi: Ethernet Without the Wire

The Link, chapter 7 of 36

The Last Mile: DSL, Cable, Fiber, and Mobile

The Internet Layer, chapter 8 of 36

IPv4: The Datagram

The Internet Layer, chapter 9 of 36

Finding the Neighbor: ARP, ICMP, and DHCP

The Internet Layer, chapter 10 of 36

IPv6: The Second Attempt

The Internet Layer, chapter 11 of 36

MTU, Fragmentation, and the Black Hole

The Internet Layer, chapter 12 of 36

NAT, CGNAT, and the Middlebox Internet

The Internet Layer, chapter 13 of 36

Living with Two Protocols

Routing, chapter 14 of 36

Inside One Network: Forwarding, OSPF, and IS-IS

Routing, chapter 15 of 36

BGP: The Protocol That Holds It Together

Routing, chapter 16 of 36

Peering, Transit, and the Money

Routing, chapter 17 of 36

Securing the Routing System

Routing, chapter 18 of 36

MPLS and Segment Routing

Routing, chapter 19 of 36

Anycast and CDNs

Transport, chapter 20 of 36

UDP: Eight Bytes of Header

Transport, chapter 21 of 36

TCP: The Connection

Transport, chapter 22 of 36

Congestion Control: From Collapse to BBR

Transport, chapter 23 of 36

Beyond TCP: SCTP, DCCP, and Multipath

Names and Trust, chapter 24 of 36

DNS: The Namespace and the Wire Format

Names and Trust, chapter 25 of 36

Resolvers, DNSSEC, and Encrypted DNS

Names and Trust, chapter 26 of 36

TLS 1.3: The Handshake

Names and Trust, chapter 27 of 36

Certificates and the Web PKI

Applications, chapter 28 of 36

HTTP: Semantics and HTTP/1.1

Applications, chapter 29 of 36

HTTP/2: Multiplexing over One Connection

Applications, chapter 30 of 36

QUIC: A Transport in Userspace

Applications, chapter 31 of 36

HTTP/3: The Web on QUIC

Applications, chapter 32 of 36

Mail: SMTP and Forty Years of Patches

Applications, chapter 33 of 36

Time, Shells, and Files: NTP, SSH, Telnet, and FTP

The Whole Path, chapter 34 of 36

Measuring and Debugging the Path

The Whole Path, chapter 35 of 36

The Whole Journey, Byte by Byte

The Whole Path, chapter 36 of 36

Ossification and What Comes Next

You have reached the server. The book goes further.

Everything on this site is a short version. Follow the Packet is the long one: 36 chapters and about 280,000 words, with every protocol fact traced to the section of the standard that defines it, every byte dump built by a script you can run, and a directory of more than a thousand cited documents. It comes as a printable book and as an audiobook.

Hear how chapter 1 opens. 70 seconds, narrated by a synthetic voice.

Get the book or the audiobook Read the start of chapter 1 Browse every source

Cover of Follow the Packet: How the Internet Works, Layer by Layer, from ARPANET to QUIC, by Wolfgang Kerschbaumer

The signup uses double opt-in. Every message includes an unsubscribe link.

Published by Sysinit Press. The public addresses, AS numbers and names of the scenario come from ranges reserved for documentation, and the home network uses private addresses, so the site describes no real network. RFC texts are copied unchanged from the RFC Editor.