OSPF地址汇总试验报告
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://dongwei.blog.51cto.com/319848/62966 |
OSPF地址汇总试验报告
1.实验拓扑:
![]() 2.实验目的: 2.1按照拓扑图正确连接三台路由器。
2.2 正确配置相应的接口IP地址
2.3 配置OSPF虚链路把不与主干区域相连的区域逻辑连接
( Config-router)#area 区域号 virtual-link 对方路由ID
2.4配置OSPF区域汇总和外部路由汇总
2.5配置辅助地址
(config-if)#ip add IP地址 掩码 secondary 注:只有主地址也运行OSPF时,才会通告辅助网络 OSPF把辅助地址看成末梢区域,无法与辅助网络的路由建立邻接关系 3.详细配置步骤:
Setp 1.配置路由器R1,R2.R3相应的接口IP地址,及辅助地址:
R1配置如下:
Router>en
Router#conf t
Router(config)#ho R1
R1(config)#int s1/0
R1(config-if)#ip add
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int lo0
R1(config-if)#ip add
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
R2配置如下:
Router>en
Router#conf t
Router(config)#ho R2
R2(config)#int s1/0
R2(config-if)#ip add
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int s1/1
R2(config-if)#ip add
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int lo0
R2(config-if)#ip add
R2(config-if)#exit
R2(config)#int lo1
R2(config-if)#ip add
R2(config-if)#ip add
R2(config-if)#ip add
R2(config-if)#ip add
R2(config-if)#ip add
R2(config-if)#ip add
R2(config-if)#ip add
R2(config-if)#ip add
R2(config-if)#exit
R2(config)#
R3配置如下:
Router>en
Router#conf t
Router(config)#ho R3
R3(config)#int s1/0
R3(config-if)#ip add
R3(config-if)#no shut
R3(config-if)#exit
R3(config)#int lo0
R3(config-if)#ip add
R3(config-if)#exit
R3(config)#int lo1
R3(config-if)#ip add
R3(config-if)#ip add
R3(config-if)#ip add
R3(config-if)#ip add
R3(config-if)#ip add
R3(config-if)#ip add
R3(config-if)#ip add
R3(config-if)#ip add
step2 .配置OSPF路由协议
R1配置如下:
R1(config)#router ospf 7
R1(config-router)#net
R1(config-router)#net
R1(config-router)#exit
R1(config)#
*Mar 1 00:13:26.943: %OSPF-5-ADJCHG: Process 7, Nbr
OADING to FULL, Loading Done
R2配置如下:
R2(config)#router ospf 8
R2(config-router)#router-id
R2(config-router)#net
R2(config-router)#net
R2(config-router)#exit
R2(config)#
R3配置如下:
R3(config-if)#exit
R3(config)#router ospf 9
R3(config-router)#router-id
R3(config-router)#net
R3(config-router)#net
R3(config-router)# network
R3(config-router)# network
R3(config-router)# network
R3(config-router)# network
R3(config-router)# network
R3(config-router)# network
R3(config-router)# network
R3(config-router)# network
R3(config-router)#
查看R1路由表:
R1#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C
C
O IA
// 此时R1还学习不到R3的路由信息
Step3.配置虚链路:
R2(config)#router ospf 8
R2(config-router)#area 1 virtual-link
R2(config-router)#exit
R2(config)#
R3(config)#router ospf 9
R3(config-router)#area 1 virtual-link
R3(config-router)#exit
R3(config)#
查看R1路由表:
R1#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C
O IA
C
O IA
O IA
O IA
O IA
O IA
O IA
O IA
O IA
O IA
//此时R1学习到R3的路由信息。
Step4.配置OSPF区域路由汇总:(要对红色字体的路由表进行汇总)
区域汇总就是区域之间的地址汇总,一般配置在ABR上;
通过计算得出汇总的地址是
R3配置如下:
R3(config)#router ospf 9
R3(config-router)#area 51 range
R3(config-router)#exit
R3(config)#ip route
R3(config)#
查看R1路由表:
R1#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C
O IA
C
O IA
O IA
//此时汇总成了一条地址.
Step5.配置路由重分发,把R2的直连地址发布到OSPF区域内:
R2(config)#router ospf 8
R2(config-router)#redistribute connected subnets
R2(config-router)#
查看R1路由表:
R1#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C
O E2
O IA
C
O IA
O E2
O E2
O E2
O E2
O E2
O E2
O E2
O IA
//对红色字体的路由信息进行汇总
Step6.配置外部路由汇总
外部路由的汇总在ASBR上进行,配置如下
汇总的地址为
R2(config)#router ospf 8
R2(config-router)#summary-address
R2(config-router)#end
查看R3路由表:
R3#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
O E2
C
C
O E2
C
C
C
C
C
C
S
C
C
查看R1路由表:
R1#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C
O E2
O IA
C
O IA
O E2
O IA
试验总结:
地址汇总:减少泛洪的LSA的数量
在OSPF中进行汇总。区域汇总和外部路由汇总
区域汇总:
area area-id range ip-address mask
外部路由汇总:
summary-address ip-address mask
配置OSPF虚链路
( Config-router)#area 区域号 virtual-link 对方路由ID 配置辅助地址:(config-if)#ip add IP地址 掩码 secondary注:只有主地址也运行OSPF时,才会通告辅助网络 OSPF把辅助地址看成末梢区域,无法与辅助网络的路由建立邻接关系 本文出自 “Dongwei→工作室” 博客,请务必保留此出处http://dongwei.blog.51cto.com/319848/62966 本文出自 51CTO.COM技术博客 |



Dongwei
博客统计信息
热门文章
最新评论
友情链接