このページで解説している内容は、以下の YouTube 動画の解説で見ることができます。

演習ファイルのダウンロード

 ネットワークの構成を Packet Tracer で一から設定していくのは大変かと思います。「ダウンロード」から演習で使用するファイルのダウンロードができます。ファイルは、McAfee インターネットセキュリティでウイルスチェックをしておりますが、ダウンロードは自己責任でお願いいたします。

OSPF(検証コマンド)

 ここでは、「OSPFの設定例」で構築した下図のネットワークを用いて、OSPF ネットワークを検証コマンドを使って確認していきます。

show ip route

ルーティングテーブルを確認するには、「show ip route」コマンドを使います。

Router#show ip route

R1ルータ、R2ルータのルーティングテーブルを確認すると次のように表示されます。

●R1ルータのルーティングテーブル

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C       172.16.0.0/30 is directly connected, Serial0/0/0
L       172.16.0.1/32 is directly connected, Serial0/0/0
     192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.1.0/24 is directly connected, GigabitEthernet0/0
L       192.168.1.1/32 is directly connected, GigabitEthernet0/0
O    192.168.3.0/24 [110/1563] via 172.16.0.2, 00:17:32, Serial0/0/0

●R2ルータのルーティングテーブル

R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C       172.16.0.0/30 is directly connected, Serial0/0/0
L       172.16.0.2/32 is directly connected, Serial0/0/0
O    192.168.1.0/24 [110/1563] via 172.16.0.1, 00:19:38, Serial0/0/0
     192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.3.0/24 is directly connected, GigabitEthernet0/0
L       192.168.3.1/32 is directly connected, GigabitEthernet0/0

R1ルータのルーティングテーブルを確認すると以下のように表示されています。

O 192.168.3.0/24 [110/1563] via 172.16.0.2, 00:17:32, Serial0/0/0

「O」は、OSPFによって学習したことを意味しています。

アドミニストレーティブディスタンスは、「110」であることが分かります。

メトリックは、各リンクの「108/帯域幅」の累計ですから計算式は、以下のようになります。

(108 / 64,000) + (108 /1 ×109)= 1562 + 1 = 1563

計算式から求められるとおり、「1563」になっています。

show ip protocols

 OSPF の各種タイマ値に関する情報を表示するには、「show ip protocols」コマンドを使用します。アドミニストレーティブディスタンス値なども確認できます。

●「show ip protocols」の出力

R1#show ip protocols 

Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set 
  Incoming update filter list for all interfaces is not set 
  Router ID 192.168.1.1
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    192.168.1.0 0.0.0.255 area 0
    172.16.0.0 0.0.0.3 area 0
  Routing Information Sources:  
    Gateway         Distance      Last Update 
    192.168.1.1          110      00:03:29
    192.168.3.1          110      00:03:29
  Distance: (default is 110)

 出力を確認すると、OSPF のプロセス番号、アドミニストレーティブディスタンスの値が、110になっていることが分かります。

show ip ospf interface

 Hello パケットの送信間隔、Dead間隔、エリア情報、隣接関係、ROUTERID、ネットワークタイプを確認するには、「show ip ospf interface」コマンドを使用します。

●「show ip ospf interface」の出力

R1#show ip ospf interface 

GigabitEthernet0/0 is up, line protocol is up
  Internet address is 192.168.1.1/24, Area 0
  Process ID 1, Router ID 192.168.1.1, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 192.168.1.1, Interface address 192.168.1.1
  No backup designated router on this network
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:07
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
Serial0/0/0 is up, line protocol is up
  Internet address is 172.16.0.1/30, Area 0
  Process ID 1, Router ID 192.168.1.1, Network Type POINT-TO-POINT, Cost: 1562
  Transmit Delay is 1 sec, State POINT-TO-POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:07
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1 , Adjacent neighbor count is 1
    Adjacent with neighbor 192.168.3.1
  Suppress hello for 0 neighbor(s)

GigabitEthernet0/0 is up, line protocol is up

と表示されています。

 「show interfaces g0/0」と入力しなくともインターフェイスの状態を確認することができます。「show ip ospf interface」コマンドは、OSPFに関するあらゆる情報を表示してくれるのでとても重要なコマンドです。

show ip ospf neighbor

OSPFネットワークの隣接関係、プライオリティ、Stateに関する情報を確認することができます。

●「show ip ospf neighbor」の出力

R1#show ip ospf neighbor 


Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.3.1       0   FULL/  -        00:00:33    172.16.0.2      Serial0/0/0

 上の出力を確認するとプライオリティが 0 になっていることが確認できます。今回のネットワーク構成では、DR、BDRについて確認できませんが、どのルータがDR、BDRになっているのかを確認することができます。

次は、「OSPF(debugコマンド)」でEIGRPのデバッグコマンドの出力を確認していきます。