Interview Prep/Networking/MTU, routing, packet loss and latency

SSH connects, but the session freezes as soon as you run `ls` in a big directory or `cat` a large file.

IntermediateTroubleshootingMTU, routing, packet loss and latency
Answer

Likely causes → MTU black hole: small packets get through, full-size packets exceed a smaller MTU on the path (VPN, GRE, VXLAN) and are dropped, while ICMP "fragmentation needed" is filtered so PMTUD never works.

Diagnose →

ping -M do -s 1472 target     # 1472 + 28 = 1500
ping -M do -s 1372 target     # step down until it works
tracepath target              # reports pmtu per hop

Fix → Lower the interface MTU (ip link set dev eth0 mtu 1400) or clamp MSS on the tunnel router:

iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

Allow ICMP type 3 code 4 (and ICMPv6 type 2) through firewalls.

Prevent → Set MTU and MSS clamping as part of every tunnel design.

All Networking questions Roadmap: Networking for DevOps

More on MTU, routing, packet loss and latency