重发布实验

重发布实验:
一、实验要求:
1、使用双点双向重发布
2、所有路由器进行最佳选路
3、存在备份路径,不得出现环路,和路由回馈
二、实验拓扑图:
在这里插入图片描述
三、简介重发布:
一台设备同时运行于两个协议或两个进程,默认从两端学习到的路由条目不一、共享;重发布技术就是人为的进行共享;
关注点:
(1)、必须存在ASBR — 自治系统边界路由器—协议边界路由器
(2)、必须考虑种子度量(seed metric)—协议间共享路由时,度量无法携带到新的路由协议中,需要在ASBR导入路由时添加起始度量;
2、规则:
(1)、将A协议发布到B协议时,在ASBR上的B协议中配置;
(2)、将A协议发布到B协议时,将ASBR上所有通过A协议学习,及ASBR直连到A协议中的所有路由全部共享到B协议中;
3、名词:
(1)、单点单向重发布
(2)、单点双向重发布
(3)、多点单向(双向)重发布
4、配置:
A–>B 将一种动态路由协议发布到另一种动态路由协议中
静态—>B 将ASBR上的静态路由发布到动态路由协议中
直连—>B 将ASBR上非B协议内工作的直连路由发布到B(动态路由协议)中
四、配置:
R1的配置:
R1(config)#router ospf 1
R1(config-if)#int s2/1
R1(config-if)#ip address 13.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#int lo 1
R1(config-if)#ip address 1.1.1.1 255.255.255.0

R2的配置:
R2(config)#interface s2/0
R2(config-if)#ip address 12.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#int lo 1
R2(config-if)#ip address 2.2.2.2 255.255.255.0
R2(config-if)#int s2/1
R2(config-if)#ip address 24.1.1.1 255.255.255.0
R2(config-if)#no shutdown

R3的配置:
R3(config)#interface s2/0
R3(config-if)#ip address 34.1.1.2 255.255.255.0
R3(config-if)#int lo 1
R3(config-if)#ip address 3.3.3.3 255.255.255.0
R3(config-if)#no shutdown

R4的配置:
R4#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#int s2/0
R4(config-if)#ip address 24.1.1.2 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#int lo 1
R4(config-if)#ip address 4.4.4.4 255.255.255.0
R4(config-if)#int s2/1
R4(config-if)#ip address 34.1.1.1 255.255.255.0
R4(config-if)#no shutdown

启rip协议
R1:
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 1.0.0.0
R1(config-router)#network 12.0.0.0
R1(config-router)#network 13.0.0.0

R2:
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#network 12.0.0.0
R2(config-router)#network 2.0.0.0
R2(config-router)#exit
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 24.1.1.1 0.0.0.0 a 0

R3:
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 13.0.0.0
R3(config-router)#exit
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 3.3.3.3 0.0.0.0 a 0
R3(config-router)#network 34.1.1.2 0.0.0.0 a 0
R4:
R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 24.1.1.2 0.0.0.0 a0
R4(config-router)#network 24.1.1.2 0.0.0.0 a 0
R4(config-router)#network 4.4.4.4 0.0.0.0 a 0
R4(config-router)#network 34.1.1.1 0.0.0.0 a 0
R4(config-router)#end

在ASBR上进行手动重发布:
R2(config)#router rip
R2(config-router)#redistribute ospf 1 metric 1
R2(config-router)#exit
R2(config)#router ospf 1
R2(config-router)#redistribute rip subnets
Subnets:必须携带,否则无法导入无类别路由;
注:默认导入路由为类型2;
类型2—种子度量为20,在内部传递时,不叠加内部的度量值;
若存在多台ASBR设备需要导入相同的路由时,可以将类型修改为1

多点双向重发布:
R3(config)#router rip
R3(config-router)#redistribute ospf 1 metric 1
R3(config-router)#exit
R3(config)#router ospf 1
R3(config-router)#redistribute rip subnets
R3(config-router)#end
点到点:
R4(config)#interface loopback 1
R4(config-if)#ip ospf network point-to-point

改管理距离进行选路(小优):
R3(config)#router ospf 1
R3(config-router)#distance 121 2.2.2.2 0.0.0.0
R3(config-router)#end

R2(config)#router ospf 1
R2(config-router)#distance 121 3.3.3.3 0.0.0.0
R2(config-router)#end

分发列表(ACL):
R3(config)#access-list 1 permit 2.2.2.0
R3(config)#router rip
R3(config-router)#offset-list 1 out 2 serial 2/1
水平分割
做策略
R2上:
R2(config)#route-map haha permit 10
R2(config-route-map)#match ip address prefix-list haha
R2(config)#ip prefix-list haha permit 34.1.1.0/24
R2(config)#route-map haha permit 10
R2(config-route-map)#match ip address prefix-list haha
R2(config-route-map)#set metric 5
R2(config-route-map)#router rip
R2(config-router)#redistribute ospf 1 route-map haha
R2(config-router)#exit
R2(config)#route-map haha permit 20
R2(config-route-map)#exit

R3上:
R3(config)#ip prefix-list hah permit 24.1.1.0/24
R3(config)#route-map hah permit 10
R3(config-route-map)#match ip address prefix-list haha
R3(config-route-map)#set metric 5
R3(config-route-map)#exit
R3(config)#route-map haha permit 20

单点双向重发布
R2:
R2(config)#ip prefix-list xixi permit 12.1.1.0/24
R2(config)#ip prefix-list xixi permit 2.2.2.0/24
R2(config)#route-map xixi permit 10
R2(config-route-map)#match ip address prefix-list xixi
R2(config-route-map)#exit
R2(config)#route-map xixi permit 20
R2(config-route-map)#exit
R2(config)#router ospf 1
R2(config-router)#redistribute rip subnets route-map xixi

R3:
R3(config)#router rip
R3(config-router)#redistribute ospf 1 route-map haha
R3(config-router)#exit
R3(config)#ip prefix-list xixi permit 13.1.1.0/24
R3(config)#route-map xixi permit 10
R3(config-route-map)#match ip address prefix-list xixi
R3(config-route-map)#set metric 10
R3(config-route-map)#exit
R3(config)#route-map xixi permit 20
R3(config-route-map)#exit
R3(config)#router ospf 1
R3(config-router)#redistribute rip subnets route-map xi xi

改变管理距离:
R2(config)#access-list 12 permit 3.3.3.0
R2(config)#router ospf 1
R2(config-router)#distance 121 3.3.3.3 0.0.0.0 12
R2(config-router)#end
R2(config)#access-list 12 permit 2.2.2.0
R2(config)#end

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值