【HCIP重发布选路实验】

双点双向重发布实验

在这里插入图片描述

实验要求

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

R1除本身环回外,外加几条环回
172.16.1.0/24 deny
172.16.2.0/24 type 1
172.16.3.0/24 cost 6
172.16.4.0/24 type 1 cost 9
更改如上参数

实验拓扑图

在这里插入图片描述

1、IP地址分配

R1:
在这里插入图片描述
R2:
在这里插入图片描述
R3:
在这里插入图片描述
R4:
在这里插入图片描述

2、启动RIP和OSPF协议(给R2、R4配置双点双向重发布)

R1:
在这里插入图片描述
R2:
在这里插入图片描述
R3:
在这里插入图片描述
R4:
在这里插入图片描述
检查R1与R3的路由表
在这里插入图片描述
在这里插入图片描述
发现通往这几条路的路由都是负载均衡。
之所以R3学到两条R4的环回,是因为OSPF学到的是子网掩码为32位的,而RIP学到的是24位的;现在两条路由均已经加表。
解决方法:

[R2-LoopBack0]ospf network-type broadcast
[R4-LoopBack0]ospf network-type broadcast

检查R3:
在这里插入图片描述
检查R1:
在这里插入图片描述

3、控制选路

先考虑当OSPF向RIP方向重发布

[R2]ip ip-prefix a permit 34.1.1.0 24
[R2]ip ip-prefix a permit 4.4.4.0 24 
[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]rip metricout ip-prefix a 3

查看R1:
在这里插入图片描述
这两条路的负载均衡已经解决
再解决23.1.1.0/24这条路:

[R4]ip ip-prefix a permit 23.1.1.0 24
[R4]int g 0/0/0
[R4-GigabitEthernet0/0/1]rip metricout ip-prefix a 3

查看R1:
在这里插入图片描述
成功!
再考虑RIP向OSPF方向重发布
R2上抓12.1.1.0和2.2.2.0的流量,类型改为1(默认为类型2,类型1优于类型2)

[R2]ip ip-prefix b permit 2.2.2.0 24
[R2]ip ip-prefix b permit 12.1.1.0 24
[R2]route-policy xixi permit node 10
Info: New Sequence of this List.
[R2-route-policy]if-match ip-prefix b 
[R2-route-policy]apply cost-type type-1
[R2-route-policy]q
[R2]route-policy xixi permit node 20
Info: New Sequence of this List.
[R2-route-policy]q
[R2]ospf 1
[R2-ospf-1]import-route rip 1 route-policy xixi

在R4上修改14.1.1.0

[R4]ip ip-prefix b permit 14.1.1.0 24
[R4]route-policy xixi permit node 10
Info: New Sequence of this List.
[R4-route-policy]if-match ip-prefix b
[R4-route-policy]apply cost-type type-1
[R4-route-policy]q
[R4]route-policy xixi permit node 20
Info: New Sequence of this List.
[R4-route-policy]q
[R4]ospf 1
[R4-ospf-1]import-route rip 1 route-policy xixi

查看R3:
在这里插入图片描述
修改成功
查看R1:
在这里插入图片描述

4 、修改R1其余环回参数

[R1]ip ip-prefix 1 permit 172.16.1.0 24
[R1]ip ip-prefix 2 permit 172.16.2.0 24
[R1]ip ip-prefix 3 permit 172.16.3.0 24
[R1]ip ip-prefix 4 permit 172.16.4.0 24

[R1]route-policy huawei deny node 10
Info: New Sequence of this List.
[R1-route-policy]if-match ip-prefix 1
[R1-route-policy]q

[R1]route-policy huawei permit node 20
Info: New	Sequence of this List.
[R1-route-policy]if-match ip-prefix 2
[R1-route-policy]apply cost-type type-1
[R1-route-policy]q

[R1]route-policy huawei permit node 30
Info: New Sequence of this List.
[R1-route-policy]if-match ip-prefix 3
[R1-route-policy]apply cost 6
[R1-route-policy]q

[R1]route-policy huawei permit node 40
Info: New Sequence of this List.
[R1-route-policy]if-match ip-prefix 4
[R1-route-policy]apply cost-type type-1
[R1-route-policy]apply cost 9
[R1-route-policy]q

[R1]route-policy huawei permit node 50
Info: New Sequence of this List.
[R1-route-policy]q

实验完成!!!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值