我注意到一种奇怪的行为,我的知识没有答案。所以我想知道MTU。第一次ping:
ping -c 1 -s 1800 -M do google.com
PING google.com (216.58.209.14) 1800(1828) bytes of data.
ping: local error: Message too long, mtu=1500
--- google.com ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
所以我得出结论,MTU 是 1500。但在发送 1472 个字节后,我得到:
ping -c 1 -s 1472 -M do google.com
PING google.com (216.58.209.14) 1472(1500) bytes of data.
From 192.168.55.1 (192.168.55.1) icmp_seq=1 Frag needed and DF set (mtu = 0)
--- google.com ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
接着:
ping -c 1 -s 1500 -M do google.com
PING google.com (216.58.209.14) 1500(1528) bytes of data.
ping: local error: Message too long, mtu=552
--- google.com ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
为什么变了?