ospf rip(思科rip和ospf的相互引入)

本文为大家介绍ospf rip(思科rip和ospf的相互引入),下面和小编一起看看详细内容吧。
ospf高级应用rip(cisco)案例二
案例二:
1.职位要求:
1 实现网络运行ospf协议和运行rip协议的通信
方法:路由重分配,注入默认路由
2 配置外围区域
3 配置完全stub区域
2.拓扑图
3、设备配置如下:
r1(config)#line 控制台0
r1(配置行)#logging synchronous
r1(配置行)#exec-timeout 0 0
r1(配置)#int s1/0
r1(config-if)#ip 添加192.168.2.1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#int 环回1
r1(config-if)#ip 添加192.168.1.1 255.255.255.0
r1(配置)#router ospf 223
r1(config-router)#network 192.168.1.0 0.0.0.255 区域1
r1(config-router)#network 192.168.2.0 0.0.0.255 区域1
r2(配置)#int s1/0
r2(config-if)#ip 添加192.168.2.2 255.255.255.0
r2(config-if)#不关闭
r2(配置-如果)#int s1/1
r2(config-if)#ip 添加192.168.3.1 255.255.255.0
r2(config-if)#不关闭
r2(配置路由器)#int s1/3
r2(config-if)#ip 添加192.168.6.1 255.255.255.0
r2(config-if)#不关闭
r2(config-if)#router ospf 223
r2(config-router)#net 192.168.2.0 0.0.0.255 区域1
r2(config-router)#net 192.168.3.0 0.0.0.255 区域0
r2(config-if)#router rip
r2(配置路由器)#network 192.168.6.0
r3(配置)#int s1/1
r3(config-if)#ip 添加192.168.3.2 255.255.255.0
r3(config-if)#no shut
r3(配置-如果)#int s1/2
r3(config-if)#ip 添加192.168.4.1 255.255.255.0
r3(config-if)#no shut
r3(配置)#router ospf 223
r3(config-router)#network 192.168.3.0 0.0.0.255 area 0
r3(config-router)#network 192.168.4.0 0.0.0.255 区域2
r4(配置)#int s1/2
r4(config-if)#ip 添加192.168.4.2 255.255.255.0
r4(config-if)#不关闭
r4(config-if)#int lo 1
r4(config-if)#ip 添加192.168.5.1 255.255.255.0
r4(配置)#router ospf 223
r4(config-router)#net 192.168.4.0 0.0.0.255 区域2
r4(config-router)#net 192.168.5.0 0.0.0.255 区域2
r5(配置)#int s1/3
r5(config-if)#ip 添加192.168.6.2 255.255.255.0
r5(config-if)#不关闭
r5(配置-if)#int f0/0
r5(config-if)#ip 添加192.168.7.1 255.255.255.0
r5(config-if)#不关闭
r5(config-if)#router rip
r5(配置路由器)#network 192.168.6.0
r5(配置路由器)#network 192.168.7.0
r6(配置)#int f0/0
r6(config-if)#ip 添加192.168.7.2 255.255.255.0
r6(config-if)#no shut
r6(config-if)#int lo 1
r6(config-if)#ip 添加192.168.8.1 255.255.255.0
r6(config-if)#router rip
r6(配置路由器)#network 192.168.7.0
r6(配置路由器)#network 192.168.8.0
r4 检查路由表:
c 192.168.4.0/24 直连,serial1/2
c 192.168.5.0/24 直连,loopback1
192.168.1.0/32 已划分子网,1 个子网
o ia 192.168.1.1 [110/193] 通过192.168.4.1, 00:12:37, serial1/2
o ia 192.168.2.0/24 [110/192] 通过192.168.4.1, 00:12:37, serial1/2
o ia 192.168.3.0/24 [110/128] 通过192.168.4.1, 00:12:37, serial1/2
r4#
r1 检查路由表:
o ia 192.168.4.0/24 [110/192] 通过192.168.2.2, 00:15:08, serial1/0
192.168.5.0/32 已划分子网,1 个子网
o ia 192.168.5.1 [110/193] 通过192.168.2.2, 00:14:22, serial1/0
c 192.168.1.0/24 直连,loopback1
c 192.168.2.0/24 直连,serial1/0
o ia 192.168.3.0/24 [110/128] 通过192.168.2.2, 00:21:35, serial1/0
路由重新分配:
r2(配置)#router ospf 223
r2(配置路由器)#redistribute rip metric 200
% 只有有类网络会被重新分配
o e2 192.168.8.0/24 [110/200] 通过192.168.4.1, 00:00:03, serial1/2
c 192.168.4.0/24 直连,serial1/2
c 192.168.5.0/24 直连,loopback1
o e2 192.168.6.0/24 [110/200] 通过192.168.4.1, 00:00:03, serial1/2
o e2 192.168.7.0/24 [110/200] 通过192.168.4.1, 00:00:03, serial1/2
192.168.1.0/32 已划分子网,1 个子网
o ia 192.168.1.1 [110/193] 通过192.168.4.1, 00:17:24, serial1/2
o ia 192.168.2.0/24 [110/192] 通过192.168.4.1, 00:17:24, serial1/2
o ia 192.168.3.0/24 [110/128] 通过192.168.4.1, 00:17:25, serial1/2
r4#
4.路由重分配:
单向重分配无法ping通
r4#ping 192.168.7.2
键入转义序列以中止。
发送5个100字节的icmp echos到192.168.7.2,超时2秒:
.
成功率为0% (0/5)
(由于在大型网络中使用ospf,流量比较大,传输的数据无法承受,所以在rip中注入了default route)
r2(配置)#router rip
r2(config-router)#default-information 起源
r6#show ip路由
c 192.168.8.0/24 直连,loopback1
r 192.168.6.0/24 [120/1] 通过192.168.7.1, 00:00:01, fastethernet0/0
c 192.168.7.0/24 直连,fastethernet0/0
r* 0.0.0.0/0 [120/2] 通过192.168.7.1, 00:00:01, fastethernet0/0
r6#平192.168.5.1
键入转义序列以中止。
向192.168.5.1发送5个100字节的icmp echos,超时2秒:

成功率为100% (5/5),往返最小/平均/最大=44/62/76 毫秒
双向重新分配:
r4#ping 192.168.7.2
键入转义序列以中止。
发送5个100字节的icmp echos到192.168.7.2,超时2秒:

成功率为100% (5/5),往返最小/平均/最大=60/76/100 毫秒
r3(配置)#router ospf 223
r3(config-router)#area 2存根
好了,ospf rip(思科rip和ospf的相互引入)的介绍到这里就结束了,想知道更多相关资料可以收藏我们的网站。