OSPF多区域实验网络
实验目的:经过配置路由器实现全网互通ide
实验环境:如图所示,R一、R二、R3属于区域1,R3是ABR;R四、R5属于区域0(骨干区域),R4是ABR;R6属于区域2,R6是ABR学习
实验条件:实现全网互通,且配置末梢区域优化网络,并分析验证测试
实验步骤:优化
一 基本配置spa
配置R1router
R1>enblog
R1#conf tip
R1(config)#int f0/0路由
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shu
配置R二、R三、R四、R五、R6(略)
二 OSPF配置
配置R1
R1(config)#router ospf 1
R1(config-router)#network 192.168.1.0 0.0.0.255 area 1
配置R2
R2(config)#router ospf 1
R2(config-router)#network 192.168.2.0 0.0.0.255 area 1
配置R3
R3(config)#router ospf 1
R3(config-router)#network 192.168.1.0 0.0.0.255 area 1
R3(config-router)#network 192.168.2.0 0.0.0.255 area 1
R3(config-router)#network 192.168.3.0 0.0.0.255 area 0
配置R4
R4(config)#router ospf 1
R4(config-router)#network 192.168.3.0 0.0.0.255 area 0
R4(config-router)#network 192.168.4.0 0.0.0.255 area 0
R4(config-router)#network 192.168.5.0 0.0.0.255 area 2
配置R5
R5(config)#router ospf 1
R5(config-router)#network 192.168.4.0 0.0.0.255 area 0
配置R6
R6(config)#router ospf 1
R6(config-router)#network 192.168.5.0 0.0.0.255 area 2
测试:经过命令查看到每一个路由器的路由表中都有五条路由条目,因此全网互通成功
三 优化
将区域1和2都配置为末梢区域
配置R1
R1(config)#router ospf 1
R1(config-router)#area 1 stub no-summary
配置R2
R2(config)#router ospf 1
R2(config-router)#area 1 stub no-summary
配置R3
R3(config)#router ospf 1
R3(config-router)#area 1 stub no-summary
配置R4
R4(config)#router ospf 1
R4(config-router)#area 1 stub no-summary
R4(config-router)#area 2 stub no-summary
配置R6
R6(config)#router ospf 1
R6(config-router)#area 2 stub no-summary
验证:查看路由器的路由表,其中末梢区域中的路由器都只学习了本区域内的路由条目,而且增长了一条默认路由条目;可是全网仍是互通的