實驗名稱
OSPF 多區域基本配置
實驗目的
多區域 OSPF 配置技術
背景描述
你是某集成商的高級技術支持工程師,現在讓你爲某企業設計一個網絡,你選擇了使用
ospf 路由協議來構建,整個 OSPF 網絡設計多個區域。
實現功能
構建 OSPF 多個區域連接在骨幹網絡上。
實驗拓撲
實驗步驟
模擬器中路由器會沒有S0/0/0接口,這時要
然後就有s0/1/0的接口了,左邊會顯示s0/1/0,右邊顯示s0/0/0
路由器Router0
R1_RSR10_1 (config)#hostname R1 #更改路由器主機名
R1(config)#int s 0/1/0
R1(config-if)#ip add 192.168.12.1 255.255.255.0 #爲接口配置地址
R1(config-if)#clock rate 64000 # 設置時鐘速率 在 DTE 端不用設置
R1(config-if)#no sh
R1(config)#iint f 0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0 # 配置 FastEthernet 接口地址
R1(config-if)#no sh
R1(config-if)exit
R1(config)#router ospf 1
R1(config-router)#network 192.168.12.0 0.0.0.255 area 0 #配置骨幹區域
R1(config-router)# network 192.168.1.0 0 0.0.0.255 area 1 #配置分支區域
路由器Router1
R1_RSR10_2(config)#hostname R2
R2(config)#int s 0/1/0
R2(config-if)#ip add 192.168.12.2 255.255.255.0
R2(config-if)#no sh
R2(config)#int f 0/0
R2(config-if)#ip add 192.168.2.1 255.255.255.0 # 配置 FastEthernet 接口地址
R2(config-if)#no sh
R2(config-if)exit
R2(config)#router ospf 1
R2(config-router)#network 192.168.12.0 0.0.0.255 area 0
R2(config-router)#network 192.168.2. 0 0.0.0.255 area 2
PC2
PC3
實驗驗證
R1# show ip ospf nei (以 R1 爲例)
R1#show ip route
PC2 ping PC3
注意事項
1、 兩個廣域網接口在一區域裏;
2、 不要忘記在 DCE 端配置時鐘速率;
3、 學習到的路由條目注意是通過何種路由協議學到的。