Tools

MTU and MSS calculator

Start with the real link MTU, stack the tunnels your traffic crosses, and get the inner MTU, the TCP MSS, a don't-fragment ping to prove it and the rules to clamp it.

Your link

Tunnels, outermost first

For the commands

Total overhead
0
Inner MTU
0
TCP MSS, IPv4
0
TCP MSS, IPv6
0
How each layer reduces the MTU
LayerBytesMTU left

How to read the result

The inner MTU is the largest packet your applications can send through the whole stack without anything being fragmented or dropped. The TCP MSS is that figure minus the IP and TCP headers: 40 bytes for IPv4 and 60 for IPv6. If the MSS your hosts advertise is higher than this, large packets can vanish and you get the classic symptom of small requests working while big downloads and some websites hang.

Overheads for IPsec ESP are worst case. ESP pads each packet to a 4 byte boundary and ends with a 2 byte trailer, so the real overhead moves by up to 3 bytes with the packet size. We always count the full 5 bytes of padding and trailer, which is safe for every packet size but can sit a few bytes under the true limit. For AES-GCM with NAT-T on a 1500 byte link the table shows 1435, while the largest packet that actually fits is 1438. Use the don't-fragment ping to find the exact figure on your own link.

VLAN tags sit in the Ethernet header, not in the IP packet. An 802.1Q tag adds 4 bytes to each frame and QinQ (802.1ad) adds 8. Whether that shrinks your MTU depends on the path. If a device caps the frame size, the tags come out of the MTU. If every device on the path accepts the larger frame, the MTU is unchanged and only the frame on the wire grows. Pick which case applies under VLAN tags on the link.

For the full story, including why Path MTU Discovery breaks and how to find the real number on a live link, read MTU, MSS and tunnels.