Re:Fragmentation, MTU, MSS clamping and tunnels (2014)
by zamadatix on Friday September 11, 2020 @04:15PM
(#24446869)
Good article, gets to the point with good info. The "what's the biggest message I can send across a path" problem is one of those things that I hadn't thought of before running into it but ended up being really interesting/harder to solve than I initially thought it was (which I think are the "fun" surprises in learning new things).
MSS clamping is going away with protocols like QUIC and HTTP/3 encrypting L4 headers/options. PMTUD remains the proper way to handle things, or something like PLPMTUD if you're not willing to assume IP. Some things create path MTU black holes, commonly firewalls but also APs. APs can be particularly troublesome because nowadays they commonly don't terminate the wireless encryption, the controller at the other end of the tunnel does, which means they can't inject an ICMP to let the client know that packet is too big. MSS saves the day (for TCP) but otherwise the AP can either drop or fragment at the encap layer transparent to the client. I've yet to see a system that delivers the fragmented tunnel packet so the controller can ICMP back that the packet is too big but it'd be the cleanest thing in that scenario.
Also if you're going to limit tunnel size arbitrarily beforehand probably best to make sure the resulting packet ends up being able to fit into 1428. A lot of products use a 1300 "inside" MTU for this (and similar) reasons. 1400 + auto IPsec calc will lead to trouble in this scenario.
Don't drop "inside" MTU below 1280 in IPv6 networks. IPv4 is much more tolerant with the standard being 576 but many supporting less.
MSS clamping is going away with protocols like QUIC and HTTP/3 encrypting L4 headers/options. PMTUD remains the proper way to handle things, or something like PLPMTUD if you're not willing to assume IP. Some things create path MTU black holes, commonly firewalls but also APs. APs can be particularly troublesome because nowadays they commonly don't terminate the wireless encryption, the controller at the other end of the tunnel does, which means they can't inject an ICMP to let the client know that packet is too big. MSS saves the day (for TCP) but otherwise the AP can either drop or fragment at the encap layer transparent to the client. I've yet to see a system that delivers the fragmented tunnel packet so the controller can ICMP back that the packet is too big but it'd be the cleanest thing in that scenario.
Also if you're going to limit tunnel size arbitrarily beforehand probably best to make sure the resulting packet ends up being able to fit into 1428. A lot of products use a 1300 "inside" MTU for this (and similar) reasons. 1400 + auto IPsec calc will lead to trouble in this scenario.
Don't drop "inside" MTU below 1280 in IPv6 networks. IPv4 is much more tolerant with the standard being 576 but many supporting less.