命令说明:
输入命令“ping –l 1500 –f 192.168.2.53”,这里我们解释一下命令参数的含义
* –l 1500参数:发送一个定长数据包,1500是要测试的包大小
* –f 参数:通知操作系统不能私自更改该数据包大小
*192.168.2.53:希望对改善网络性能的对端IP地址
其实,这个MTU值针对不同的对端,是不同的值,我一般取我最关心的几台服务器的最小值。
这个小错误可是引起过N大的问题,
三台EXCHANGE2010跨VPN传输。刚开始启动时,一切OK。但好像就是等一个AD域刷新或是什么时间(有时一两小时,有时一两天),跨IP段之间的服务器就不正常了。可以发信,不能收信。
找了N多方案,WINS,补丁,DNS,AD性能判断修复,服务器重新安装之类的,全招用上了都无济于事。过段时间,MAILBOX DATABASE 就指定DISMOUNT,但同一网段的却都正常MOUNT的。
但我找到三台EXCHANGE的最佳MTU值之后。
一切都Ok啦。
~~~~~~~~~~~
C:\Users\sky>ping -l 1500 -f 192.168.2.53
Pinging 192.168.2.53 with 1500 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Ping statistics for 192.168.2.53:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:\Users\sky>ping -l 1450 -f 192.168.2.53
Pinging 192.168.2.53 with 1450 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Ping statistics for 192.168.2.53:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:\Users\sky>ping -l 1400 -f 192.168.2.53
Pinging 192.168.2.53 with 1400 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Ping statistics for 192.168.2.53:
Packets: Sent = 2, Received = 0, Lost = 2 (100% loss),
Control-C
^C
C:\Users\sky>ping -l 1350 -f 192.168.2.53
Pinging 192.168.2.53 with 1350 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Ping statistics for 192.168.2.53:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:\Users\sky>
C:\Users\sky>ping -l 1300 -f 192.168.2.53
Pinging 192.168.2.53 with 1300 bytes of data:
Reply from 192.168.2.53: bytes=1300 time=561ms TTL=128
Reply from 192.168.2.53: bytes=1300 time=691ms TTL=128
Reply from 192.168.2.53: bytes=1300 time=713ms TTL=128
Reply from 192.168.2.53: bytes=1300 time=678ms TTL=128
Ping statistics for 192.168.2.53:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 561ms, Maximum = 713ms, Average = 660ms
C:\Users\sky>
C:\Users\sky>ping -l 1330 -f 192.168.2.53
Pinging 192.168.2.53 with 1330 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Ping statistics for 192.168.2.53:
Packets: Sent = 3, Received = 0, Lost = 3 (100% loss),
Control-C
^C
C:\Users\sky>ping -l 1320 -f 192.168.2.53
Pinging 192.168.2.53 with 1320 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Ping statistics for 192.168.2.53:
Packets: Sent = 3, Received = 0, Lost = 3 (100% loss),
Control-C
^C
C:\Users\sky>ping -l 1310 -f 192.168.2.53
Pinging 192.168.2.53 with 1310 bytes of data:
Reply from 192.168.2.53: bytes=1310 time=607ms TTL=128
Reply from 192.168.2.53: bytes=1310 time=595ms TTL=128
Ping statistics for 192.168.2.53:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 595ms, Maximum = 607ms, Average = 601ms
Control-C
^C
C:\Users\sky>ping -l 1315 -f 192.168.2.53
Pinging 192.168.2.53 with 1315 bytes of data:
Reply from 192.168.2.53: bytes=1315 time=288ms TTL=128
Ping statistics for 192.168.2.53:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 288ms, Maximum = 288ms, Average = 288ms
Control-C
^C
C:\Users\sky>ping -l 1318 -f 192.168.2.53
Pinging 192.168.2.53 with 1318 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Ping statistics for 192.168.2.53:
Packets: Sent = 2, Received = 0, Lost = 2 (100% loss),
Control-C
^C
C:\Users\sky>ping -l 1317 -f 192.168.2.53
Pinging 192.168.2.53 with 1317 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Ping statistics for 192.168.2.53:
Packets: Sent = 2, Received = 0, Lost = 2 (100% loss),
Control-C
^C
C:\Users\sky>ping -l 1316 -f 192.168.2.53
Pinging 192.168.2.53 with 1316 bytes of data:
Reply from 192.168.2.53: bytes=1316 time=456ms TTL=128
Reply from 192.168.2.53: bytes=1316 time=291ms TTL=128
Ping statistics for 192.168.2.53:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 291ms, Maximum = 456ms, Average = 373ms
Control-C
^C
C:\Users\sky>ping -l 1317 -f 192.168.2.53
Pinging 192.168.2.53 with 1317 bytes of data:
Packet needs to be fragmented but DF set.
Ping statistics for 192.168.2.53:
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),
Control-C
^C
C:\Users\sky>ping -l 1316 -f 192.168.2.53
Pinging 192.168.2.53 with 1316 bytes of data:
Reply from 192.168.2.53: bytes=1316 time=380ms TTL=128
Reply from 192.168.2.53: bytes=1316 time=295ms TTL=128
Reply from 192.168.2.53: bytes=1316 time=291ms TTL=128
Ping statistics for 192.168.2.53:
Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 291ms, Maximum = 380ms, Average = 322ms
Control-C
^C
~~~~~~~
摘抄网上说法:
设置MTU大小是一个反复试验的过程: 由最大值1500开始下降,直至问题解决。使用下列值之一或许能解决一些由MTU值引起的问题:
1500. 以太网信息包最大值,也是默认值。是没有PPPoE和VPN 的网络连接的典型设置。是各种路由器、网络适配器和交换机的默认设置
1492. PPPoE 的最佳值
1472. 使用 ping 的最大值 (大于此值的信息包会先被分解)
1468. DHCP的最佳值
1430. VPN和PPTP 的最佳值
576. 拨号连接到ISP的标准值
~~~~~~~~~~
问题一:知道了我的上网方式,如何设置MTU值?
1. 在 『开始』>『运行』中,键入regedit,点确定;
2. 选择HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces
3. 在 interface 底下可能有很多的选项,你一个一个的去看,会有一个选项与你的网卡的 IP相同,那个就是你要挑选的选项啦!然后同样的在该选项上选择『编辑』>『新建』>『DWORD值』之后,建立一个名为『MTU』的DWORD,然后双击修改,选择十进制,填入合适 MTU 值,确定!大功告成!
修改路由器的MTU值
上面得到的MTU值不能直接用于本地设置上,还应在此基础上加上28(数据包头大小28字节),因此最终在WAN设置页面修改MTU大小为1480。
~~~~~~~~~~~~~~
一切要不要加28,以解决问题为准。。。