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)