【HCIP】双点双向路由重发布

该实验涉及RIP和OSPF路由协议的配置,包括双点双向重发布,最佳选路,以及备份路径设置。在R1、R2、R3和R4路由器上,进行了IP地址分配,接口类型修改,路由协议版本设定,路由重发布和路由策略的制定,以防止环路并确保有备份路径。实验结果展示了R1到R3的路由配置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

实验要求

1、使用双点双向重发布
2、所有路由器进行最佳选路
3、存在备份路径,不得出现
环路,和路由回馈

实验图:
在这里插入图片描述

实验分析

1、先进行IP地址分配,左边为RIP,右边为OSPF area0
2、2,2,2,2和4.4.4.4环回可能会存在32位掩码和24位掩码的路由,所以进环回接口,将环回接口改为broadcast类型
3、备份路径需将某些路由的Cost值修改在ASBR上进行即可,路由回馈在OSPF中已经解决
4、防止出现环路,将ASBR上面的直连接口重发布入RIP和OSPF区域
5、最后添加路由规则

分析后拓朴图:
在这里插入图片描述

实验步骤

R1

[R1]int lo 0
[R1-LoopBack0]ip add 1.1.1.1 24
[R1-LoopBack0]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[R1-GigabitEthernet0/0/0]int g 0/0/01
[R1-GigabitEthernet0/0/1]ip add 14.1.1.1 24

[R1]rip 1
[R1-rip-1]ver 2
[R1-rip-1]un su
[R1-rip-1]net 12.0.0.0
[R1-rip-1]net 14.0.0.0
[R1-rip-1]net 1.0.0.0

对R2

[R2-rip-1]net 2.0.0.0
[R2-rip-1]net 12.0.0.0

[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]ar 0
[R2-ospf-1-area-0.0.0.0]net 23.1.1.1 0.0.0.0

重发布
[R2]rip 1
[R2-rip-1]import-route ospf 1

[R2]ospf 1
[R2-ospf-1]import-route rip

配置路由策略

[R2]ip  ip-prefix o-r per  
[R2]ip  ip-prefix o-r permit 34.1.1.0 24
[R2]ip ip-prefix o-r permit 4.4.4.0 24

[R2]route-policy o-r per node 10
[R2-route-policy]if-match ip-prefix  o-r
[R2-route-policy]apply cost 10
[R2-route-policy]qu
[R2]route-policy o-r p node 20  //空表默认允许所有

在RIP中调用

[R2]rip 1
[R2-rip-1]im ospf 1 route-policy  o-r
[R2]route-policy r-o per node 10
[R2-route-policy]if-match ip-prefix r-o
[R2-route-policy]apply cost 10
[R2]route-policy r-o permit node 20
[R2]ospf 1
[R2-ospf-1]import-route rip 1 route-policy r-o

对R3

[R2]int lo 0
[R2-LoopBack0]ip add 2.2.2.2 24
[R2-LoopBack0]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 23.1.1.1 24

[R2]rip 1
[R2-rip-1]ver 2
[R2-rip-1]un su
[R3]int lo 0
[R3-LoopBack0]ip add 3.3.3.3 24
[R3-LoopBack0]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 23.1.1.2 24
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 34.1.1.1 24

[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]ar 0
[R3-ospf-1-area-0.0.0.0]net 23.1.1.2 0.0.0.0
[R3-ospf-1-area-0.0.0.0]net 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]net 34.1.1.1 0.0.0.0

修改接口类型

[R3-LoopBack0]ospf n

[R3-LoopBack0]ospf network-type broadcast

对R4

[R4]int lo 0
[R4-LoopBack0]ip add 4.4.4.4 24
[R4-LoopBack0]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 34.1.1.2 24
[R4-GigabitEthernet0/0/1]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 14.1.1.2 24

[R4]rip 1
[R4-rip-1]ver 2
[R4-rip-1]un su
[R4-rip-1]net 14.0.0.0

[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]are 0
[R4-ospf-1-area-0.0.0.0]net 4.4.4.4 0.0.0.0
[R4-ospf-1-area-0.0.0.0]net 34.1.1.2 0.0.0.0

重发布
[R4]rip 1
[R4-rip-1]import-route ospf 1

[R4]ospf 1
[R4-ospf-1]import-route rip

[R4]int lo 0

[R4-LoopBack0]ospf network-type broadcast //更改接口类型

更改接口类型后R1去R4负载

在rip中调用

[R4-route-policy]if-match ip-prefix o-r
[R4-route-policy]apply cost 10
[R4]route-policy o-r per no 20
[R4-route-policy]rip 1
[R4-rip-1]im ospf 1 rou o-r

[R4]ip ip-prefix r-o per 2.2.2.0 24
[R4]ip ip-prefix r-o per 12.1.1.0 24
[R4]route-policy r-o per node 10
[R4-route-policy]if-match ip-prefix r-o
[R4-route-policy]apply cost 10
[R4-route-policy]qu
[R4]route-policy r-o per node 20
[R4-route-policy]qu
[R4]ospf 1
[R4-ospf-1]import-route rip 1 route-policy r-o

实验结果

R1
在这里插入图片描述
R3
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值