← blog · November 14, 2026

The MTU Black Hole: Why Large Packets Vanish, Path MTU Discovery, MSS Clamping and Tunnel Settings

When connections open and small requests work but large responses hang, the cause is usually a smaller MTU on the path and a dropped ICMP message. Measuring the path MTU, setting tunnel MTU correctly, where MSS clamping fits, letting ICMP through, and the container, jumbo frame and load balancer pitfalls.

The connection opens, small requests get answers, and then everything stalls the moment a large response is on its way. You SSH into a server and the terminal freezes on a long directory listing. curl -v sits after the "Client hello" line of the TLS handshake. git push works for small changes and times out on a big commit. No error, no reset, the data simply never arrives. Most of these symptoms have a single cause: somewhere along the path the maximum packet size got smaller, and the ICMP message that is supposed to tell you so never reaches you.

Why it happens

Every network interface has an MTU, the largest IP packet it can carry in one piece. On Ethernet that is 1500 bytes. The smallest MTU along the path between two hosts is the Path MTU, and TCP has to size its segments to fit it.

The places where the limit shrinks are usually tunnels, because every tunnel wraps the packet in another header:

  • PPPoE costs 8 bytes, leaving 1492.
  • VXLAN costs 50 bytes (outer IPv4, UDP, the VXLAN header and the inner Ethernet frame), leaving 1450 on a 1500 network.
  • WireGuard costs 60 bytes over IPv4 and 80 over IPv6. That is why its default MTU is 1420: it is the safe value for both.
  • IPsec overhead depends on the cipher and mode, so any single number would mislead you.

Modern TCP stacks send packets with the Don't Fragment bit set. When such a packet reaches a router whose next link has a smaller MTU, the router drops it and sends back ICMP "Fragmentation Needed" (type 3, code 4 in IPv4) or ICMPv6 "Packet Too Big" (type 2). The sender learns the path MTU from that message and switches to smaller segments. This is Path MTU Discovery (PMTUD).

The black hole appears when a firewall on the path drops that ICMP message. "Block ICMP, it's safer" is still a very common rule. The sender never learns why its packets vanish, keeps retransmitting the same large packet, and the connection eventually times out. Small packets stay under the limit and get through, so the handshake completes and everything stops at the first full sized packet. That is exactly why the symptom is so confusing.

Diagnosis

Start by measuring the real path MTU. On Linux, use ping with fragmentation forbidden and grow the size:

ping -M do -s 1472 -c 3 target.example.com
ping -M do -s 1400 -c 3 target.example.com

-s is the payload size. IPv4 adds a 20 byte IP header and an 8 byte ICMP header, so 1472 is exactly a 1500 byte packet. A "Message too long" error points to your local interface; requests that silently go unanswered point to a limit further down the path. IPv6 headers are 40 bytes, so the 1500 equivalent is ping -6 -M do -s 1452. On macOS the same test is ping -D -s, on Windows ping -f -l.

tracepath target.example.com prints the MTU learned at each hop and often shows where the limit drops in a single command. The value the kernel has cached for a destination appears in the mtu field of ip route get <address>, and the value an open TCP connection is using shows up as pmtu and mss in ss -ti.

The last step is to check whether ICMP actually arrives. On the sending host:

tcpdump -ni any 'icmp[icmptype] == icmp-unreach and icmp[icmpcode] == 4'
tcpdump -ni any 'icmp6 and ip6[40] == 2'

If large packets are disappearing and these filters capture nothing, you have found the black hole.

Ways to fix it

There are three approaches and they do not do the same job.

1. Set the tunnel MTU correctly. This is the real fix. The interface that wraps the packet should advertise what is left after its own overhead. TCP then starts with the right segment size, no ICMP is needed at all, and UDP traffic gets sized correctly too. In WireGuard you set MTU = 1420 in the [Interface] section of the wg-quick config; if the underlying link is already smaller than 1500 (PPPoE, for example) you have to go lower still. Most Kubernetes network plugins derive the pod interface MTU from the node's primary interface, but don't assume the calculation came out right: run ip link inside a pod and check that the encapsulation overhead was actually subtracted.

2. MSS clamping. The device forwarding the traffic rewrites the MSS option in TCP SYN packets to fit the path MTU. With iptables:

iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN \
  -j TCPMSS --clamp-mss-to-pmtu

The nftables equivalent is:

tcp flags syn tcp option maxseg size set rt mtu

It is fast, effective and needs no cooperation from the other end. My position: treat it as a seatbelt, not as the fix. It only rescues TCP. QUIC, DNS and tunnel-in-tunnel traffic, all UDP, keep falling into the same hole.

3. Let ICMP through. Every rule that drops "Fragmentation Needed" and "Packet Too Big" should go. For IPv6 this is not even up for debate: routers never fragment IPv6 packets and the protocol only guarantees 1280 bytes, so without Packet Too Big every packet larger than the path MTU is lost. RFC 4890, which gives recommendations for ICMPv6 filtering, says plainly that this message must not be dropped. A stateful firewall already treats the relevant ICMP errors as related to the existing connection; the problem is usually a blunt "reject all ICMP" rule.

The right order: fix the MTU first, open ICMP, and add MSS clamping as an extra guard for the parts of the network you don't control.

The kernel has one more helper: net.ipv4.tcp_mtu_probing. 0 means off, 1 enables probing once a black hole is detected, 2 means always on. With 1, after large segments keep getting lost the stack tries smaller sizes without relying on ICMP (the packetization layer approach from RFC 4821). The connection slows down for a while but survives. Turning it on for servers that talk to networks you don't control is reasonable, but it does not replace fixing the source.

Pitfalls

Container networks don't know the host MTU. Docker's default bridge uses 1500. If the VM sits on a VXLAN and its main interface is 1450, large packets leaving containers vanish silently. The default bridge needs the "mtu" key in daemon.json; networks created by Compose need the com.docker.network.driver.mtu driver option. Setting one does not change the other.

Mixed MTU on the same layer 2 segment is not something PMTUD can fix. PMTUD depends on routers sending ICMP. If one host on a switch has jumbo frames (9000) and another does not, there is no router in between to send anything, and large frames are just dropped. If you enable jumbo frames on a storage network, bring every interface on that segment to the same value, switch ports included.

Large inside the cloud, small outside. Some cloud providers give you an MTU above 1500 inside the virtual network, while the path to the internet and to other regions is 1500. The host sees the large MTU, internal traffic is fine, and large packets heading outside depend entirely on ICMP.

Behind a load balancer, ICMP goes to the wrong server. With ECMP or anycast, the ICMP message can be routed to a different server than the one holding the connection, because the distribution decision hashes TCP ports and the outer header of the ICMP packet doesn't carry them. The backends never receive the PMTUD information. In these setups MSS clamping and tcp_mtu_probing become practically mandatory.

DNS and large UDP responses. DNSSEC signed responses easily exceed 1500 bytes and fragmented UDP is unreliable. Keeping the EDNS buffer size on resolvers around 1232 bytes makes large answers fall back to TCP and sidesteps the black hole entirely.

Nested tunnels. Connecting to one VPN through another, or running an encapsulated pod network over an encrypted tunnel, stacks the overheads. Each layer's MTU must be computed from the actual value of the layer beneath it, not from 1500.

When not to bother

Dropping everything to 1280 blindly "solves" the problem but costs efficiency on every packet, and on high volume internal traffic you will measure the difference. On a flat network with no tunnels or encapsulation, where the path MTU is 1500 end to end, there is no reason to touch any of this. If the symptom is not "large transfers hang, small ones work", look elsewhere. When you do suspect the MTU, don't guess: measure with ping -M do, confirm with tcpdump whether ICMP arrives, and fix it in the tunnel itself.