How the Internet works

The Internet Layer, chapter 11 of 36

MTU, Fragmentation, and the Black Hole

Eight added octets of PPPoE and one dropped ICMP message make every full-size packet of a working connection vanish.

Change one thing on our path: the fiber line runs PPPoE, so the link between the home router and the BNG carries IP packets of at most 1492 octets. The 60-octet SYN crosses unharmed and the SYN-ACK comes back. The first packet of the ClientHello has 1500 octets, so the home router drops it and reports that with an ICMP error, and the laptop sends smaller segments. Then the server answers with a 1500-octet packet that has Don't Fragment set, and the BNG cannot forward it.

68 octets
the size every IPv4 hop must forward without fragmenting it
5 to 18 %
of 50,000 popular web servers failed path MTU discovery in 2010, depending on the MTU tested
1232 octets
the EDNS buffer of DNS Flag Day 2020: 1280 minus 40 of IPv6 and 8 of UDP

Will 1500 octets fit?

The server's packet crosses a path with one narrow link. Set the size and the DF bit, let the firewall drop ICMP, and then turn on MSS clamping.

Why does IPv4 guarantee only 68 octets?

The Internet of the early 1980s joined networks with very different packet limits. Kent and Mogul's list of 1987 runs from 254 octets for packet radio to 2000 for the Wideband Satellite Network [Kent1987]. RFC 791 makes two small promises across that range.

Every internet module must forward a datagram of 68 octets without further fragmentation, because a header can be 60 octets long and the smallest fragment carries 8 (RFC 791, Section 3.2). Every destination must accept 576 octets, whole or in fragments, which leaves room for 512 octets of data and 64 of headers (RFC 791, Section 3.1).

Why did fragmentation come to be considered harmful?

Christopher Kent and Jeffrey Mogul of DEC's Western Research Laboratory made the case in 1987. Fragmentation, their abstract says, "is at best a necessary evil" [Kent1987]. In the case that started the paper, a Proteon ring dropped the second fragment of every 1024-octet TCP segment, and every retransmission was cut and lost the same way, until the connection broke.

Every datagram in flight needs its own Identification value. In 2007, RFC 4963, Section 2 put the limit for a host sending 1500-octet packets with a 30-second lifetime at about 26 Mbit/s. Once the field wraps faster than the reassembly timer runs, fragments of different datagrams get spliced together.

How does a sender learn the path MTU?

Jeffrey Mogul and Steve Deering wrote RFC 1191 in November 1990 and credited the idea to Geof Cooper, "who in two short paragraphs set out all the basic ideas that took the Working Group months to reinvent." The host sets DF on every datagram. A router that cannot forward one returns ICMP Destination Unreachable with code 4 and reports the MTU of the next hop.

On our variant the BNG reports 05 D4, 1492, and the server resends in segments of 1440 octets. A host must never raise its estimate because of such a message, which may be stale or forged (RFC 1191, Section 3).

What happens when the ICMP message never arrives?

The server keeps sending 1500-octet packets and the BNG keeps discarding them. The small handshake packets got through, so the connection exists, and every full-size packet vanishes. In a trace in RFC 2923, Section 2.1, the first 1460 octets of data go out thirteen times in 8 minutes, and after 9 minutes the sender gives up with a reset. Pings to the host still work.

The problem was known before RFC 1191 was three years old. Vendors had given routers a switch to stop sending ICMP, and RFC 1435 asked them in March 1993 to send code 4 even with the switch on.

Why does the home router rewrite our SYN?

The CPE knows that its PPPoE link carries 1492 octets. It has no say over the server's estimate, so it changes what the server is told. MSS clamping rewrites the option in SYNs that cross the router: 02 04 05 B4 becomes 02 04 05 AC, an MSS of 1452, which is 1492 minus 40. The option fell by 8, so the TCP checksum rose by 8, from 35 EB to 35 F3.

RFC 4459, Section 3.2 calls the technique a "hack". It does nothing for UDP, and it works only where all traffic passes the clamping box, which a single-homed access line guarantees.

Why does DNS stop at 1232 octets?

EDNS(0) lets a requestor advertise a buffer larger than the classic 512 octets, and RFC 6891, Section 6.2.5 suggested 4096 as a starting point. A 4096-octet answer crosses a 1500-octet link as three fragments, and the second and third carry neither UDP ports nor the DNS message ID.

DNS Flag Day 2020 set the buffer to 1232 octets on 1 October 2020, a size that "will avoid fragmentation on nearly all current networks" [DNSFlagDay2020]. RFC 9715, Section 3.1 later chose 1400. The deployed number is still 1232.

The book keeps asking

This chapter has 5,844 words and 14 questions. These 8 are answered only in the book and the audiobook.

  • What did our SYN say about size?
  • How does the destination put the pieces back together?
  • Why do middleboxes hate fragments?
  • How do fragments become weapons?
  • What changes with IPv6?
  • Can a sender find the path MTU without ICMP?
  • How much does a tunnel cost?
  • Why does QUIC insist on 1200 octets?

Open the sources

  • RFC 791 Internet Protocol 1981, Internet Standard, STD 5
  • RFC 1191 Path MTU discovery 1990, Draft Standard
  • RFC 8201 Path MTU Discovery for IP version 6 2017, Internet Standard, STD 87
  • RFC 8900 IP Fragmentation Considered Fragile 2020, Best Current Practice, BCP 230
  • RFC 2923 TCP Problems with Path MTU Discovery 2000, Informational
  • RFC 4821 Packetization Layer Path MTU Discovery 2007, Proposed Standard
  • RFC 8899 Packetization Layer Path MTU Discovery for Datagram Transports 2020, Proposed Standard
  • [Kent1987] Fragmentation Considered Harmful. Proceedings of the ACM SIGCOMM '87 Workshop on Frontiers in Computer Communications Technology, pp. 390-401; revised as DEC WRL Research Report 87/3, December 1987 1987, free (WRL report via the bitsavers archive)

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

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.