侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

RIP配置

2022-12-04 星期日 / 0 评论 / 0 点赞 / 36 阅读 / 4792 字

拓扑如下:IP地址分配如下:设备接口IpPC0F0/010.1.1.10/24 GW10.1.1.1PC1F0/010.1.2.10/24PC2F0/010.1.6.10/24R1G0/010.1.1

.

拓扑如下:

IP地址分配如下:

设备

接口

Ip

PC0

F0/0

10.1.1.10/24 GW10.1.1.1

PC1

F0/0

10.1.2.10/24

PC2

F0/0

10.1.6.10/24

R1

G0/0

10.1.1.1/24

G0/1

10.1.4.1/24

G0/2

10.1.3.1/24

Loopback 1

172.16.1.1/24

Loopback 2

172.16.2.1/24

R2

G0/0

10.1.2.1/24

G0/1

10.1.5.1/24

G0/2

10.1.3.2/24

R3

G0/0

10.1.4.2/24

G0/1

10.1.5.2/24

G0/2

10.1.6.1/24

R1配置:

R1(config)#interface g0/0

R1(config-if)#ip address 10.1.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config)#interface g0/1

R1(config-if)#ip address 10.1.4.1 255.255.255.0

R1(config-if)#no shutdown

R1(config)#interface g0/2

R1(config-if)#ip address 10.1.3.1 255.255.255.0

R1(config-if)#no shutdown

R1(config)#interface loopback 1

R1(config-if)#ip address 172.16.1.1 255.255.255.0

R1(config)#interface loopback 2

R1(config-if)#ip address 172.16.2.1 255.255.255.0

R1(config)#route rip    开启rip

R1(config-route)#version 2 设置版本

R1(config-route)#network 10.0.0.0 宣告主网络


其他路由和172.16.1.1、172.16.2.1通信,在R1上需要宣告172.16.0.0网络:

R1(config)#route rip    

R1(config-route)#version 2

R1(config-route)#network 172.16.0.0 宣告主网络



R2配置:

同样也在R2上设置RIP版本,及宣告网络

R2(config)#route rip

R2(config-route)#version 2

R2(config-route)#network 10.0.0.0


R3配置:

R3(config)#route rip

R3(config-route)#version 2

R3(config-route)#network 10.0.0.0


使用show ip route命令在R1上查看到已经学习到了非直连路由:

在PC0上测试和非直连路由连通性:


在R1使用debug ip rip,我们看到G0-3都在发送RIP消息


在R2上使用show ip route,可以看到R2学习到的路由不是精确的:

这是由于在R1上开启了自动汇总功能:

在R1使用show ip protocols ,可以看到开启了自动汇总功能。

要使R2学习到精确路由,在R1上关闭自动汇总即可:

R1(config)#route rip

R1(config-route)#no auto-summary  关闭自动汇总

再在R2上使用show ip route 查看,可以看到R2已经学到精确路由

前面说到R1的G0-2接口都在往外发送RIP消息,G0/0接口连接到的是PC所以没必要发送该消息,我们可以把G0/0接口改成被动模式,就不会往外发送消息了,

R1(config)#route rip

R1(config-route)#passive-interface gigabitEthernet 0/0 设置为被动模式


在R1使用debug ip rip 命令查看,可以看到G0/0已经不在发送RIP消息了。


总结:关于RIP故障的排除,可以从以下几个方面入手:

①RIP版本设置不一致

②网络宣告不正确。

③所有接口都改成了被动模式了

④计时器错误,可以使用如下命令修改时间:

R1(config-route)#timers basic 60  180  180  240

.

广告 广告

评论区