雏鹰部落

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 1665|回复: 5

[讨论/求助] 部署双点双向重分发

[复制链接]
发表于 2012-11-20 14:59:29 | 显示全部楼层 |阅读模式
实验拓扑:

实验步骤:
R1:
en
confif t
int Loo0
ip add 1.1.1.1 255.255.255.0
no shut
exit
int s 0/1
ip add 13.1.1.1 255.255.255.0
no shut
exit
int s 0/0
ip add 12.1.1.1 255.255.255.0
no shut
exit
router ospf 110
router-id 1.1.1.1
network 13.1.1.1 0.0.0.0 area 0
exit
router rip
version 2
no auto-summary
network 1.0.0.0
network 12.0.0.0
exit
router os 110//将RIP重分发进OSPF
redistribute rip subnets
exit
//////////////////////////////////顺时针方向重分发完成
router rip
redisttibute ospf 110 metric 3
//管理距离仅具有本地意义
//更改RIP域内两条路由的管理距离为109(管理距离值仅具有本地意义)
access-list 10 permit 2.2.2.0
access-list 10 permit 24.1.1.0
router rip
distance 109 12.1.1.2 0.0.0.0 10//12.1.1.2 为获取RIP路由的路由器的接口的IP地址
end
show ip route
//路由优化 ,不适用负载均衡,使其选择最优路径,修改重分发过来的路由seed metric
值,要想实现精确修改,可以调用route-map,对于距离矢量协议,可以通过使用
offset-list来实现,对于链路状态协议,可以通过修改度量值类型来实现。绝对不可使用distribute-list。
ip prefix-list 10 permit 34.1.1.0/24
ip prefix-list 10 permit 4.4.4.0/24
route-map song permit 10
match ip address prefix-list 10
set metric 4
exit
route-map song permit 20
exit
router rip
redistribute ospf 110 metric 3 route-map song
ip prefix-list 20 permit 1.1.1.0/24
ip prefix-list 20 permit 12.1.1.0/24
route-map song permit 10
match ip address prefix-list 20
set metric-type type-1
exit
route-map song permit 20
exit
router os 110
redistribute rip subnets route-map song

R2:
en
conf t
int loo0
ip add 2.2.2.2 255.255.255.0
no shut
exit
int s 0/1
ip add 12.1.1.2 255.255.255.0
no shut
exit
int s 0/0
ip add 24.1.1.2 255.255.255.0
no shut
exit
router rip
version 2
no auto-summary
network 0.0.0.0

R3:
en
conf t
int loo0
ip add 3.3.3.3 255.255.255.0
no shut
ip ospf network point-to-point
exit
int s 0/0
ip add 13.1.1.3 255.255.255.0
no shut
exit
int s 0/1
ip add 34.1.1.3 255.255.255.0
no shutdown
exit
router os 110
router-id 3.3.3.3
network 0.0.0.0 255.255.255.255 area 0
exit

R4:
en
conf t
int loo0
ip add 4.4.4.4 255.255.255.0
no shut
ip ospf network point-to-point
exit
int s 0/1
ip add 24.1.1.4 255.255.255.0
no shut
exit
int s 0/0
ip add 34.1.1.4 255.255.255.0
no shut
exit
router os 110
router-id 4.4.4.4
network 4.4.4.4 0.0.0.0 area 0
network 34.1.1.4 0.0.0.0 area 0
exit
router rip
version 2
no auto-summary
network 24.0.0.0
exit
router os 110 //更改路由的管理距离,在本地路由器上改
distance 121 1.1.1.1 0.0.0.0  10//通告者(ASBR)的IP
ex
access-list 10 permit 1.1.1.0
access-list 10 permit 12.1.1.0
access-list 10 permit 2.2.2.0
router rip  //将OSPF重分发进RIP
redistribute ospf 110 metric 3
exit
//////////////////////////////////顺时针重分发完成
router ospf 110
redistribute rip subnets
exit
//路由优化
access-list 20 permit 13.1.1.0
router rip
offset-list 20 out 1 serial 1/1
access-list 30 permit 24.1.1.0
route-map song permit 10
match ip address 30
set metric-type type-1(OE 1的路由的优先级大于OE 2)
exit
route-map song permit 20
exit
router ospf 110
redistribute rip subnets route-map song


附图:
R2做路由优化前的路由表:


R2做路由优化后的路由表:


R3做路由优化前的路由表;


R3做路由优化后的路由表:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
发表于 2012-11-20 16:40:15 | 显示全部楼层
厉害厉害~感谢分享~
发表于 2012-11-20 16:50:06 | 显示全部楼层
感谢分享,如果R2、R3之间再加根线,就更其乐无穷了 :)

再次感谢楼主~
发表于 2012-11-20 19:22:53 | 显示全部楼层
的确,R1,R4间假条链路,R3,去往2.2.2.2出现环路,然后再用楼主方法解决,就perface了。
发表于 2012-11-22 15:30:00 | 显示全部楼层
谢谢楼主分享。
发表于 2012-11-23 11:01:04 | 显示全部楼层
这个不错哦~~
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-11-21 18:51 , Processed in 0.083524 second(s), 19 queries , Gzip On.

快速回复 返回顶部 返回列表