Skip to content
AdminKit
Free tool Updated

MTU / MSS calculator: tunnel overhead, MSS clamp and ping size

How does this check work, and what does the result tell you?

AdminKit's MTU / MSS calculator takes a link MTU and the encapsulations you stack on it (PPPoE, 802.1Q, GRE, 6in4, VXLAN, WireGuard) and returns the inner MTU, the TCP MSS to clamp and the largest don't-fragment ping payload, using header sizes from the RFCs and WireGuard's documentation. It calculates in your browser; it does not measure your path.

Part of the IP & network cluster — more tools, guides and terms on ip & network.

Encapsulations, outermost first

None: a plain link.

    Inner MTU
    1500 bytes (0 bytes of encapsulation)
    TCP MSS to clamp
    1460 bytes
    Largest DF ping payload
    1472 bytes
    Inner IPv4 + TCP headers
    20 + 20 bytes

    Test it with a don't-fragment ping (replace <host>)

    # Linux (iputils)
    ping -M do -s 1472 <host>
    # Windows
    ping -f -l 1472 <host>

    Calculated in your browser from the header sizes above; nothing is sent anywhere and this does not measure your actual path.

    What the result means

    The inner MTU is the largest IP packet that fits inside every header you added; the MSS and the ping payload are that figure minus the fixed IP header and the TCP or ICMP header. These are calculated values: nothing is sent anywhere, and this does not measure your path.

    Next step

    Confirm the number with the don't-fragment ping above, read how Path MTU Discovery finds the real limit, or size the tunnel's address block with the subnet calculator.

    Keep this result

    Copy a link to this check so you can share it or run it again later. Want a heads-up when this result changes? Talk to our team and we'll set it up for you.

    How it works and limits

    Enter the IP MTU of the physical link (1500 on standard Ethernet), pick the IP version of the traffic you care about, then add each encapsulation from the outermost one inwards: PPPoE first if your WAN uses it, then a tunnel such as GRE or WireGuard on top. The calculator subtracts each header and shows the inner MTU, the TCP MSS a router should clamp to, the largest ping payload that fits with the don’t-fragment flag, and a table of every header’s bytes with the document it comes from. Nothing is sent anywhere: this is arithmetic in your browser, and it does not measure your path. The real path can be smaller than the result if something along it adds headers you did not list; Path MTU Discovery is how hosts find that out on the wire.

    How is the MSS worked out from the MTU?

    The maximum segment size is the TCP payload that fits in one packet of the inner MTU. RFC 6691 says the MSS should be reduced only by the fixed IP and TCP headers, not by options: 20 bytes of IPv4 header or 40 bytes of IPv6 header, plus 20 bytes of TCP header. So the MSS is the inner MTU minus 40 for IPv4 and minus 60 for IPv6; RFC 8200 section 8.3 gives the same 60-byte figure for TCP over IPv6. On a plain 1500-byte link that is 1460 for IPv4 and 1440 for IPv6.

    The ping payload is smaller by a different amount, because an ICMP echo header is 8 bytes rather than TCP’s 20: 1500 - 20 - 8 = 1472 for IPv4 and 1500 - 40 - 8 = 1452 for IPv6.

    What overhead does each encapsulation add?

    EncapsulationBytes taken from the MTUWhere the number comes from
    PPPoE8 (6 PPPoE header + 2 PPP Protocol ID)RFC 2516 section 7
    802.1Q VLAN tag0 if the frame may grow to carry it, 4 if the frame is capped4-byte tag, MikroTik MTU documentation (below)
    GREouter IP (20 or 40) + 4, +4 with checksum, +4 with keyRFC 2784, RFC 2890
    6in420 (outer IPv4 header)RFC 4213 section 3.2
    VXLANouter IP (20 or 40) + 8 UDP + 8 VXLAN + 14 inner EthernetRFC 7348 section 5
    WireGuardouter IP (20 or 40) + 8 UDP + 16 header fields + 16 tagWireGuard whitepaper section 5.4.6

    RFC 2516 spells out the PPPoE arithmetic itself: a 1500-byte Ethernet payload, a 6-byte PPPoE header and a 2-byte PPP Protocol ID mean the PPP MTU must not exceed 1492. RFC 2784 defines a 4-byte GRE header whose checksum and reserved fields add 4 more when the checksum bit is set, and RFC 2890 adds the optional key and sequence number fields; the calculator offers the checksum and the key. Cisco’s guide to fragmentation, MTU and MSS with GRE and IPsec works through the same GRE case and arrives at a tunnel MTU of 1476 (1500 - 24).

    For 6in4, RFC 4213 notes the 20 extra bytes of the encapsulating IPv4 header, and section 3.2.1 says a statically configured tunnel MTU should default to 1280 (it allows 1280 to 1480). The calculator shows the 1480 ceiling a 1500-byte link permits and warns that your tunnel may be set lower. VXLAN carries a whole Ethernet frame, so RFC 7348 counts the inner 14-byte Ethernet header as overhead too: 1500 - 20 - 8 - 8 - 14 = 1450 over an IPv4 underlay.

    WireGuard’s protocol page lays out the transport data message: a 1-byte type, 3 reserved bytes, a 4-byte receiver index and an 8-byte counter, then the encrypted packet, whose length is the plaintext plus 16 bytes of authentication tag. The WireGuard whitepaper adds that the zero padding before encryption never pushes the UDP packet past the MTU, so a full-size packet pays 32 bytes, the UDP header and the outer IP header: 1440 over IPv4 and 1420 over IPv6 on a 1500-byte link.

    Does an 802.1Q VLAN tag lower the MTU?

    Not by itself. A VLAN tag is 4 bytes inserted into the Ethernet header, so a tagged frame that carries a full 1500-byte IP packet is 1522 bytes instead of 1518 (counting the frame check sequence). MikroTik’s MTU in RouterOS documentation describes exactly this: each VLAN tag is 4 bytes long, and adding one increases the layer-2 MTU by 4 bytes rather than shrinking the IP packet. If a device in your path caps every frame at 1518 bytes, tagged or not, the tag has to come out of the IP packet instead, and the IP MTU drops to 1496. Tick the option on the VLAN layer only when you know that is the case.

    How do I check the result with a ping?

    The calculator prints the commands with the payload it computed. For a plain 1500-byte IPv4 link they look like this, with your target in place of the placeholder:

    # Linux (iputils)
    ping -M do -s 1472 <host>
    # Windows
    ping -f -l 1472 <host>

    On Linux, the ping(8) manual describes -M do as setting the don’t-fragment flag and -s as the number of data bytes, which ping turns into a larger ICMP packet by adding the 8-byte ICMP header. On Windows, Microsoft’s ping reference documents -f as the don’t-fragment flag (IPv4 only) and -l as the data size. If the ping succeeds at the computed size and fails one byte above it, the path matches the calculation. If it fails at the computed size, something on the path has a smaller MTU than the stack you entered.

    Where should the MSS be clamped?

    On the router where the MTU shrinks, usually the PPPoE or tunnel interface, so that TCP endpoints on either side never offer a segment that would not fit. Cisco’s guide above shows the ip tcp adjust-mss interface command rewriting the MSS option in TCP SYN packets for this purpose. On Linux, the TCPMSS target in iptables-extensions(8) can either set a fixed value or clamp to the path MTU minus 40 for IPv4 and 60 for IPv6:

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

    The second line uses the PPPoE result (1492 - 40 = 1452). Clamping only helps TCP; UDP traffic such as QUIC or DNS still depends on Path MTU Discovery or on its own probing.

    Limits

    • It covers the encapsulations listed above with their fixed headers. IP options, IPv6 extension headers, TCP options and an MPLS or second VLAN tag are not added.
    • IPsec ESP is left out because its overhead depends on the cipher, the mode and the packet size; see the FAQ.
    • An IPv4 MTU under 68 bytes (RFC 791) or an IPv6 MTU under 1280 bytes (RFC 8200 section 5) is still calculated but flagged as below the protocol minimum.
    • To size the address block on the other side of the tunnel, use the subnet calculator.

    AdminKit lists this calculator in its IP & network cluster with the other address and routing tools.

    Frequently asked questions

    Why is the MSS 1460 on a normal 1500-byte Ethernet link?

    The MSS counts only TCP payload. RFC 6691 says to subtract just the fixed headers: 20 bytes of IPv4 header and 20 bytes of TCP header, so 1500 - 40 = 1460. Over IPv6 the fixed header is 40 bytes, so the MSS is 1500 - 60 = 1440.

    Why does PPPoE give an MTU of 1492?

    RFC 2516 section 7 states it directly: Ethernet carries at most 1500 bytes of payload, the PPPoE header takes 6 bytes and the PPP Protocol ID 2 more, so the PPP MTU must not be greater than 1492. The matching IPv4 MSS is 1492 - 40 = 1452.

    What MTU should a WireGuard interface use?

    Each WireGuard data packet adds 32 bytes (16 bytes of header fields and a 16-byte authentication tag) plus an 8-byte UDP header and the outer IP header. On a 1500-byte link that is 1440 over IPv4 and 1420 over IPv6; 1420 is the value shown for wg0 in the WireGuard whitepaper, and it fits either outer IP version.

    Does an 802.1Q VLAN tag reduce the MTU?

    Usually not. The 4-byte tag sits in the Ethernet header, so a tagged frame carrying a 1500-byte IP packet is 4 bytes longer than an untagged one, and switches that accept the longer frame keep the IP MTU at 1500. Only a device that caps tagged frames at the untagged maximum loses 4 bytes of IP MTU; the calculator lets you pick which case applies.

    Does this tool test my real connection?

    No. It adds up header sizes from the specifications and sends nothing anywhere. A middlebox, an ISP tunnel you cannot see or a different MTU on a remote link can make the real path smaller; run the don't-fragment ping it prints to see what your path actually carries.

    Why is IPsec ESP not one of the options?

    ESP has no single fixed overhead. Its IV length and the trailer padding depend on the cipher and on the packet size, and tunnel mode, transport mode and NAT traversal add different headers, so any one number would be wrong for most setups. Use your VPN vendor's figure for the exact cipher and mode you run.