廣播多路訪問鏈路上的OSPF
1.實驗目的
通過本實驗可以掌握:
(1)在路由器上啓動OSPF 路由進程
(2)啓用參與路由協議的接口,並且通告網絡及所在的區域
(3)修改參考帶寬
(4)DR 選舉的控制
(5)廣播多路訪問鏈路上的OSPF 的特徵
2:實驗環境
如下圖所示
3.實驗步驟
(1)步驟1:配置路由器R1
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1 .1
R1(config-router)#network 1.1.1 .0 255.255.255.0 area 0
R1(config-router)#network 192.168.1.0 255.255.255.0 area 0
R1(config-router)#auto-cost reference-bandwidth 1000
(2)步驟2:配置路由器R2
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2 .2
R2(config-router)#network 2.2.2 .0 255.255.255.0 area 0
R2(config-router)#network 192.168.1.0 255.255.255.0 area 0
R2(config-router)#auto-cost reference-bandwidth 1000
(3)步驟3:配置路由器R3
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3 .3
R3(config-router)#network 3.3.3 .0 255.255.255.0 area 0
R3(config-router)#network 192.168.1.0 255.255.255.0 area 0
R3(config-router)#auto-cost reference-bandwidth 1000
(4)步驟4:配置路由器R4
R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4 .4
R4(config-router)#network 4.4.4 .0 255.255.255.0 area 0
R4(config-router)#network 192.168.1.0 255.255.255.0 area 0
R4(config-router)#auto-cost reference-bandwidth 1000
【說明】
“auto-cost reference-bandwidth”命令是修改參考帶寬的,因爲本實驗中的以太口
的帶寬爲千兆,如果採用默認的百兆參考帶寬,計算出來的cost 是0.1,這顯然是不合理
的。修改參考帶寬要在所有的OSPF 路由器上配置,目的是確保參考標準是相同的。另外,
當執行命令“auto-cost reference-bandwidth”的時候,系統也會提示如下信息:
% OSPF: Reference bandwidth is changed.
Please ensure reference bandwidth is consistent across all routers.
4.實驗調試
(1)show ip ospf neighbor
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
以上輸出表明在該廣播多路訪問網絡中,R1 是DR,R2 是BDR,R3 和R4 爲DROTHER。