linux / win 下使用测试MTU
时间:2022-1-21 3:05 热度:1151° 评论:0 条

主要记录一下命令
设置TCP最大报文长度,一般情况下自己可以算出来。
但是很多情况下并不一定,还是需要自己测试。
LINUX
当包是1472字节并且不拆包,能够传送正确; [root@sxx1314 ~]# ping -c 3 -s 1472 -M do www.baidu.com PING www.a.shifen.com (10.10.0.230) 1472(1500) bytes of data. 1480 bytes from 10.10.0.230: icmp_seq=1 ttl=64 time=0.345 ms 1480 bytes from 10.10.0.230: icmp_seq=2 ttl=64 time=0.303 ms 1480 bytes from 10.10.0.230: icmp_seq=3 ttl=64 time=0.314 ms --- 10.1.0.230 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.303/0.320/0.345/0.027 ms 当包是1473字节并且不拆包,加上28字节的包头,大于设定值1500,发生错误。 [root@sxx1314 ~]# ping -c 3 -s 1473 -M www.baidu.com PING www.a.shifen.com (10.10.0.230) 1473(1501) bytes of data. From 10.10.34.1 icmp_seq=1 Frag needed and DF set (mtu = 1500) From 10.10.34.1 icmp_seq=1 Frag needed and DF set (mtu = 1500) From 10.10.34.1 icmp_seq=1 Frag needed and DF set (mtu = 1500) --- 10.1.0.230 ping statistics --- 0 packets transmitted, 0 received, +3 errors
WIN
测试方法
ping –l 1472 –f www.baidu.com


捐赠支持:如果觉得这篇文章对您有帮助,请“扫一扫”鼓励作者!
相关文章 本文无需标签!
本文作者:沁雨寒 文章标题: linux / win 下使用测试MTU
本文地址:https://blog.sxx1314.com/linux/614.html
版权声明:若无注明,本文皆为“unix 软硬件 技术宅 ”原创,转载请保留文章出处。百度已收录
本文地址:https://blog.sxx1314.com/linux/614.html
版权声明:若无注明,本文皆为“unix 软硬件 技术宅 ”原创,转载请保留文章出处。百度已收录















