18.3 OSPF多區域實驗

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

驗證:查看路由器的路由表,其中末梢區域中的路由器都只學習了本區域內的路由條目,而且增長了一條默認路由條目;可是全網仍是互通的

相關文章
相關標籤/搜索