概要
- 白本[P240]の【OSPFのトラブルシューティング用の構成】を作成する手順書
使用機材
- Cisco 2811ルーター(4台)
- Cisco Catalyst2950-24(1台)
- ツイストペアケーブル(7本)
- テスト用PC(3台) pingを飛ばしたりするよう(なくてもいい)
構成管理表
機器設定一覧表
ホスト名 | ルータID | Fa0/0 | area | Fa0/1 | area |
---|---|---|---|---|---|
Router1 | 10.1.1.1 | 192.168.1.1/24 | area0 | 172.16.10.1/24 | area1 |
Router2 | 10.1.1.2 | 172.16.20.1/24 | area1 | 192.168.1.2/24 | area0 |
Router3 | 10.1.1.3 | 172.16.20.2/24 | area0 | 172.16.30.1/24 | area0 |
Router4 | 10.1.1.4 | 172.16.20.3/24 | area0 | 172.16.40.1/24 | area0 |
※以下のポートはパッシブ設定すること
- Router1 Fa0/1
- Router3 Fa0/1
- Router4 Fa0/1
Router1の設定手順
ホスト名の設定
- ルーターにコンソールケーブルで接続し、Tera Term などのターミナルソフトを開く
- ルーターを起動し、
Router>
プロンプトが表示されたら特権モードに移行Router> enable
- グローバルコンフィグレーションモードに入る
Router# configure terminal
- ホスト名を設定
Router(config)# hostname Router1
インターフェイスの設定
- FastEthernet 0/0
Router1(config)# interface FastEthernet0/0 Router1(config-if)# ip address 192.168.1.1 255.255.255.0 Router1(config-if)# no shutdown Router1(config-if)# exit
- FastEthernet 0/1
Router1(config)# interface FastEthernet0/1 Router1(config-if)# ip address 172.16.10.1 255.255.255.0 Router1(config-if)# no shutdown Router1(config-if)# exit
OSPF設定
- OSPFプロセスを有効化し、ルーターIDを設定
Router1(config-router)# router ospf 1 Router1(config-router)# router-id 10.1.1.1
- 各インターフェイスのネットワークをOSPFに追加
Router1(config-router)# network 192.168.1.0 0.0.0.255 area 0 Router1(config-router)# network 172.16.10.0 0.0.0.255 area 0 Router1(config-router)# passive-interface FastEthernet0/1 Router1(config-router)# exit
設定の保存
- 特権モードまで戻る
Router1(config-router)# end
- 設定内容を確認
Router1# show running-config
- 設定を保存
Router1# write memory
動作確認
- インターフェースの状態を確認
Router1# show ip interface brief
- OSPF のネイバー情報を確認
Router1# show ip ospf neighbor
- ルーティングテーブルを確認
Router1# show ip route
Router2 設定手順
ホスト名の設定
- ルーターにコンソールケーブルで接続し、Tera Term などのターミナルソフトを開く
- ルーターを起動し、
Router>
プロンプトが表示されたら特権モードに移行Router> enable
- グローバルコンフィグレーションモードに入る
Router# configure terminal
- ホスト名を設定
Router(config)# hostname Router2
インターフェース設定
- FastEthernet 0/0
Router2(config)# interface FastEthernet0/0 Router2(config-if)# ip address 172.16.20.1 255.255.255.0 Router2(config-if)# no shutdown Router2(config-if)# exit
- FastEthernet 0/1
Router2(config)# interface FastEthernet0/1 Router2(config-if)# ip address 192.168.1.2 255.255.255.0 Router2(config-if)# no shutdown Router2(config-if)# exit
OSPF 設定。
- OSPFプロセスを有効化し、ルーターIDを設定
Router2(config-router)# router ospf 1 Router2(config-router)# router-id 10.1.1.2
- 各インターフェイスのネットワークをOSPFに追加
Router2(config-router)# network 172.16.20.0 0.0.0.255 area 1 Router2(config-router)# network 192.168.1.0 0.0.0.255 area 0 Router2(config-router)# exit
設定の保存
- 特権モードまで戻る
Router2(config-router)# end
- 設定内容を確認
Router2# show running-config
- 設定を保存
Router2# write memory
動作確認
-
インターフェースの状態を確認
Router2# show ip interface brief
-
OSPF のネイバー情報を確認
Router2# show ip ospf neighbor
-
ルーティングテーブルを確認
Router2# show ip route
Router3 設定手順
ホスト名の設定
- ルーターにコンソールケーブルで接続し、Tera Term などのターミナルソフトを開く
- ルーターを起動し、
Router>
プロンプトが表示されたら特権モードに移行Router> enable
- グローバルコンフィグレーションモードに入る
Router# configure terminal
- ホスト名を設定
Router(config)# hostname Router3
インターフェイスの設定
- FastEthernet 0/0
Router3(config)# interface FastEthernet0/0 Router3(config-if)# ip address 172.16.20.2 255.255.255.0 Router3(config-if)# no shutdown Router3(config-if)# exit
- FastEthernet 0/1
Router3(config)# interface FastEthernet0/1 Router3(config-if)# ip address 172.16.30.1 255.255.255.0 Router3(config-if)# no shutdown Router3(config-if)# exit
OSPF 設定。
- OSPFプロセスを有効化し、ルーターIDを設定
Router3(config-router)# router ospf 1 Router3(config-router)# router-id 10.1.1.3
- 各インターフェイスのネットワークをOSPFに追加
Router3(config-router)# network 172.16.20.0 0.0.0.255 area 0 Router3(config-router)# network 172.16.30.0 0.0.0.255 area 0 Router3(config-router)# passive-interface FastEthernet0/1 Router3(config-router)# exit
設定の保存
- 特権モードまで戻る
Router3(config-router)# end
- 設定内容を確認
Router3# show running-config
- 設定を保存
Router3# write memory
動作確認
- インターフェイスの確認
Router3# show ip route
- OSPFのネイバー情報を確認
Router3# show ip ospf neighbor
- ルーティングテーブルを確認
Router3# show ip route
Router4 設定手順
ホスト名の設定
- ルーターにコンソールケーブルで接続し、Tera Term などのターミナルソフトを開く
- ルーターを起動し、
Router>
プロンプトが表示されたら特権モードに移行Router> enable
- グローバルコンフィグレーションモードに入る
Router# configure terminal
- ホスト名を設定
Router(config)# hostname Router4
インターフェース設定。
~~~
interface FastEthernet0/0
ip address 172.16.20.3 255.255.255.0
no shutdown
exit
interface FastEthernet0/1
ip address 172.16.40.1 255.255.255.0
no shutdown
exit
~~~
OSPF 設定。
~~~
router ospf 1
router-id 10.1.1.4
network 172.16.20.0 0.0.0.255 area 0
network 172.16.40.0 0.0.0.255 area 0
passive-interface FastEthernet0/1
exit
~~~
設定の保存
- 特権モードまで戻る
Router4(config-router)# end
- 設定内容を確認
Router4# show running-config
- 設定を保存
Router4# write memory
動作確認
- インターフェイスの確認
Router4# show ip route
- OSPFのネイバー情報を確認
Router4# show ip ospf neighbor
- ルーティングテーブルを確認
Router4# show ip route
以上でセットアップ完了です。