当前位置:
文档之家› PING和TRACEROUTE命令详解
PING和TRACEROUTE命令详解
3 = port unreachable端口不可达
4 = fragmentation needed and DF set
需要分段但设置了DF
5 = source route failed源路由失败
4source-quench
源抑制
5Redirect重定向
code 0 = redirect datagrams for the network
16information-reply
信息应答
17mask-request
掩码请求
18mask-reply
掩码应答
31conversion-error
转换错误
32mobile-redirect
移动主机重定向
下表列出了从ping设备中可能的各种输出特征: Character
Description描述
!Each exclamation point indicates receipt of a reply.
为网络重定向数据报
1 = redirect datagrams for the host
为主机重定向数据报
2 = redirect datagrams for the type of service and network
为网络和服务类型重定向数据报
3 = redirect datagrams for the type of service and host
Router1#debug ip packet detail IP packet debugging is on (detailed)Router1#ping 12.0.0.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/6/8 ms Router1# Jan 20 15:54:47.487: IP: s=12.0.0.1 (local), d=12.0.0.2 (Serial0), len 100,
为主机和服务类型重定向数据报
6alternate-address备用地址
8Echo
响应
9router-advertisement路由器通告
10router-solicitation
路由器请求
11time-exceeded
超时消息
code 0 = time to live exceeded in transit
·响应请求到达目的地址,并且
·目的地址在一个称作超时(time out)的预设时间内能够获得一个响应应答返回给源地址,在Cisco路由器上,这个超时的默认值是2秒。
关于此命令的所有选项,在Troubleshooting Commands中,见“Ping”。
警告:在产品路由器中使用debug ip packet detail命令会引致CPU的高利用率。这样可能会导致一个严重的性能降级或者网络中断。我们建议你在实行debug命令前仔细阅读Use the Debug Command。
前提条件:在本文档中没有特别的要求。
组件:使用本文档没有特殊软件或者是硬件版本的限制。
本文档中的信息是由一个具体的实验环境设备产生的。文档中所有设备的使用都是从默认配置开始的。如果你的网络是活动的,请确保你能够了解任何命令产生的潜在影响。
协定:关于文档协定的更多信息,请浏览相关Cisco Technical Tips Conventions.
每个感叹号标示一个应答的收据。
.Each period indicates the network server timed out while waiting for a reply.
每个句点标示当等待一个应答时,网络超时。
UA destination unreachable error PDU was received.
End with CNTL/Z. Router1(config)#ip route 0.0.0.0 0.0.0.0 Serial0
我们现在有
Router1#debug ip packet detailIP packet debugging is on (detailed)Router1#ping 34.0.0.4 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 34.0.0.4, timeout is 2 seconds: U.U.U Success rate is 0 percent (0/5) Jan 20 16:05:30.659: IP: s=12.0.0.1 (local), d=34.0.0.4 (Serial0), len 100,
下表列出了ICMP-类型可能的值。
窗体顶端
ICMP Type类型Literal
派生
0echo-reply响应应答
3destination unreachable目的地不可达
code 0 = net unreachable网络不可达
1 = host unreachable主机不可达
2 = protocol unreachable协议不可达
让我们尝试从Router1 ping Router4:
Router1#ping 34.0.0.4 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 34.0.0.4, timeout is 2 seconds: ..... Success rate is 0 percent (0/5)
让我们近距离看下发生了什么事:
Router1#debug ip packetIP packet debugging is on
警告:在产品路由器中使用debug ip packet detail命令会引致CPU的高利用率。这样可能会导致一个严重的性能降级或者网络中断。我们建议你在实行debug命令钱仔细阅读Use the Debug Command。
Router3# ! ! interface Serial0 ip address 34.0.0.3 255.255.255.0 no fair-queue ! interface Serial1 ip address 23.0.0.3 255.255.255.0 ! ! Router4# ! ! interface Serial0 ip address 34.0.0.4 255.255.255.0 no fair-queue clockrate 64000 ! !
为什么我不能Ping?如果你无法成功ping一个地址,考虑这些原因:
路由问题
这里是一些不能成功进行ping的例子,确定问题,和如何解决问题。
这个方案是用下面的网络拓扑图来解释:
Router1# ! ! interface Serial0 ip address 12.0.0.1 255.255.255.0 no fair-queue clockrate 64000 ! ! Router2# ! ! interface Serial0 ip address 23.0.0.2 255.255.255.0 no fair-queue clockrate 64000 ! interface Serial1 ip address 12.0.0.2 255.255.255.0 ! !
因为没有路由协议运行在Router1上,它不知道应该往哪里发送它的数据包并且我们得到一个“unroutable”信息。现在让我们增加一条静态路由给Router1:
Router1#configure terminalEnter configuration commands, one per line.
传送过程中生存时间TTL超时
1 = fragment reassembly time exceeded
碎片组装超时
12parameter-problem参数问题
13timestamp-request时间戳请求
14timestamp-reply
时间戳应答
15information-request信息请求
rcvd 3Jan 20 15:54:47.527: ICMP type=0, code=0!--- This is the answer we get from 12.0.0.2. !--- ICMP type=0 corresponds to the echo reply message.
!--- By default, the repeat count is five times, so there will be five !--- echo requests, and five echo replies
收到了一个目的地不可达的PDU协议数据单元错误。
QSource quench (destination too busy).源抑制(目标过于繁忙)。
MCould not fragment.不能分片
?Unknown packet type.未知的包类型
&Packet lifetime exce4.0.0.4 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 34.0.0.4, timeout is 2 seconds: Jan 20 16:00:25.603: IP: s=12.0.0.1 (local), d=34.0.0.4, len 100, unroutable.Jan 20 16:00:27.599: IP: s=12.0.0.1 (local), d=34.0.0.4, len 100, unroutable.Jan 20 16:00:29.599: IP: s=12.0.0.1 (local), d=34.0.0.4, len 100, unroutable.Jan 20 16:00:31.599: IP: s=12.0.0.1 (local), d=34.0.0.4, len 100, unroutable.Jan 20 16:00:33.599: IP: s=12.0.0.1 (local), d=34.0.0.4, len 100, unroutable.Success rate is 0 percent (0/5)