wireguard mtu
wireguard_mtuCalculate the optimal MTU for a WireGuard VPN tunnel interface with a detailed overhead breakdown. Accounts for WireGuard header (32 bytes), outer IP header (20 bytes IPv4 or 40 bytes IPv6), UDP header (8 bytes), and optional PPPoE encapsulation (8 bytes). Prevents fragmentation and PMTUD black holes by computing the maximum inner packet size that fits within the physical link MTU. Essential for WireGuard setup on residential ISP connections (PPPoE), IPv6 tunnels, and any VPN where incorrect MTU causes slow or stalled connections.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ipv6 | No | Whether the outer (transport) IP header uses IPv6 (40 bytes) instead of IPv4 (20 bytes) | |
| over_pppoe | No | Whether the link uses PPPoE encapsulation (adds 8 bytes of overhead) | |
| interface_mtu | No | MTU of the underlying physical or virtual network interface in bytes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| breakdown | Yes | Itemized breakdown of each overhead component in bytes | |
| wireguard_mtu | Yes | Optimal MTU to set on the WireGuard tunnel interface in bytes | |
| overhead_bytes | Yes | Total encapsulation overhead in bytes subtracted from interface MTU |