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
- RFC 1191 Path MTU discovery
- RFC 8201 Path MTU Discovery for IP version 6
- RFC 8900 IP Fragmentation Considered Fragile
- RFC 2923 TCP Problems with Path MTU Discovery
- RFC 4821 Packetization Layer Path MTU Discovery
- RFC 8899 Packetization Layer Path MTU Discovery for Datagram Transports
- [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
All 51 documents this chapter cites, each with a link to its publisher and a copy kept here.
