R2 和 R3 不能互相 ping 通

网络工程 思科 路由 路由器
2022-02-06 03:58:23

下面是配置的捕获。R1 可以 ping 通其他两台路由器,但 R2 和 R3 不能互相 ping 通。知道我的问题可能是什么吗?屏幕截图 2018-09-03 下午 2.57.00.png在此处输入图像描述

Router2#sh 运行

interface GigabitEthernet0/0 
ip address 192.168.2.2 255.255.255.240 
duplex auto 
speed auto 

路由器1:

interface GigabitEthernet0/0 
ip address 192.168.2.1 255.255.255.240 
duplex auto 
speed auto 
! 
interface GigabitEthernet0/1 
no ip address 
duplex auto 
speed auto 
shutdown 
! 
interface Serial0/0/0 
ip address 192.168.2.17 255.255.255.240 
clock rate 2000000 

路由器3:

interface Serial0/0/0 
ip address 192.168.2.18 255.255.255.240 
! 
interface Serial0/0/1 
no ip address 
clock rate 2000000 
shutdown 
! these are the changes made to the routers 
2个回答

由于您没有包含完整的路由器配置,我必须假设您没有配置任何静态路由或路由协议。

路由器通过三种方式学习路由:

  • 直连网络
  • 静态配置的路由
  • 动态通过路由协议

路由器 2 不知道路由器 1 另一端的网络,路由器 3 也是如此。如果路由器有一个目标是未知网络的数据包,它会丢弃该数据包。路由器 2 不知道如何到达路由器 3 的网络,所以它丢弃了发往路由器 3 的数据包,而路由器 3 不知道路由器 2 的网络,所以它丢弃了发往路由器 2 的数据包。应该。

您要么需要在路由器 2 和路由器 3 上配置静态路由,要么需要在路由器上运行通用路由协议。

在路由器 2 上,您可以创建静态路由:

ip route 192.168.2.16 255.255.255.240 192.168.2.1

在路由器 3 上,您可以创建静态路由:

ip route 192.168.2.0 255.255.255.240 192.168.2.17

如图所示,R1 可以 ping 通 R2 和 R3,因为这两个网络都是直接连接的网络。

为了确保从 R2 和 R3 路由 ping 成功,需要在 R2 和 R3 路由器中配置

R2 路由器

IP route 192.168 .2.18 255.255.255.255 pointing towards gateway 192.168.2 .1

R3 路由器

IP route 192.168 .2.2 255.255.255.255 pointing towards gateway 192.168.2.17

一世