您的位置:首页 > 其它

RIP&OSPF重分布例子(路由图)

2013-02-01 22:58 531 查看
拓扑图:

在这里,先配置1和3[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路由,要求只重分标记为10的OSPF路由,初始量度值为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/24,R2将它重发布到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
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重发布的标记为4的10.1.1.0/24的路由,是R2将它重发布进OSPF,配置为type-1类型,度量值为40,标记为40的路由!!!

配置成功!!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  OSPF CCNP RIP GNS3