首页 运维 网络学院 查看内容

windows与IOS中的ping与MTU

2012-1-5 15:51 691 0

摘要: windows的ping中-l(length)是指ICMP的净荷,不包括IP包头(一般20字节)和ICMP头(8字节),所以默认情况下MTU为1500字节,windows中: ping 1.1....
关键词: nbsp size 字节 图中 包头 ping Timeout seconds address ICMP

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#pingProtocol [ip]:Target IP address: 1.1.1.1Repeat count [5]: 1Datagram size [100]: 1600 (在扩展ping中此选项好像失效,没起作用)Timeout in seconds [2]:Extended commands [n]: ySource address or interface:Type of service [0]:Set DF bit in IP header? [no]: yValidate reply data? [no]:Data pattern [0xABCD]:Loose, Strict, Record, Timestamp, Verbose[none]:Sweep range of sizes [n]: y  Sweep min size [36]: 1500Sweep max size [18024]: 1501Sweep 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    如图,所有路由器均为3620路由器,将R2的s0/0口MTU设为1480, R1#ping   Protocol [ip]:Target IP address: 34.1.1.4Repeat count [5]: 1Datagram size [100]:Timeout in seconds [2]:Extended commands [n]: ySource address or interface:Type of service [0]:Set DF bit in IP header? [no]: yValidate reply data? [no]:Data pattern [0xABCD]:Loose, Strict, Record, Timestamp, Verbose[none]:Sweep range of sizes [n]: ySweep min size [36]: 1475Sweep max size [18024]: 1485Sweep 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  从图中可看出编号1002的包,也就是图中最后一行显示的Data值为1453的包(加上ICMP和IP包头共1453+8+20=1481字节)开始因为超过R2的s0/0口MTU而回不到R1,于是向R4发送不可达的包。   但实际上从R1发出去的request包是可以通过R2的s0/0口的。也就是端口的MTU值只限制从该端口发出去的包MTU大小,不限制收到的包。 本文出自 “辛-碌-力-成” 博客,请务必保留此出处http://orzorz.blog.51cto.com/4228156/756847
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部