Calculating MTU and TCP MSS for WireGuard and VXLAN Tunnels
Small ICMP pings succeed, an SSH login prompt appears, and then the session freezes the moment a directory listing or TLS certificate crosses the tunnel. When control traffic works and larger payloads hang, encapsulation overhead has usually pushed packets past the path MTU while Path MTU Discovery (PMTUD) is blocked. Every tunnel wraps the original packet in extra headers. On a 1,500-byte…
Encapsulation overhead in WireGuard and VXLAN tunnels can cause packets to exceed the path's Maximum Transmission Unit (MTU), leading to freezing sessions. On a 1,500-byte Ethernet link, WireGuard adds 60 bytes of overhead, reducing the effective inner MTU to 1,440 bytes. For TCP packets, 40 bytes of additional headers are required, leaving a maximum TCP segment size (MSS) of 1,400 bytes.
In IPv6, the MSS drops to 1,380 bytes due to a larger header. Residential and branch fiber circuits often use PPPoE, which reduces the underlay MTU to 1,492 bytes. When tunneling over PPPoE, the effective inner MTU becomes 1,392 bytes. Misconceptions about common underlay MTU sizes can lead to issues. VXLAN, behaving differently from Layer 3 VPN tunnels, requires careful consideration of underlay MTU and inner MTU to prevent silent black-holing.
To verify the actual path limit, Don't Fragment (DF) pings can be used, providing confirmation of the physical path's forwarding capabilities.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to