因此,在发现可以通过调整 MTU 来提高互联网速度后,我发现我的 MTU 似乎只有 96 字节。知道这是为什么吗?
ping -c 3 -M do -s 68 google.com
PING google.com (172.217.169.46) 68(96) bytes of data.
76 bytes from lhr48s08-in-f14.1e100.net (172.217.169.46): icmp_seq=1 ttl=119 time=20.2 ms
76 bytes from lhr48s08-in-f14.1e100.net (172.217.169.46): icmp_seq=2 ttl=119 time=21.7 ms
76 bytes from lhr48s08-in-f14.1e100.net (172.217.169.46): icmp_seq=3 ttl=119 time=19.7 ms
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 19.742/20.546/21.664/0.815 ms
让我们将其增加一个字节:
ping -c 3 -M do -s 69 google.com
PING google.com (172.217.169.46) 69(97) bytes of data.
--- google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2002ms
在 Ubuntu 20.04.3 LTS 上运行
答案1
根据 @Halfgaar 的评论,Google 正在阻止大型 ICMP 数据包。因此,让我们尝试其他方法:
ping -c 3 -M do -s 1464 bbc.co.uk
PING bbc.co.uk (151.101.0.81) 1464(1492) bytes of data.
1472 bytes from 151.101.0.81 (151.101.0.81): icmp_seq=1 ttl=60 time=20.0 ms
1472 bytes from 151.101.0.81 (151.101.0.81): icmp_seq=2 ttl=60 time=20.2 ms
1472 bytes from 151.101.0.81 (151.101.0.81): icmp_seq=3 ttl=60 time=20.5 ms
--- bbc.co.uk ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 20.007/20.214/20.478/0.196 ms