R4#
sh ip route
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/3321856] via 24.0.0.2, 00:00:18, Serial1/0
24.0.0.0/24 is subnetted, 1 subnets
C 24.0.0.0 is directly connected, Serial1/0
12.0.0.0/24 is subnetted, 1 subnets
D 12.0.0.0 [90/2681856] via 24.0.0.2, 00:00:50, Serial1/0
13.0.0.0/24 is subnetted, 1 subnets
D 13.0.0.0 [90/3193856] via 24.0.0.2, 00:00:50, Serial1/0
R4#
|
R4#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 88/120/156 ms
R4#
|
R4#ping 2.2.2.2 ?
data specify data pattern
df-bit enable do not fragment bit in IP header
repeat specify repeat count
表示我们需要发送多少个数据包
size specify datagram size
如果怀疑报文由于延迟过长或者分段失败而丢失,则可以提高报文的大小。例如,我们可以使用1600字节的报文来强制分段。
source specify source address or name
源地址
timeout specify timeout interval
如果怀疑超时是由于响应过慢而不是报文丢失,则可以提高该值。
validate validate reply data
<cr>
|
R4#ping 2.2.2.2 repeat 100 size 1000 source 1.1.1.1
Type escape sequence to abort.
Sending 100, 1000-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 76/116/196 ms
|
R4#ping 扩展ping就只输入这一个单词
Protocol [ip]: 使用什么协议,默认的是IP协议
Target IP address: 2.2.2.2 目标地址
Repeat count [5]: 10 发送多少个数据包
Datagram size [100]: 1000 如果怀疑报文由于延迟过长或者分段失败而丢失,则可以提高报文的大小。例如,我们可以使用1600字节的报文来强制分段。
Timeout in seconds [2]: 5 如果怀疑超时是由于响应过慢而不是报文丢失,则可以提高该值。默认2秒
Extended commands [n]: y 这里是否使用扩展命令,输入Y表示使用
Source address or interface: 1.1.1.1 源地址,必须是路由器接口的地址。
Type of service [0]: 根据RFC 791 TOS规定的属性,通常缺省值为0。
Set DF bit in IP header? [no]: 通过设置DF位禁止分段,即使是报文超过了路由器定义的MTU也禁止分段。
Validate reply data? [no]:
Data pattern [0xABCD]: 通过改变数据模式可以测试线路的噪声。
Loose, Strict, Record, Timestamp, Verbose[none]: r 这些都是IP报文头的属性。一般只使用Record属性和Verbose,其他属性很少被使用。Record可以用来记录报文每一跳的地址,Verbose属性给出每一个回应应答的响应时间
Number of hops [ 9 ]: 这里这项表示我们下面的“Record route:”显示多少条。
Loose, Strict, Record, Timestamp, Verbose[RV]:
Sweep range of sizes [n]: y 该属性主要用于测试大报文被丢失、处理速度过慢或者分段失败等故障
Sweep min size [76]: 500 一个包最小大小为500字节
Sweep max size [18024]: 2000 一个包最大为2000字节
Sweep interval [1]: 500
Type escape sequence to abort.
Sending 20, [500..2000]-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
Packet has IP options: Total option bytes= 39, padded length=40
Record route: <*>
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
Reply to request 0 (100 ms) (
size 500). Received packet has options
Total option bytes= 40, padded length=40
Record route:
(24.0.0.4)
(12.0.0.2)
(13.0.0.1)
(2.2.2.2)
(13.0.0.3)
(12.0.0.1)
(24.0.0.2)
(1.1.1.1) <*>
(0.0.0.0)
End of list
Reply to request 1 (120 ms) (
size 1000). Received packet has options
Total option bytes= 40, padded length=40
Record route:
(24.0.0.4)
(12.0.0.2)
(13.0.0.1)
(2.2.2.2)
(13.0.0.3)
(12.0.0.1)
(24.0.0.2)
(1.1.1.1) <*>
(0.0.0.0)
End of list
Reply to request 2 (112 ms) (
size 1500). Received packet has options
Total option bytes= 40, padded length=40
Record route:
(24.0.0.4)
(12.0.0.2)
(13.0.0.1)
(2.2.2.2)
(13.0.0.3)
(12.0.0.1)
(24.0.0.2)
(1.1.1.1) <*>
(0.0.0.0)
End of list
Reply to request 3 (128 ms) (
size 2000). Received packet has options
Total option bytes= 40, padded length=40
Record route:
(24.0.0.4)
(12.0.0.2)
(13.0.0.1)
(2.2.2.2)
(13.0.0.3)
(12.0.0.1)
(24.0.0.2)
(1.1.1.1) <*>
(0.0.0.0)
End of list
Reply to request 4 (84 ms) (
size 500). Received packet has options
Total option bytes= 40, padded length=40
Record route:
(24.0.0.4)
(12.0.0.2)
(13.0.0.1)
(2.2.2.2)
(13.0.0.3)
(12.0.0.1)
(24.0.0.2)
(1.1.1.1) <*>
(0.0.0.0)
End of list
Reply to request 5 (80 ms) (
size 1000). Received packet has options
Total option bytes= 40, padded length=40
Record route:
(24.0.0.4)
(12.0.0.2)
(13.0.0.1)
(2.2.2.2)
(13.0.0.3)
(12.0.0.1)
(24.0.0.2)
(1.1.1.1) <*>
(0.0.0.0)
End of list
Reply to request 6 (84 ms) (
size 1500). Received packet has options
Total option bytes= 40, padded length=40
Record route:
(24.0.0.4)
(12.0.0.2)
(13.0.0.1)
(2.2.2.2)
(13.0.0.3)
(12.0.0.1)
(24.0.0.2)
(1.1.1.1) <*>
(0.0.0.0)
End of list
Reply to request 7 (116 ms) (
size 2000). Received packet has options
Total option bytes= 40, padded length=40
Record route:
(24.0.0.4)
(12.0.0.2)
(13.0.0.1)
(2.2.2.2)
(13.0.0.3)
(12.0.0.1)
(24.0.0.2)
(1.1.1.1) <*>
(0.0.0.0)
End of list
Reply to request 19 (100 ms) (size 2000). Received packet has options
Total option bytes= 40, padded length=40
Record route:
(24.0.0.4)
(12.0.0.2)
(13.0.0.1)
(2.2.2.2)
(13.0.0.3)
(12.0.0.1)
(24.0.0.2)
(1.1.1.1) <*>
(0.0.0.0)
End of list
Success rate is 100 percent (20/20), round-trip min/avg/max = 80/101/136 ms
|
R4#traceroute 2.2.2.2 source 1.1.1.1
Type escape sequence to abort.
Tracing the route to 2.2.2.2
1 24.0.0.2 100 msec 52 msec 28 msec
2 12.0.0.1 172 msec 56 msec 44 msec
3 13.0.0.3 152 msec * 92 msec
R4#
|
R4#traceroute 直接输入traceroute
Protocol [ip]: 基于那种协议
Target IP address: 2.2.2.2 目标地址
Source address: 1.1.1.1 源地址
Numeric display [n]: 默认值是有一个符号和数字显示; 然而,您能抑制符号显示。
Timeout in seconds [3]: 等待对探针信息包的一种回应的秒钟的数量。默认值是3秒。
Probe count [3]: 将被发送的探测的数量在每个TTL级别。默认计数是3。
Minimum Time to Live [1]: 第一次探测的TTL值。默认值是1 ,但可以设 置为一个高价值抑制已知跳跃显示。
Maximum Time to Live [30]: 能使用的最大的TTL值。默认值是30。 traceroute命令终止当目的地 到达时或当此值达到时。
Port Number [33434]: UDP探测消息使用的目 的地端口。 默认值是33434。
Loose, Strict, Record, Timestamp, Verbose[none]: IP头选项。您能指定所有组合。 traceroute命令发出提 示对于要求的字段。注意 traceroute命令在每次探测将安置请求的选项 ; 然而,没有保证所有路由器(或端节点)将处理选项
Type escape sequence to abort.
Tracing the route to 2.2.2.2
1 24.0.0.2 40 msec 28 msec 32 msec
2 12.0.0.1 60 msec 76 msec 92 msec
3 13.0.0.3 128 msec * 72 msec
R4#
|