在教师指导下,完成实验环境的搭建。
RTA的配置如下:
[H3C]sysname RTA
[RTA]interface GigabitEthernet 0/0
[RTA-GigabitEthernet0/0]ip add192.168.0.1 24
[RTA]interface GigabitEthernet 0/1
[RTA-GigabitEthernet0/1]ip add 192.168.1.1 24
[RTA]ping 192.168.0.10
PING 192.168.1.2: 56 data bytes, press CTRL_C to break
Reply from 192.168.0.10: bytes=56Sequence=1 ttl=255 time=27 ms
Reply from 192.168.0.10: bytes=56Sequence=2 ttl=255 time=27 ms
Reply from 192.168.0.10: bytes=56Sequence=3 ttl=255 time=27 ms
Reply from 192.168.0.10: bytes=56Sequence=4 ttl=255 time=26 ms
Reply from 192.168.0.10: bytes=56Sequence=5 ttl=255 time=26 ms
--- 192.168.0.10 ping statistics---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 26/26/27ms
结果显示,RTA收到了ICMP的Echo Reply报文,RTA可以ping通PCA。反之亦然。
这里路由器默认是发送5个ICMP请求报文,大小是56bytes,所以PING成功后,会收到5个Reply报文。而Windows默认是发送4个ICMP请求报文,大小是32bytes。
查看路由器ping命令可携带的参数。使用的完整命令为:
<RTA>ping ?
再次检查对PCA的连通性,使用的完整命令依次为:
<RTA>ping -c 50 192.168.0.10
<RTA>ping -s 512 192.168.0.10
<RTA>ping -a 192.168.1.1 192.168.0.10
ping 192.168.1.1
tracert 192.168.1.10
总共2跳,第一跳为RTA,第二跳到达PCB。
<RTA>tracert 192.168.1.10
总共1跳,第一跳到达PCB。
查看路由器tracert命令携带的参数。使用的完整命令为:
<RTA>tracert ?
<RTB>terminal monitor
% Current terminal monitor is on.
<RTB>terminal debugging
% Current terminal debugging is on.
<RTB>debugging ip icmp
ping -n 10 192.168.0.1
在RTA上的debugging信息输出类似于:
*Sep 12 08:07:17:460 2008 RTB IPDBG/7/debug_icmp:
ICMP Receive: echo(Type=8, Code=0), Src = 192.168.0.10, Dst = 192.168.0.1
*Sep 12 08:07:17:460 2008 RTB IPDBG/7/debug_icmp:
ICMP Send: echo-reply(Type=0, Code=0), Src = 192.168.0.1, Dst = 192.168.0.10
*Sep 12 08:07:17:686 2008 RTB IPDBG/7/debug_icmp:
ICMP Receive: echo(Type=8, Code=0), Src = 192.168.0.10, Dst = 192.168.0.1
*Sep 12 08:07:17:686 2008 RTB IPDBG/7/debug_icmp:
ICMP Send: echo-reply(Type=0, Code=0), Src = 192.168.0.1, Dst = 192.168.0.10
<RTA>undo debugging all