路由器ATM接口ping自己测试环路-应用技巧

王朝数码·作者佚名  2011-02-24
宽屏版  字体: |||超大  

连接拓扑:router A--155M--(port A)ATM network(port B)--155M--router B

路由器ping自己测试环路的情况就不用说了,现在我要说的是如果在没有环路的情况下,路由器ping自己的包,是否发出去呢?从显示的时延来看,比ping对端小的多,显然这个包没有发出去。这么说,路由器很聪明了--有环路的时候,ping包就出去了;而没有环路的情况下,ping包就不出去。事实是这样吗?我先后用了两种方法来验证:

1.一边router A ping自己,一边在ATM交换机上看该pvc的流量

2.把Agilent串联在路由器和ATM交换机之间,即router A--155M--Agilent--(port A)ATM network(port B)--155M--router B,而后decode;同时在router A上debug

先说说方法一的结果吧,在port A和port B上,都看到了双向的流量,在router B的ATM接口上也看到了input和output流量,但是两个方向的流量都是不对等的。用port A的流量举例吧,从router A接收到的流量少,而发送给router A的流量多,这多出来的流量是什么、且从哪里来的呢?我只好采用了方法二来分析。

在router A上debug ip packet detail的结果如下:

Router#p 10.0.0.1 repeat 1 size 36

段1:发出request

*May 18 21:29:46.626: IP: tableid=0, s=10.0.0.1 (local), d=10.0.0.1 (ATM1/0.3), routed via RIB

*May 18 21:29:46.626: IP: s=10.0.0.1 (local), d=10.0.0.1 (ATM1/0.3), len 100, sending

*May 18 21:29:46.626: ICMP type=8, code=0

段2:收到自己的request

*May 18 21:29:46.630: IP: tableid=0, s=10.0.0.1 (ATM1/0.3), d=10.0.0.1 (ATM1/0.3), routed via RIB

*May 18 21:29:46.630: IP: s=10.0.0.1 (ATM1/0.3), d=10.0.0.1 (ATM1/0.3), len 100, rcvd 3

*May 18 21:29:46.630: ICMP type=8, code=0

段3:发出reply

*May 18 21:29:46.630: IP: tableid=0, s=10.0.0.1 (local), d=10.0.0.1 (ATM1/0.3), routed via RIB

*May 18 21:29:46.630: IP: s=10.0.0.1 (local), d=10.0.0.1 (ATM1/0.3), len 100, sending

*May 18 21:29:46.630: ICMP type=0, code=0

段4:收到对方的redirect

*May 18 21:29:46.630: IP: tableid=0, s=10.0.0.2 (ATM1/0.3), d=10.0.0.1 (ATM1/0.3), routed via RIB

*May 18 21:29:46.630: IP: s=10.0.0.2 (ATM1/0.3), d=10.0.0.1 (ATM1/0.3), len 56, rcvd 3

*May 18 21:29:46.630: ICMP type=5, code=1

段5:收到对方的reply

*May 18 21:29:46.630: IP: tableid=0, s=10.0.0.1 (ATM1/0.3), d=10.0.0.1 (ATM1/0.3), routed via RIB

*May 18 21:29:46.630: IP: s=10.0.0.1 (ATM1/0.3), d=10.0.0.1 (ATM1/0.3), len 100, rcvd 3

*May 18 21:29:46.630: ICMP type=0, code=0

段6:收到对方的redirect

*May 18 21:29:46.630: IP: tableid=0, s=10.0.0.2 (ATM1/0.3), d=10.0.0.1 (ATM1/0.3), routed via RIB

*May 18 21:29:46.630: IP: s=10.0.0.2 (ATM1/0.3), d=10.0.0.1 (ATM1/0.3), len 56, rcvd 3

*May 18 21:29:46.630: ICMP type=5, code=1

我认为可能是系统处理的原因,使得段3和段4颠倒了。因为显然是router B分别针对router A发来的request和reply发出的redirect消息。Agilent decode的结果也能和以上信息相对应。

说明一下:

ICMP type=8,code=0表示echo request;

ICMP type=0,code=0表示echo reply;

ICMP type=5,code=1表示redirect for host;

第一页    上一页    第1页/共2页    下一页    最后页
第01页 第02页 
 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有