我不是这方面的专家,所以我想我会来这里征求一些意见。我在访问某些网站时遇到问题,例如 codility.com。据我了解(如果我错了,请纠正我)1500 是一个非常标准的 MTU 设置?但是,在我有访问问题的站点上,这给我带来了大量的数据包丢失,即:
ping -s 1464 -c1 codility.com
PING codility.com (52.71.87.144) 1464(1492) bytes of data.
--- codility.com ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
但同样的事情在谷歌上说,每次都有效:
ping -s 1464 -c1 google.com
PING google.com (216.58.213.174) 1464(1492) bytes of data.
72 bytes from lhr26s02-in-f174.1e100.net (216.58.213.174): icmp_seq=1 ttl=54 (truncated)
--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 25.234/25.234/25.234/0.000 ms
我必须将 MTU 降低到 1200 左右,以免在 Codility 上丢包:
ping -s 1172 -c1 codility.com
PING codility.com (52.71.87.144) 1172(1200) bytes of data.
1180 bytes from ec2-52-71-87-144.compute-1.amazonaws.com (52.71.87.144): icmp_seq=1 ttl=43 time=119 ms
--- codility.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 119.048/119.048/119.048/0.000 ms
事实上,确切的最高值似乎是 1204:
ping -s 1176 -c1 codility.com
PING codility.com (52.71.87.144) 1176(1204) bytes of data.
1184 bytes from ec2-52-71-87-144.compute-1.amazonaws.com (52.71.87.144): icmp_seq=1 ttl=43 time=123 ms
--- codility.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 123.843/123.843/123.843/0.000 ms
从 1205 或更高版本开始,我完全丢包:
ping -s 1177 -c1 codility.com
PING codility.com (52.71.87.144) 1177(1205) bytes of data.
--- codility.com ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
任何人都可以在这里给我一些一般性建议和信息吗?这是正常的吗?我应该将 MTU 永久设置为 1200 吗?这会产生什么影响?从我对我使用的路由器的观察来看,我认为 MTU 为 1500,所以我在这里查看 ISP 问题吗?