R1#ping
Protocol [ip]:
Target IP address: 172.31.20.254 //ping R2地址
Repeat count [5]: 1
...
Sending 1, 100-byte ICMP Echos to 172.31.20.254, timeout is 2 seconds:
!
Success rate is 100 percent (1/1), round-trip min/avg/max = 8/8/8 ms
(debug 输出)
Apr 10 12:19:03.994:
IP: s=172.31.20.1 (local), d=172.31.20.254 (Serial4/0/0), len 100, sending
Apr 10 12:19:03.994:
ICMP type=8, code=0 R1发出一个Echo Request(type=8),R2收到后以Echo Reply 相应
Apr 10 12:19:04.002:
IP: s=172.31.20.254 (Serial4/0/0), d=172.31.20.1 (Serial4/0/0), len 100, rcvd 3
Apr 10 12:19:04.002:
ICMP type=0, code=0 R1收到Echo Reply(type=0),计算延时(002-994=8ms)。
R1#ping
Protocol [ip]:
Target IP address: 172.31.20.1 //ping R1自己的地址
Repeat count [5]: 1
...
Sending 1, 100-byte ICMP Echos to 172.31.20.1, timeout is 2 seconds:
!
Success rate is 100 percent (1/1), round-trip min/avg/max = 16/16/16 ms
(debug 输出)
Apr 10 12:18:00.106:
IP: s=172.31.20.1 (local), d=172.31.20.1 (Serial4/0/0), len 100, sending
Apr 10 12:18:00.106:
ICMP type=8, code=0 R2发出一个Echo Request(type=8)
Apr 10 12:18:00.114:
IP: s=172.31.20.1 (Serial4/0/0), d=172.31.20.1 (Serial4/0/0), len 100, rcvd 3
Apr 10 12:18:00.114:
ICMP type=8, code=0 R2收到Echo Request,判断的目标地址为R1,所以将包发回
Apr 10 12:18:00.114:
IP: s=172.31.20.1 (local), d=172.31.20.1 (Serial4/0/0), len 100, sending
Apr 10 12:18:00.114:
ICMP type=0, code=0 R1收到自己发出的Echo Request,以Echo Reply(type=0)相应并通过端口发送
Apr 10 12:18:00.122:
IP: s=172.31.20.1 (Serial4/0/0), d=172.31.20.1 (Serial4/0/0), len 100, rcvd 3
Apr 10 12:18:00.122:
ICMP type=0, code=0 R2将包发回。R1收到Echo Reply (type=0),计算延时(112-106=16ms)。
|