Pcornel
Linux · Linux Networking

MTU

Cheat sheet · https://pcornel.dk/topic.php?topic=2786

Back to the Topic

Answer

MTU (Maximum Transmission Unit) is the largest packet an interface sends without fragmentation, usually 1500 bytes on Ethernet and 9000 for jumbo frames. Tunnels (VPN, VXLAN) reduce the effective MTU.

Remember

Path MTU discovery needs ICMP "fragmentation needed" / IPv6 "packet too big" to reach the sender — blocking ICMP breaks it. Test with DF-set pings of decreasing size. MTU must match on all hosts in a Layer 2 segment.

First checks

  • tracepath <dest> — path MTU
  • ip -br addr — interfaces and addresses
  • ip route — routing table and default route
  • ip neigh — ARP/neighbour cache
  • ip route get <dest> — route, interface and source chosen for a destination
  • nmcli device status / networkctl — which tool manages each interface

Commands

ip link set dev <if> mtu <n>
ping
ping -M do -s 1472 <dst>
ip route get <dst>

Verify in this order

interface MTU → packets sized to fit → path MTU discovered via ICMP → no black-holed large packets

Where it usually breaks

First mismatch in link/interface → address/namespace → route/neighbor → firewall/policy → socket/daemon → DNS/TLS/SSH/application peer path; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2786

Confirmation

Confirm action

Continue?