第二个路由器网络上的计算机未与当前路由器联系

网络工程 思科 数据包跟踪器
2022-02-23 06:15:34

我正在使用 Cisco Packet Tracer,同一网络上的计算机可以轻松地相互联系,但是当我从网络计算机向另一台计算机发送消息时,我收到 FAILED 消息。

附上配置文件,这张图片说明了我的情况,请问我可以得到一些帮助吗?

在此处输入图像描述

下载示踪剂文件

左侧网络 PC 的网关(0、2、1)

10.1.4.1

右侧网络 PC 的网关(3、4)

10.1.3.0

路由器 A CLI:

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#router rip
Router(config-router)#
Router(config-router)#exit
Router(config)#interface FastEthernet0/1
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/1
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/1
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 10.1.4.1 255.0.0.0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to down

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

Router(config-if)#exit
Router(config)#router rip
Router(config-router)#no network 10.0.0.0
Router(config-router)#no network 172.20.0.0
Router(config-router)#network 172.20.0.0
Router(config-router)#network 10.0.0.0
Router(config-router)#no network 10.0.0.0
Router(config-router)#
Router(config-router)#exit
Router(config)#ip route 172.21.0.0 255.255.0.0 10.1.4.1
%Invalid next hop address (it's this router)
Router(config)#ip route 172.21.0.0 255.255.0.0 10.1.4.1
%Invalid next hop address (it's this router)
Router(config)#ip route 172.21.0.0 255.255.0.0 10.1.4.1
%Invalid next hop address (it's this router)
Router(config)#
Router(config)#interface FastEthernet0/0
Router(config-if)#no ip address
Router(config-if)#








Router con0 is now available






Press RETURN to get started.












%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up


Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router(config-router)#no network 10.0.0.0
Router(config-router)#
Router(config-router)#exit
Router(config)#ip route 172.21.0.0 255.255.0.0 10.1.4.1
Router(config)#ip route 172.10.0.0 255.255.0.0 10.1.4.1
Router(config)#ip route 172.23.0.0 255.255.0.0 10.1.8.2
Router(config)#








Router con0 is now available






Press RETURN to get started.













Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/1
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 10.1.4.1 255.0.0.0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#








Router con0 is now available






Press RETURN to get started.













Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#

路由器 B CLI:

Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#router rip
Router(config-router)#
Router(config-router)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router(config-router)#
Router(config-router)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#ip address 172.21.0.1 255.0.0.0
Router(config-if)#no ip address
Router(config-if)#ip address 172.21.0.1 255.255.0.0
Router(config-if)#
Router(config-if)#exit
Router(config)#
Router(config)#router rip
Router(config-router)#








Router con0 is now available






Press RETURN to get started.













Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface Serial0/0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#no ip address
Router(config-if)#shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to administratively down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to down

Router(config-if)#exit
Router(config)#interface FastEthernet0/1
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/1
Router(config-if)#ip address 172.21.0.1 255.255.0.0
Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/1
Router(config-if)#no ip address
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#ip address 172.21.0.1 255.255.0.0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

Router(config-if)#exit
Router(config)#router rip
Router(config-router)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
network 172.10.0.0
Router(config-router)#no network 172.21.0.0
Router(config-router)#no network 172.10.0.0
Router(config-router)#no network 10.0.0.0
Router(config-router)#network 172.21.0.0
Router(config-router)#








Router con0 is now available






Press RETURN to get started.












%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up


Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#
Router(config-if)#end
Router#erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
%SYS-5-CONFIG_I: Configured from console by console
N
Router#
Router#
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface Serial0/0/0
Router(config-if)#
Router(config-if)#end
Router#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 10.1.3.0 255.0.0.0
Router(config-if)#








Router con0 is now available






Press RETURN to get started.













Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#

show ip route每个路由器的输出:

路由器 B

    Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

C 10.0.0.0/8 is directly connected, FastEthernet0/0
C 172.21.0.0/16 is directly connected, Serial0/0/0

路由器 A

    Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

C 10.0.0.0/8 is directly connected, FastEthernet0/0
C 172.20.0.0/16 is directly connected, Serial0/0/0
3个回答

串口配置不正确。您可以在 172.21.0.0/16 内配置它们,但每一端都必须在该子网中有一个 IP 地址。

当 RIP 处于活动状态时,路由应通过的串行接口。如果没有 RIP,每台路由器都需要通过对方路由器的串行端口路由到另一端的 PC 子网。您不能使用面向 PC 的 IP 地址。

终于拿到了 PT 版本 7。

是的,正如@Zac67 所指出的,检查串行端口。

从您共享的文件中并在更改串行端口 IP 子网后,它仍然无法正常工作。如果您检查两个路由器都没有在“show ip route”中显示 RIP 路由的字母“R”,但是当您运行“show ip protocols”时,它确实说 RIP 正在为两个子网做广告,甚至在运行调试时也会反映出来。

如果您检查两个路由表,都看到 10.0.0.0/8 直接连接。由于某种原因,RIP 在更新从另一个对等方发送的路由时不喜欢这个事实。

水平分割似乎是关键,因为它们都在通告相同的子网 10.0.0.0/8,并且如您所知,除非发生循环预防机制,否则这将创建一个循环。

无论如何,我将子网从另一组 PC 更改为 192.168.4.0 ,添加 RIP 作为版本 2 并且它工作。

您可以通过以下链接下载修改后的实验室版本。

正如@zac67 指出的那样,您的串行接口是错误的。它们需要在同一个子网中(您可以通过尝试从另一个路由器 ping 一个路由器的串行接口来测试这一点)。您正在使用网络地址(子网中的第一个 IP)而不是主机地址。

如果您已配置 RIP,您应该能够删除所有静态路由。