Calculate WireGuard MTU for an IPv4 endpoint and IPv6 traffic
Use a 1500-byte Ethernet path with an IPv4 WireGuard endpoint and calculate the different overhead inside and outside the tunnel.
Try these inputsWorked calculation
- The outer IPv4 and UDP headers use 20 + 8 = 28 bytes.
- Add 16 bytes for the WireGuard data header and 16 for the authentication tag. The tunnel budget is 1,500 − 60 = 1,440 bytes, already a multiple of 16.
- The inner IPv6 and TCP headers need 40 + 20 = 60 bytes. The resulting MSS is 1,380 bytes.
Results
- Inner IP MTU
- 1,440 B
- TCP MSS
- 1,380 B
- Budgeted overhead
- 60 B
Tunnel packet byte budget
- Outer IPv4 · 20 B
- UDP · 8 B
- WireGuard data header · 16 B
- Poly1305 tag · 16 B
- Encapsulation
- WireGuard
- Starting MTU
- 1,500 B
- Inner TCP/IP base headers
- 60 B
| Layer | Bytes |
|---|---|
| Outer IPv4 | 20 |
| UDP | 8 |
| WireGuard data header | 16 |
| Poly1305 tag | 16 |
| Inner IP packet | 1440 |
Questions
Can the inner and outer address families differ in WireGuard?
Yes. The outer family carries UDP to the peer. The inner family describes the packet carried by WireGuard.
Does switching this 1440-byte case to MTU-capped padding change the result?
Both padding profiles yield 1,440 here because the remaining budget already divides by 16.