LiveFor network engineers

MTU & MSS Calculator

Works out the effective MTU and the TCP MSS to clamp for IPsec, GRE, VXLAN, WireGuard, PPPoE and other encapsulations, with the commands for common devices.

Runs in your browser. Your data never leaves this device.
~/apps/mtu-mss-calculatorruns in your browser · nothing uploaded
1500 for Ethernet and most internet links; 9000 for jumbo frames
Presets
Access
 
Tunnels
Overlays
IPsec (tunnel mode)
VPNs
Overhead93 B
Effective MTU1407 B
TCP MSS (IPv4)1367 B
TCP MSS (IPv6)1347 B

Path: 1500 − PPPoE 8 − IPsec ESP AES-CBC + SHA-256 77 − NAT traversal (UDP 4500) 8 = 1407. Azure recommends clamping TCP MSS to 1350 on VPN gateway traffic, which leaves room for any of these.

Test and configuration commands
# Test the path: largest packet that gets through without fragmenting
ping -f -l 1379 203.0.113.1          # Windows (IPv4)
ping -M do -s 1379 203.0.113.1      # Linux (IPv4)
ping -D -s 1379 203.0.113.1         # macOS (IPv4)
ping -6 -M do -s 1359 2001:db8::1   # Linux (IPv6)

# Cisco IOS / IOS-XE tunnel interface
interface Tunnel0
 ip mtu 1407
 ip tcp adjust-mss 1367

# Linux (iptables): clamp MSS on forwarded SYNs
iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1367
# or let the kernel work it out from the route MTU:
iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

# Linux (nftables)
nft add rule inet filter forward tcp flags syn tcp option maxseg size set 1367

# Linux interface MTU
ip link set dev wg0 mtu 1407

# Juniper SRX (IPsec VPNs)
set security flow tcp-mss ipsec-vpn mss 1367

# Windows interface MTU (elevated prompt)
netsh interface ipv4 set subinterface "Ethernet" mtu=1407 store=persistent

IPsec figures are worst case: CBC padding varies with packet size, so clamping to the worst case avoids fragmentation. Overheads for IPv6 outer headers are 20 bytes higher than IPv4. Runs in your browser.

What it does

  • Every common encapsulationPPPoE, MPLS, GRE, IP-in-IP, VXLAN, Geneve, IPsec (GCM and CBC, with NAT traversal), WireGuard and OpenVPN, stacked in any combination.
  • MTU and MSSEffective MTU, TCP MSS for IPv4 and IPv6, and the largest ping that gets through without fragmenting.
  • Ready-made commandsPing tests for Windows, Linux and macOS, plus Cisco, iptables, nftables, Juniper and Windows MTU and MSS clamping commands.
  • Worst case by designIPsec padding varies, so overheads use the worst case to avoid fragmentation and black-holed packets.

How to use it

  1. Set the underlying link MTU

    1500 for most links, 9000 for jumbo frames.

  2. Tick each layer the traffic passes through

    Or pick a preset such as a site-to-site VPN.

  3. Read the MTU and MSS
  4. Test with the ping command, then apply the clamp

Questions people ask

What is the difference between MTU and MSS?

MTU is the largest IP packet a link carries, including headers. MSS is the largest TCP payload, so it is the MTU minus the IP and TCP headers: 40 bytes for IPv4 and 60 for IPv6.

Why clamp MSS rather than rely on path MTU discovery?

Path MTU discovery needs ICMP “fragmentation needed” messages, which firewalls often block. Clamping the MSS on the tunnel makes both ends send small enough segments from the start.

What MSS should I use for an Azure VPN?

Microsoft recommends clamping TCP MSS to 1350 on traffic through Azure VPN gateways, which leaves room for IPsec, NAT traversal and PPPoE on most connections.

Last updated 4 Dec 2026 · More in Networking & DNS

More Networking & DNS tools

See all →
Your product here. Reach IT engineers and architects who use these tools.Advertise →