荟萃馆

位置:首页 > 网络 > 网络诊断

通过Ping排除路由器故障的方法

在路由器的故障分析中,Ping命令是一个常见而实用的网络管理工具,用这种工具可以测试端到端的连通性,即检查源端到目的端网络是否通畅。下面是YJBYS小编整理的'通过Ping排除路由器故障的相关知识,希望对你有帮助!

通过Ping排除路由器故障的方法

  在路由器上Ping返回符号的含义如下表所示:

符号 描述

! 收到一个响应。

.  在等待时,网络服务器超时。

U 目标无法到达,受到错误的PDU。

Q 源消失(目标设备太忙)。

M 数据无法分割。

? 包类型未知。

& 报的有效期过了。

在路由器上无法Ping通一个地址的原因有很多种,譬如线路故障,对方路由器的接口没有起来,路由器的路由表中没有该地址的路由信息等等都会造成网络无法Ping通。

  实例:

网络结构如(图1)示。

Router1#Ping Type escape sequence to ing 5, 100-byte ICMP Echos to , timeout is 2 seconds:ess rate is 0 percent (0/5)在Router1上无法Ping通Router4的接口,通过使用DEBUG命令来获得更多的信息,便于进一步的分析:Router1#debug ip packetIP packet debugging is onRouter1#Ping Type escape sequence to ing 5, 100-byte ICMP Echos to , timeout is 2 seconds:5d21h: IP: s= (local), d=, Len 100, unroutable.5d21h: IP: s= (local), d=, Len 100, unroutable.……Success rate is 0 percent (0/5)
我们看到 “unroutable”的消息,表明在Router1的路由表中不存在该地址的路由信息,Router1不知道该地址向何处转发,现增加一条缺省路由到Router1中:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/er1(config)#ip route   Serial0/0然后,再在Router1上使用Ping:Router1#Ping Type escape sequence to ing 5, 100-byte ICMP Echos to , timeout is 2 seconds:cess rate is 0 percent (0/5)6d03h: IP: s= (local), d= (Serial0/0), Len 100, sending6d03h: ICMP type=8, code=06d03h: IP: s= (Serial0/0), d= (Serial0/0), Len 56, rcvd 36d03h: ICMP type=3, code=1…… 
再看看在Router2上收到了什么信息:
Router2#21:56:04: IP: s= (Serial1), d=, Len 100, unroutable21:56:04: ICMP type=8, code=021:56:04: IP: s= (local), d= (Serial1), Len 56, sending21:56:04: ICMP type=3, code=1……   
从上面的信息可以看出Router1已经能正确地发送包到Router2,但好象Router2并不知道如何转发地址,所以Router2发送了“unreachable”的消息给Router1。因此分别给Router2和Router3加上动态路由协议RIP:
Router2#router ripnetwork network Router3#router ripnetwork network 然后,在Router1上Ping Router4的接口:Router1#Ping Type escape sequence to ing 5, 100-byte ICMP Echos to , timeout is 2 seconds:5d21h: IP: s= (local), d= (Serial0/0), Len 100, sending.5d21h: IP: s= (local), d= (Serial0/0), Len 100, sending.……Success rate is 0 percent (0/5)   
现在情况看起来好点,Router1能发包到Router4,只是收不到任何从Router4返回的信息。看来Router4上也有问题:
Router4#6d23h: IP: s= (Serial0/0), d= (Serial0/0), Len 100, rcvd 36d23h: IP: s= (local), d=, Len 100, unroutable……
Router4收到了ICMP的包,但由于没有到的路由信息,因此无法响应所发过来的包。在Router4上增加一条缺省路由:

Router4(config)#ip route Serial0/0

标签:ping 路由器 故障