1 普通的 ping 命令的用法及结果

Router#ping 3.3.3.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 32/115/212 ms

2 扩张 ping

Router#ping

Protocol [ip]: 所使用的协议

Target IP address: 3.3.3.3 目标 IP 地址

Repeat count [5]: PING 次数

Datagram size [100]: 数据包大小

Timeout in seconds [2]: 超时时间

Extended commands [n]: y

Source address or interface: 23.0.0.1 源地址

Type of service [0]: 服务类型

Set DF bit in IP header? [no]: 是否分片

Validate reply data? [no]:

Data pattern [0xABCD]:

Loose, Strict, Record, Timestamp, Verbose[none]: 疏松、严格的路由选择,时间戳

Sweep range of sizes [n]:

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:

Packet sent with a source address of 23.0.0.1

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 40/85/216 ms

ping 命令可以检测的各个网络功能:

Ping127.0.0.1-----ping 回环接口是测试基本的 TCP/IP 网络配置

Ping 主机 IP 地址 ---- 测试本地主机的 TCP/IP 地址配置

Ping 默认网关 ------ 检测本地网络和其他网络的路由器是否可达

Ping 一个域名 ------ 检测 DNS 是否正常工作

Ping远端目的IP地址-----检测与远端主机的连通性

 

 

 

通常在路由器或是交换机里使用ping 命令时常碰到的问题。

 叹号(!):表示成功收到响应信息.

 句号(.):表示在等待应答超时.

 U:表示目标主机不可达.

 Q:表示目标主机繁忙.

 M:代表不能分片(fragment).

 ?:表示未知数据包类型.

 & :表示数据包已没有生存期(lifetime)