实验目的:掌握ospf多区域设置方法
实验需求:1、使用ospf多区域配置实现全网互通;2、将Area 2 设置为末梢区域;
实验拓扑:
IP规划:
实验步骤:
1、配置IP地址(略)
2、设置OSPF(分区域)
#分公司B设置OSPF(area0)
R3(config)#router ospf 1
R3(config-router)#network 10.1.1.1 0.0.0.0 area 0
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0
#总公司设置OSPF(area0、area1、area2)
R1(config)#router ospf 1
R1(config-router)#network 10.1.1.254 0.0.0.0 area 0
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 10.1.2.254 0.0.0.0 area 1
R1(config-router)#network 10.1.3.254 0.0.0.0 area 2
#分公司A设置OSPF(area1)
R2(config)#router ospf 1
R2(config-router)#network 10.1.2.1 0.0.0.0 area 1
R2(config-router)#network 2.2.2.2 0.0.0.0 area 1
#分公司C设置OSPF(area2)
R4(config)#router ospf 1
R4(config-router)#network 10.1.3.1 0.0.0.0 area 2
R4(config-router)#network 4.4.4.4 0.0.0.0 area 2
验证环节:
使用show ip ospf database查看链路数据库
总公司
分公司A
分公司B
分公司C
使用PING命令查看是否全网互通
实验步骤2:
1.在总公司、分公司C配置末梢区域
#总公司配置
R1(config)#router ospf 1
R1(config-router)#area 2 stub
#分公司C配置
R4(config)#router ospf 1
R4(config-router)#area 2 stub
验证实验
使用show ip route查看分公司C路由表
自动生成了一条默认路由!
实验成功!!!
THE END!