「思科网络实验001例」配置接口IPv4地址并查看状态信息

2023-10-31 12:19:52

实验目标

学习并掌握在思科路由器上配置IPv4地址,使用ping命令测试连通性。

实验难度

★★☆☆☆☆☆☆☆

实验拓扑


实验任务

任务1:配置两台路由器的主机名。

任务2:配置路由器接口的IP地址。

任务3:使用合适的命令检查以下内容:

  1. 已经配置IP地址的接口汇总信息
  2. 接口状态
  3. 接口的子网掩码

实验配置

任务1:

Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R1 R1(config)#

R3配置类似,请自行完成,以检验学习效果并熟悉配置命令。

任务2:

R1(config)#interface s0/0/0 R1(config-if)#ip address 172.16.1.1 255.255.255.252 R1(config-if)#

R3(config)#interface s0/0/0 R3(config-if)#ip add 172.16.1.2 255.255.255.252 R3(config-if)#exit R3(config)#interface loopback 10 %LINK-5-CHANGED: Interface Loopback10, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback10, changed state to up R3(config-if)#ip add 192.168.10.1 255.255.255.0 R3(config-if)#

同样的,R3另外两个loopback接口请自己练习完成配置。

任务3:

R3#show ip interface brief Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset administratively down down FastEthernet0/1 unassigned YES unset administratively down down Serial0/0/0 172.16.1.2 YES manual administratively down down Loopback10 192.168.10.1 YES manual up up Loopback20 192.168.20.1 YES manual up up Loopback30 192.168.30.1 YES manual up up Vlan1 unassigned YES unset administratively down down

配置完成后,在R3路由器使用show ip interface brief命令查看已经配置IP的接口汇总信息时,发现serial0/0/0并未up,status下显示administratively down。原因是我们开始配置两台路由器串口时候,并未使用no shutdown命令来启用路由器的串口,默认是关闭的。所以使用命令在两台路由器启用串口:

R3(config)#interface s0/0/0 R3(config-if)#no shutdown %LINK-5-CHANGED: Interface Serial0/0/0, changed state to down R3(config-if)#end R1(config)#interface s0/0/0 R1(config-if)#clock rate 64000 R1(config-if)#no shutdown %LINK-5-CHANGED: Interface Serial0/0/0, changed state to up R1(config-if)#end

然后在R3使用命令show interface s0/0/0查看接口状态和掩码信息,如下:

R3#show interfaces s0/0/0 Serial0/0/0 is up, line protocol is down (disabled) Hardware is HD64570 Internet address is 172.16.1.2/30 MTU 1500 bytes, BW 128 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input never, output never, output hang never R3#

最后在R3 ping R1串口s0/0/0的地址172.16.1.1,如下:

R3#ping 172.16.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 22/29/33 ms R3#

上面就是这个系列第一个网络实验。

我是成都-野猪,有些同行也许认识我,但是我也想结交更多的志同道合的朋友,一起交流学习提升大家的能力。有什么想法我们可以在评论区交流或者私信我。怕失联可以关注我或者点赞收藏。因为我技术能力也有限,有些时候细节可能会有点不准确,请给我指出来我修正。

一个人的认知、能力和资源是有限的,所以想通过社群把朋友们汇集起来,日常共同学习交流,共同进步。