ping -Mdo -s $size $host
First written 2022-01-09; Last updated 2022-01-09
This page lists useful commands and constants when debugging MTU issues.
Send ICMP/ICMPv6 ping packets and prohibit fragmentation (local and remote via DF flag) to check if the whole network path supports packets of a certain size:
ping -Mdo -s $size $host
The size is the ICMP payload, see below for the values to subtract from the expected MTU.
Show the current MTU for a given target host (possibly via PTMUD) on GNU/Linux (works for IPv4 and IPv6):
ip r g $ip
ip route get $ip # long form
IPv4 header (without options): 20 byte
IPv6 header (no extension headers): 40 byte
ICMP/ICMPv6 header + echo header (RFC 792, RFC 4443): 4 byte + 4 byte
UDP header (RFC 768): 8 byte
WireGuard header + authentication tag (WireGuard whitepaper, 5.4.6, Mailing list): 16 byte + 16 byte
Overhead for some protocols; in parentheses the maximum payload (data) size with an MTU of 1500 and 1492 (PPPoE):
ICMP ping: 28 (1472, 1464)
ICMPv6 ping: 48 (1452, 1444)
WireGuard over IPv4: 60 (1440, 1432)
WireGuard over IPv6: 80 (1420, 1412)
Last updated 2022-01-09