"Pacchetti Superano la Dimensione Massima": Cause e Soluzioni per Ingegneri di Rete
Quando i pacchetti superano il path MTU (Maximum Transmission Unit), vengono scartati o frammentati. Ecco la checklist di troubleshooting.
Cause Radici e Soluzioni
1. Configurazione errata Jumbo Frames
- Problema: Gli endpoint inviano frame da 9000 byte; MTU switch/porta intermedio = 1500
- Soluzione: Abilita jumbo frames **end-to-end** (NIC → porte switch → interfacce router → firewall). Verifica con
ping -s 8972 -M do(Linux) /ping -f -l 8972(Windows)
2. Fallimenti di Frammentazione IP
- Problema: bit "Don't Fragment" (DF) impostato + pacchetto > path MTU → ICMP "Fragmentation Needed" scartato dal firewall
- Soluzione: Consenti ICMP Type 3 Code 4 (Destination Unreachable / Fragmentation Needed). Implementa **PMTUD** (Path MTU Discovery) o **PLPMTUD** (RFC 8899)
3. Disallineamento MTU (VPN, Tunnel, VXLAN, PPPoE)
- Overhead VPN: IPsec ESP (~73 byte), WireGuard (60 byte), OpenVPN (~60 byte)
- PPPoE: 8 byte → MTU 1492
- VXLAN: 50 byte → MTU 1450
- Soluzione: Abbassa MTU endpoint (es. 1380 per IPsec) o abilita **MSS Clamping** (TCP MSS = MTU - 40) su router/firewall
4. Hardware Difettoso / Bug Driver
- Funzioni offload NIC (TSO, LRO, GRO) si comportano male → frame oversize
- Soluzione: Disabilita offload:
ethtool -K eth0 tso off gso off gro off; aggiorna firmware/driver
Comandi Diagnostici
# Traccia path MTU
tracepath # Linux
mturoute.exe # Windows
# Testa dimensione specifica con bit DF
ping -s 1472 -M do # 1472 + 28 header = 1500
ping -f -l 1472 # Windows
# Verifica MTU interfaccia
ip link show | grep mtu # Linux
netsh interface ipv4 show subint # Windows
Best Practice
- Standardizza MTU 1500 ovunque a meno che **controllato end-to-end** (fabric data center)
- Usa **MSS clamping** sui router edge per traffico VPN/tunnel
- Monitora ICMP "Packet Too Big" — è una funzionalità, non un bug