實驗六——————OSPF協議配置
阿新 • • 發佈:2019-01-04
實驗目的
通過本實驗,可以掌握以下技能:
- 配置介面IP地址。
- 配置OSPF協議。
- 驗證OSPF協議配置。
裝置需求
- Cisco路由器3臺,分別命名為twins、sa和gill。其中twins具有2個序列介面;sa具有1個乙太網介面和一個序列介面;gill具有1個乙太網介面和一個序列介面。
- 1條交叉線序雙絞線。
- 2條序列介面線。
- 1臺access server,及用於反向Telnet的相應電纜。
- 1臺帶有超級終端程式的PC機,以及Console電纜及轉接器。
拓撲結構及配置說明
實驗的拓撲結構如圖10-6所示。通過2對交叉線序雙絞線分別把twins和sa連線起來,twins和gill連線起來。
各路由器使用的介面及其編號見圖10-6所示的標註,各介面IP地址分配如下:
- twins:S0: 172.16.10.5 S1: 172.16.20.5
- sa:S0: 172.16.10.6 E0:10.0.10.1
- gill:S0: 172.16.20.6 E0:10.0.10.2
實驗配置
基本網路配置
這裡使用圖形化介面直接操作,讀者也可以使用命令列下操作
twins
首先為twins新增兩個串列埠
配置IP資訊
sa
首先為sa新增一個串列埠和一個乙太網介面
配置ip地址資訊
gill
首先為gill新增一個串列埠,與一個乙太網埠
配置ip地址資訊
之後全部開啟“ON”選擇哦!
網路拓撲如下
配置OSPF協議
sa
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#router ospf 10 Router(config-router)#network 10.0.10.0 0.0.0.255 area 0 Router(config-router)#network 172.16.10.0 0.0.0.255 area 0 Router(config-router)#^Z Router# %SYS-5-CONFIG_I: Configured from console by console Router#
twins
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#router ospf 10 Router(config-router)#network 172.16.10.0 0.0.0.3 area 0 Router(config-router)#network 172.16.20.0 0.0.0.3 area 0 Router(config-router)#^Z Router# %SYS-5-CONFIG_I: Configured from console by console Router#
gill
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router ospf 10
Router(config-router)#network 172.16.20.0 0.0.0.3 area 0
Router(config-router)#network 10.0.10.0 0.0.0.255 area 0
Router(config-router)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#
驗證OSPF協議配置:
命令 show ip ospf
該命令指出了路由選擇協議OSPF在路由器上的執行情況,其輸出中包括路由選擇演算法SPF運行了多少次,這是網路穩定性的風向標.該命令如下:
Router# show ip ospf process-id
下列是該命令的輸出:
sa
twins
gill
命令 show ip ospf database
該命令顯示路由器拓撲資料庫的內容以及被加入到該資料庫中的LSA.該命令如下:
下列是該命令的輸出:
Sa
twins
gill
命令 show ip ospf interface
該命令顯示介面的OSPF配置及執行情況,這種細節對診斷配置錯誤很有幫助,該命令如下:
Router# show ip ospf interface [ type-number ]
下列是該命令的輸出:
sa
gill