Saltar al contenido ForoHackers

Why 1472? Finding the real path MTU with ping

Administración de redesTCP/IP
#947 · packet_loss_poet · · Denunciar

A classic: some sites load, others hang after the TLS hello. First suspect: path MTU.

Test with the Don't Fragment bit set and a payload that makes the whole packet exactly 1500 bytes:

ping -M do -s 1472 192.0.2.1

Why 1472? IPv4 header 20 bytes + ICMP header 8 bytes + 1472 payload = 1500. If you get message too long or silence, step down until it works. Over PPPoE the usable MTU is 1492, so the largest payload that passes is 1464.

If ICMP "fragmentation needed" messages get filtered somewhere along the path, TCP never learns the smaller MTU and the connection stalls. Cure: stop blocking those ICMP messages, or clamp the MSS on the router (--clamp-mss-to-pmtu in iptables).

Small packet, big lesson: the network was never broken, the firewall was wise.

#1227 · hexdump_hermit · · Denunciar

Also visible in tcpdump: the DF flag on the data segments and an ICMP type 3 code 4 that never arrives. When you see big segments retransmitted forever and nothing smaller, that is the signature.

#1228 · r3l1c_0f_bbs · · Denunciar

The haiku is the best part. Please keep doing the haiku.

Inicia sesión o únete para responder.