ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

RIP与OSPF重分布的例子(路由图)和配置方法

2014-7-5 06:00| 发布者: admin| 查看: 1019| 评论: 0

摘要: 针对下面的RIP与OSPF重分布的具体例子,首先说明: 1、在R1配置重发布直连路由,标记为10并且跳数为10 2、RIP路由协议重发布OSPF路由,要求只重分标记为10的OSPF路由,初始量度值为10 3、R3的跳数设置为4 4、要求只 ...
针对下面的RIP与OSPF重分布的具体例子,首先说明:
1、在R1配置重发布直连路由,标记为10并且跳数为10
2、RIP路由协议重发布OSPF路由,要求只重分标记为10的OSPF路由,初始量度值为10
3、R3的跳数设置为4
4、要求只重分布路数为4的,并且
路由器网络地址在10.0.0/8范围内的RIP路由,在OSPF路由域中,设该类型为外部路由type-1,初始量度值为40,标记值为40
接下来是这次实例的拓扑图:
在这里,先配置13[1.R1配置重发布直连路由,标记10并且路数为10; 3.R3配置重发布直连路由,跳数设置为4;],以供后面好测试:
配置参数:
R1:
router ospf 1
redistribute connected metric 10 subnets tag 10
 network 192.168.12.0 0.0.0.255 area 0
 network 192.168.100.0 0.0.0.255 area 0
R3
router rip
 version 2
 redistribute connected metric 4
 network 192.168.200.0
 network 200.168.23.0
 no auto-summary
查看配置效果:
R2:
r2#SH IP ROU
C    192.168.12.0/24 is directly connected, Ethernet0/0
C    200.168.23.0/24 is directly connected, Ethernet0/1
O E2 192.168.110.0/24 [110/10] via 192.168.12.1, 00:12:30, Ethernet0/0
R    192.168.200.0/24 [120/1] via 200.168.23.2, 00:00:01, Ethernet0/1
     10.0.0.0/24 is subnetted, 1 subnets
R       10.1.1.0 [120/4] via 200.168.23.2, 00:00:01, Ethernet0/1
     192.168.100.0/32 is subnetted, 1 subnets
O       192.168.100.1 [110/11] via 192.168.12.1, 00:12:30, Ethernet0/0
r2#
可以看出R2学习到R1重发布的直连路由192.168.110.0/24的跳数为10;学习到R3重发布的直连路由10.1.1.0/24的跳数为4.
 
接下来配置2[2.RIP路由协议重发布OSPF路由,要求只重分标记为10OSPF路由,初始量度值为10;]
配置参数:
R1:
route-map ospf permit 10
 match tag 10
 set metric 10
router rip
 version 2
 redistribute ospf 1 route-map ospf
 network 200.168.23.0
 no auto-summary
查看配置效果:
R3
r3#sh ip rou
C    200.168.23.0/24 is directly connected, Ethernet0/1
R    192.168.110.0/24 [120/10] via 200.168.23.1, 00:00:15, Ethernet0/1
C    192.168.200.0/24 is directly connected, Loopback1
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, Loopback2
r3#
可以看到R3学习到了OSPF网络中标记为10的路由192.168.110.0/24R2将它重发布到RIP跳数为10.
 
接下来配置4[4.OSPF路由协议重发布RIP路由,要求只重分布路数为4的路由并且路由网络地址在10.0.0.0/8范围内的RIP路由,在OSPF路由域中,设该路由类型为外部路由type-1,初始量度值为40,路由标记值为40.]
配置参数:
R2:
access-list 10 permit 10.0.0.0 0.255.255.255


http://www.luyouqiwang.com/15371
route-map rip permit 10
 match ip address 10
 match metric 4
 set metric 40
 set metric-type type-1
 set tag 40
router ospf 1
redistribute rip subnets route-map rip
 network 192.168.12.0 0.0.0.255 area 0
查看配置:
R1
C    192.168.12.0/24 is directly connected, Ethernet0/0
C    192.168.110.0/24 is directly connected, Loopback2
     10.0.0.0/24 is subnetted, 1 subnets
O E1    10.1.1.0 [110/50] via 192.168.12.2, 00:01:45, Ethernet0/0
C    192.168.100.0/24 is directly connected, Loopback1
r1#
可以看到R1学习到了R3重发布的标记为410.1.1.0/24的路由,是R2将它重发布进OSPF,配置为type-1类型,度量值为40,标记为40的路由!
 
至此,配置已经成功,证实方法是正确的!
不良信息举报Q:2000617

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2024-5-8 02:30 , Processed in 0.076467 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部