How MTU, MSS and tunnel overhead fit together
The path MTU is the largest IP packet the path can carry without IP fragmentation. A tunnel adds outer headers, so the inner packet must be smaller: effective inner MTU = path MTU − encapsulation overhead. TCP MSS describes only TCP application data, so it also subtracts the inner IP and TCP headers.
For ordinary headers, IPv4 TCP MSS is inner MTU minus 40 bytes, while IPv6 TCP MSS is inner MTU minus 60 bytes. TCP options, IPv4 options and extension headers require more room.
Worked examples
WireGuard over PPPoE
A home router on PPPoE starts with 1,500 − 8 = 1,492 bytes. WireGuard over IPv4 adds 60 bytes: a 20-byte outer IPv4 header, an 8-byte UDP header, a 16-byte WireGuard data header and a 16-byte Poly1305 authentication tag. That leaves 1,492 − 60 = 1,432 bytes for the tunnel interface, so the TCP MSS is 1,432 − 40 = 1,392. If the peer might be reached over IPv6, plan for 80 bytes instead and use 1,412.
IPsec site-to-site behind NAT
When either gateway sits behind NAT, IPsec wraps ESP in UDP port 4500, which adds 8 bytes. With the 56-byte ESP allowance this gives 1,500 − 64 = 1,436 bytes inside the tunnel and an MSS of 1,396. Cipher, padding and integrity tag all change the real figure, which is why many engineers simply use an interface MTU of 1,400 and an MSS of 1,360 for IPsec. AWS Site-to-Site VPN, for example, supports an MTU of 1,446 and an MSS of 1,406.
VXLAN on a jumbo-frame underlay
VXLAN carries the whole inner Ethernet frame, so it costs 50 bytes over IPv4: 14 for the inner Ethernet header, 8 for VXLAN, 8 for UDP and 20 for the outer IP header. On a 9,000-byte underlay the virtual machines can use 8,950 bytes. To give them a normal 1,500-byte MTU, the underlay needs at least 1,550 bytes, which is why many fabrics are built with 1,600 or more.
Fragmenting a 4,000-byte IPv4 packet
On a 1,500-byte link with DF clear, the 4,000-byte packet carries 3,980 bytes of data after its 20-byte header. Each fragment can carry at most 1,480 bytes, a multiple of 8. The result is three fragments with 1,480, 1,480 and 1,020 data bytes, at offsets 0, 185 and 370 in 8-byte units. Their total sizes are 1,500, 1,500 and 1,040 bytes, and only the last has the More Fragments flag cleared.
Common tunnel MTU and MSS values
All rows assume a 1,500-byte path, an IPv4 outer header and IPv4 inside the tunnel. For IPv6 inside the tunnel, subtract another 20 bytes from the MSS.
| Link or tunnel | Overhead | Inner MTU | TCP MSS |
|---|---|---|---|
| Plain Ethernet | 0 B | 1,500 | 1,460 |
| PPPoE | 8 B | 1,492 | 1,452 |
| IP-in-IP | 20 B | 1,480 | 1,440 |
| GRE | 24 B | 1,476 | 1,436 |
| VXLAN or GENEVE without options | 50 B | 1,450 | 1,410 |
| IPsec ESP tunnel mode (estimate) | 56 B | 1,444 | 1,404 |
| WireGuard over IPv4 | 60 B | 1,440 | 1,400 |
| IPsec with NAT traversal (estimate) | 64 B | 1,436 | 1,396 |
| WireGuard over PPPoE | 68 B | 1,432 | 1,392 |
| WireGuard over IPv6 (default 1,420) | 80 B | 1,420 | 1,380 |
| GRE over IPsec (estimate) | 80 B | 1,420 | 1,380 |
What MSS clamping does
When a TCP connection opens, each side announces the largest segment it wants to receive in the MSS option of its SYN. A router with MSS clamping rewrites that option in SYN packets passing through it, lowering it to a value that fits the tunnel. Both ends then send smaller segments, and full-sized packets never reach the tunnel.
Clamping is the usual fix when Path MTU Discovery breaks, because it doesn’t depend on ICMP messages getting back to the sender. Set the clamp to the inner MTU minus 40 bytes for IPv4 or minus 60 bytes for IPv6. Linux can also clamp to the route MTU automatically with --clamp-mss-to-pmtu or maxseg size set rt mtu. Clamping only helps TCP. UDP traffic, such as QUIC, DNS and VPNs that run over UDP, still needs a correct interface MTU or its own size discovery.
The calculator’s Configuration targets menu gives the matching commands for Cisco IOS, Linux iptables and nftables, WireGuard, MikroTik RouterOS and Windows.
Troubleshooting an MTU problem
MTU problems have a recognisable pattern. Ping and small requests work, but larger transfers hang. SSH logs in but stalls on a big command output, file copies freeze at the start, some websites load only partly, and TLS handshakes time out because certificates fill full-sized packets.
- Ping the far side with fragmentation disabled, starting at the payload size the calculator gives. Increase it until it fails. For IPv4, the largest working payload plus 28 is the path MTU; for IPv6, add 48.
- On Linux,
tracepathreports the path MTU hop by hop without special options. - Check that firewalls allow ICMP “fragmentation needed” (IPv4 type 3, code 4) and ICMPv6 “Packet Too Big” (type 2). Blocking them causes PMTUD black holes.
- Lower the tunnel interface MTU, clamp TCP MSS, or both. If you control the hosts, Linux can probe for a working size itself with
net.ipv4.tcp_mtu_probing.
Where this calculator is useful
VPN traffic stalls on large transfers
Small pings may work while HTTPS or file transfers stall because a VPN adds headers and ICMP Packet Too Big messages are blocked. Model the VPN overhead, set the tunnel interface MTU, and clamp TCP MSS where PMTUD cannot operate reliably.
Overlay networks inside cloud or data centres
VXLAN and GENEVE wrap an inner Ethernet frame in UDP and IP. Either the underlay needs a larger MTU or virtual machines need a smaller inner MTU. Stacking IPsec with an overlay consumes still more headroom.
PPPoE broadband and nested tunnels
PPPoE commonly reduces a 1500-byte link to 1492 bytes before any VPN overhead. Selecting both layers shows why a default 1500-byte inner packet no longer fits.
Fragmentation behavior
IPv4 routers may fragment a packet when DF is clear. Every fragment gets its own IPv4 header, and all non-final payloads must be a multiple of eight bytes because the fragment offset uses eight-byte units. With DF set, an oversized packet is dropped and the router should return an ICMP fragmentation-needed message.
IPv6 routers never fragment forwarded packets. They return ICMPv6 Packet Too Big; the source reduces its packet size or creates fragments itself. Blocking these messages can produce a PMTUD black hole.
Overhead values are planning estimates
Actual IPsec, GENEVE and other tunnel overhead depends on address family, encryption mode, authentication tag, padding, options and implementation. The calculator reports VLAN tags separately as Layer-2 frame overhead; it does not incorrectly subtract them from the IP MTU. Use the custom field and verify the final design with vendor documentation and packet captures.