实验三,,,设备基本配置
实验三 三 网络基本设备调试命令 一、实验目的:
进行网络设备的基本配置 使用 ping 命令进行网络连通性测试 使用 debug 命令查看调试信息 二、实验描述及组网图:
三、实验步骤:
步骤一:对设备进行基本的配置。
1、对主机 PCA 的 IP 地址进行设置:
将 IP 地址设置为 192.168.0.2 子网掩码为 255.255.255.0 网关为 192.168.0.1 2、PCB 的配置:
3、配置路由器 配置 E0/0 的 ip 地址为 192.168.0.1 [H3C]int e0/0 [H3C-Ethernet0/0]ip add 192.168.0.1 24 配置 E0/1 的 ip 地址为 192.168.1.1 [H3C]int e0/1 [H3C-Ethernet0/1]ip add 192.168.1.1 24 交换机不需要进行其他的一些配置。
通过这样的配置能够使 PCA 和 PCB 之间相互连通。
步骤二:通过 g ping 命令测试连通性 1、打开【开始】菜单选择“运行”,输入“cmd”命令,进入命令提示符窗口。
PCA 为例使用 ping 命令检查与 192.168.0.1 网关的连通性。
G:Documents and Settingsjiance_pc>ping 192.168.0.1 Pinging 192.168.0.1 with 32 bytes of data: Reply from 192.168.0.1: bytes=32 time<1ms TTL=255 Reply from 192.168.0.1: bytes=32 time<1ms TTL=255 Reply from 192.168.0.1: bytes=32 time<1ms TTL=255 Reply from 192.168.0.1: bytes=32 time<1ms TTL=255 Ping statistics for 192.168.0.1: Packets: Sent = 4, Received = 4, Lost = 0(0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms
“Reply from 192.168.0.1: bytes=32 time<1ms TTL=255” 表示从 192.168.0.1 返回给主机的数据包大小为 32 个字节,时间小于 1ms,ttl 生存时间为 255。
“Packets: Sent = 4”可以看到主机向网关路由器发了四个 icmp 请求报文,“Received = 4”路由器返回给主机四个相应报文。“Lost = 0(0% loss)”,表明能够与路由器建立连通。
Windows 默认发送 4 个 ICMP 报文,大小是 32 字节。但是可以通过一些参数进行修改。后面会给大家介绍。而在路由器默认是发送 5 个 ICMP 请求报文 2、通过 ping 命令检查 PCA 与 PCB 的网关的连通性 G:Documents and Settingsjiance_pc>ping 192.168.1.1 Pinging 192.168.1.1 with 32 bytes of data: Reply from 192.168.1.1: bytes=32 time=13ms TTL=255 Reply from 192.168.1.1: bytes=32 time=4ms TTL=255 Reply from 192.168.1.1: bytes=32 time=8ms TTL=255 Reply from 192.168.1.1: bytes=32 time=8ms TTL=255 Ping statistics for 192.168.1.1: Packets: Sent = 4, Received = 4, Lost = 0(0% loss), Approximate round trip times in milli-seconds: Minimum = 4ms, Maximum = 13ms, Average = 8ms 表明主机能够与路由器的另一个接口也就是 PCB 的网关进行通信。
3、测试 PCA 与 PCB 的连通性 G:Documents and Settingsjiance_pc>ping 192.168.1.1 Pinging 192.168.1.1 with 32 bytes of data: Reply from 192.168.1.1: bytes=32 time=13ms TTL=255 Reply from 192.168.1.1: bytes=32 time=4ms TTL=255 Reply from 192.168.1.1: bytes=32 time=8ms TTL=255 Reply from 192.168.1.1: bytes=32 time=8ms TTL=255 Ping statistics for 192.168.1.1: Packets: Sent = 4, Received = 4, Lost = 0(0% loss), Approximate round trip times in milli-seconds: Minimum = 4ms, Maximum = 13ms, Average = 8ms 可以判断 PCA 与 PCB 能够建立连通性,他们之间能够进行通信。
4、Ping 命令的参数使用:
Ping 命令后面可以加一些命令来修改 ping 命令中的参数。
-i Select the interface to send the packets-m Specify the interval in milliseconds to send packets-n Numeric output only.No attempt will be made to lookup host addresses for symbolic names-p No more than 8 "pad" hexadecimal characters to fill out the sent packet.For example,-p f2 will fill the sent packet with f and 2 repeatedly-q Quiet output.Nothing will be displayed except for the summary lines.-r Record route.Include the RECORD_ROUTE option in the ECHO_REQUEST packets and display the route-s Specify the number of data bytes to be sent-t Specify the time in milliseconds to wait for each reply-tos Specify TOS value for echo requests to be sent-v Display the received ICMP packets other than ECHO-RESPONSE packets.STRING<1-20> IP address or hostname of a remote system ip IP Protocol ipv6 IPv6 Protocol-a 设定 ping 报文的源地址,在网络调试中经常使用加源 ping 的方式进行检查网络的连通性。
-c 用来设定发送 ping 报文的个数。
-s 用来设定发送报文的字节大小。
注:这里写的 ping 命令后面跟的参数为路由器中 ping 命令使用的参数。与Windows 中的参数有所不同。
步骤三:t tracert 命令的使用。
1、在 PCA 上 tracert PCB G:Documents and Settingsjiance_pc>tracert 192.168.1.10 Tracing route to 192.168.1.10 over a maximum of 30 hops 1 <1 ms <1 ms <1 ms 192.168.0.1 2 <1 ms <1 ms <1 ms 192.168.1.10 Trace complete.2、在路由器上 tracertPCB [H3C]tracert 192.168.1.10 traceroute to 192.168.1.10(192.168.1.10)30 hops max,40 bytes packet, press CTR L_C to break 1 192.168.1.10 1 ms 1 ms 1 ms
步骤四:通过 g debug 命令 1、对于网络中的绝大部分的协议和功能,系统都提供了相应的调试功能,帮助用户进 行诊断和定位。调试信息的输出有两个开关控制,
可以通过“?”来查看哪些协议能够被调试。
2、在 PCA 中 ping 路由器的 192.168.1.1 接口。
查看路由器的显示信息:
版权声明:
1.大文斗范文网的资料来自互联网以及用户的投稿,用于非商业性学习目的免费阅览。
2.《实验三,,,设备基本配置》一文的著作权归原作者所有,仅供学习参考,转载或引用时请保留版权信息。
3.如果本网所转载内容不慎侵犯了您的权益,请联系我们,我们将会及时删除。
