rip ospf 间的路由从发布实验
一、 实验目的
掌握ripospf之间以及ospfrip间的路由发布,以及ripospf的路由条目汇总
二、 拓扑结构图
200909191253324780593.jpg
三、 实验步骤
1. 基本接口配置
配置步骤略
测试:routera#ping 10.0.0.2
routerc#ping 10.0.0.9 测试成功!!1
2. 配置路由协议
a:
router rip
version 2
network 10.0.0.0
no auto-summary
b:
router ospf 1
log-adjacency-changes
network 10.0.0.8 0.0.0.3 area 0
router rip
version 2
passive-interface Serial0/1
network 10.0.0.0
c:
router ospf 1
log-adjacency-changes
network 10.0.0.8 0.0.0.3 area 0
network 10.8.0.0 0.3.255.255 area 1
3. 查看路由表
routera#show ip route
C10.3.0.1/32 is directly connected, Loopback2
C10.2.0.1/32 is directly connected, Loopback1
C10.1.0.1/32 is directly connected, Loopback0
C10.0.0.0/30 is directly connected, Serial0/0
routerb#show ip route
10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
O IA10.11.0.1/32 [110/65] via 10.0.0.10, 00:42:54, Serial0/1
O IA10.10.0.1/32 [110/65] via 10.0.0.10, 00:42:54, Serial0/1
O IA10.9.0.1/32 [110/65] via 10.0.0.10, 00:42:54, Serial0/1
C10.0.0.8/30 is directly connected, Serial0/1
O IA10.8.0.1/32 [110/65] via 10.0.0.10, 00:42:54, Serial0/1
R10.3.0.1/32 [120/1] via 10.0.0.1, 00:00:10, Serial0/0
R10.2.0.1/32 [120/1] via 10.0.0.1, 00:00:10, Serial0/0
R10.1.0.1/32 [120/1] via 10.0.0.1, 00:00:10, Serial0/0
C10.0.0.0/30 is directly connected, Serial0/0
B路由可以看到AC的路由条目
routerc#show ip route
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C10.11.0.1/32 is directly connected, Loopback3
C10.10.0.1/32 is directly connected, Loopback2
C10.9.0.1/32 is directly connected, Loopback1
C10.0.0.8/30 is directly connected, Serial0/0
C10.8.0.1/32 is directly connected, Loopback0
4. 进行路由从发布
rip的路由条目发布到ospf
routerb(config)#router ospf 1
routerb(config-router)#redistribute rip subnet metri 300 metric-type 1 (开销类型)
ospf路由条目发不到rip
routerb(config-router)#router rip
routerb(config-router)#redistribute ospf 1 metri 5 (跳数)
5. 查看路由表的变化
routerc#show ip route
10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
C10.11.0.1/32 is directly connected, Loopback3
C10.10.0.1/32 is directly connected, Loopback2
C10.9.0.1/32 is directly connected, Loopback1
C10.0.0.8/30 is directly connected, Serial0/0
C10.8.0.1/32 is directly connected, Loopback0
O E110.3.0.1/32 [110/364] via 10.0.0.9, 00:02:43, Serial0/0
O E110.2.0.1/32 [110/364] via 10.0.0.9, 00:02:43, Serial0/0
O E110.1.0.1/32 [110/364] via 10.0.0.9, 00:02:43, Serial0/0
O E110.0.0.0/30 [110/364] via 10.0.0.9, 00:02:43, Serial0/0
routerb#sh ip route
10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
O IA10.11.0.1/32 [110/65] via 10.0.0.10, 00:05:10, Serial0/1
O IA10.10.0.1/32 [110/65] via 10.0.0.10, 00:05:10, Serial0/1
O IA10.9.0.1/32 [110/65] via 10.0.0.10, 00:05:10, Serial0/1
C10.0.0.8/30 is directly connected, Serial0/1
O IA10.8.0.1/32 [110/65] via 10.0.0.10, 00:05:10, Serial0/1
R10.3.0.1/32 [120/1] via 10.0.0.1, 00:00:12, Serial0/0
R10.2.0.1/32 [120/1] via 10.0.0.1, 00:00:12, Serial0/0
R10.1.0.1/32 [120/1] via 10.0.0.1, 00:00:12, Serial0/0
C10.0.0.0/30 is directly connected, Serial0/0
routera#show ip route
10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
R10.11.0.1/32 [120/5] via 10.0.0.2, 00:00:11, Serial0/0
R10.10.0.1/32 [120/5] via 10.0.0.2, 00:00:11, Serial0/0
R10.9.0.1/32 [120/5] via 10.0.0.2, 00:00:11, Serial0/0
R10.0.0.8/30 [120/1] via 10.0.0.2, 00:00:11, Serial0/0
R10.8.0.1/32 [120/5] via 10.0.0.2, 00:00:11, Serial0/0
C10.3.0.1/32 is directly connected, Loopback2
C10.2.0.1/32 is directly connected, Loopback1
C10.1.0.1/32 is directly connected, Loopback0
C10.0.0.0/30 is directly connected, Serial0/0
路由ac都学到了路由条目
6. 为了节省路由开销 , 进行路由条目的汇总
ospf的汇总
routerc(config)#router ospf 1 
routerc(config-router)#area 1 range 10.8.0.0 255.252.0.0 
rip的汇总
routera(config)#int s0/0
routera(config-if)#ip summary-address rip 10.0.0.0 255.252.0.0 
7. 查看汇总结构
routera#sh ip route
10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks
R10.8.0.0/14 [120/5] via 10.0.0.2, 00:00:21, Serial0/0
R10.0.0.8/30 [120/1] via 10.0.0.2, 00:00:21, Serial0/0
C10.3.0.1/32 is directly connected, Loopback2
C10.2.0.1/32 is directly connected, Loopback1
C10.1.0.1/32 is directly connected, Loopback0
C10.0.0.0/30 is directly connected, Serial0/0 
routerb#show ip route
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O IA10.8.0.0/14 [110/65] via 10.0.0.10, 00:00:02, Serial0/1
C10.0.0.8/30 is directly connected, Serial0/1
C10.0.0.0/30 is directly connected, Serial0/0
R10.0.0.0/14 [120/1] via 10.0.0.1, 00:00:02, Serial0/0
routerc#show ip route
10.0.0.0/8 is variably subnetted, 8 subnets, 3 masks
C10.11.0.1/32 is directly connected, Loopback3
C10.10.0.1/32 is directly connected, Loopback2
C10.9.0.1/32 is directly connected, Loopback1
O10.8.0.0/14 is a summary, 00:03:43, Null0
C10.0.0.8/30 is directly connected, Serial0/0
C10.8.0.1/32 is directly connected, Loopback0
O E110.0.0.0/30 [110/364] via 10.0.0.9, 00:03:43, Serial0/0
O E110.0.0.0/14 [110/364] via 10.0.0.9, 00:03:43, Serial0/0
路由条目确实进行汇总,节约了路由开销
四、 实验总结
通过实验学习掌握在运行不同路由协议的路由间进行路由的从发布,汇总!