Station 03 · packing slip

Tunnel MTU and MSS calculator

A site-to-site tunnel wraps every packet in extra headers, like a carrier around a letter. Enter the link MTU between your offices to see how much room is left inside the tunnel, and the TCP MSS to clamp to.

Tunnel
Outer IP version (the path between the offices)

Packing slip (estimate)

Tunnel MTU
1440 bytes
TCP MSS, IPv4 inside
1400 bytes
TCP MSS, IPv6 inside
1380 bytes
  • Link MTU 1500
  • − outer IPv4 header 20
  • − UDP header 8
  • − WireGuard data header and tag 32
  • = room inside the link 1440
  • = tunnel MTU, rounded down to a multiple of 16 1440

Illustrative first sum: a 1,500-byte link with WireGuard over IPv4. Bar not to scale. Results are estimates; check your router's documentation before you change a setting.

Formula and assumptions

room = link MTU − (outer IP header + UDP 8 + WireGuard 32) tunnel MTU = 16 × floor(room ÷ 16) TCP MSS = tunnel MTU − (inner IP header + TCP 20)

With no tunnel, the first two lines are skipped: the path MTU is the link MTU and the MSS is worked out from it, so the readouts are labelled Path MTU, TCP MSS over IPv4 and TCP MSS over IPv6. The formula assumes the base outer and inner IP headers only, no other encapsulation, and a fixed 20-byte TCP header for the advertised MSS (RFC 9293 section 3.7.1, RFC Editor).

The rounding line is the conservative case: WireGuard pads the inner packet with zeros up to a multiple of 16 bytes, so the figure is rounded down to keep the padded packet inside the link. Some implementations cap the padding at the interface MTU and can carry up to the unrounded room, so your tunnel may show a slightly larger number.

Header sizes used

Assumptions