网站建设资讯

NEWS

网站建设资讯

windows与IOS中的ping与MTU-创新互联

windows的ping中-l(length)是指ICMP的净荷,不包括IP包头(一般20字节)和ICMP头(8字节),所以默认情况下MTU为1500字节,windows中:

创新互联专注于网站设计制作、成都网站制作、网页设计、网站制作、网站开发。公司秉持“客户至上,用心服务”的宗旨,从客户的利益和观点出发,让客户在网络营销中找到自己的驻足之地。尊重和关怀每一位客户,用严谨的态度对待客户,用专业的服务创造价值,成为客户值得信赖的朋友,为客户解除后顾之忧。

ping 1.1.1.1 -f -l 1472  是通的,

ping 1.1.1.1 -f -l 1473  是不通的。

IOS的ping中Datagram size和sweep size都是指MTU,即

R1#ping
Protocol [ip]:
Target IP address: 1.1.1.1
Repeat count [5]: 1
Datagram size [100]: 1600 (在扩展ping中此选项好像失效,没起作用)
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface:
Type of service [0]:
Set DF bit in IP header? [no]: y
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]: y
Sweep min size [36]: 1500
Sweep max size [18024]: 1501
Sweep interval [1]:
Type escape sequence to abort.
Sending 2, [1500..1501]-byte ICMP Echos to 34.1.1.4, timeout is 1 seconds:
Packet sent with the DF bit set
!.
Success rate is 50 percent (1/2), round-trip min/avg/max = 212/212/212 ms

 windows与IOS中的ping与MTU

 如图,所有路由器均为3620路由器,将R2的s0/0口MTU设为1480,

R1#ping
Protocol [ip]:
Target IP address: 34.1.1.4
Repeat count [5]: 1
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface:
Type of service [0]:
Set DF bit in IP header? [no]: y
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]: y
Sweep min size [36]: 1475
Sweep max size [18024]: 1485
Sweep interval [1]:
Type escape sequence to abort.
Sending 11, [1475..1485]-byte ICMP Echos to 34.1.1.4, timeout is 2 seconds:
Packet sent with the DF bit set
!!!!!!.....
Success rate is 54 percent (6/11), round-trip min/avg/max = 100/127/200 ms

windows与IOS中的ping与MTU

从图中可看出编号1002的包,也就是图中最后一行显示的Data值为1453的包(加上ICMP和IP包头共1453+8+20=1481字节)开始因为超过R2的s0/0口MTU而回不到R1,于是向R4发送不可达的包。

但实际上从R1发出去的request包是可以通过R2的s0/0口的。也就是端口的MTU值只限制从该端口发出去的包MTU大小,不限制收到的包。

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


当前文章:windows与IOS中的ping与MTU-创新互联
转载来于:http://cdweb.net/article/djhesh.html