内容

概要

このドキュメントでは、番号付きポイントツーポイント リンクによって接続されている 2 台の Open Shortest Path First(OSPF)ルータについて説明します。

前提条件

要件

このドキュメントに特有の要件はありません。

使用するコンポーネント

このドキュメントの内容は、特定のソフトウェアやハードウェアのバージョンに限定されるものではありません。

表記法

ドキュメント表記の詳細は、『シスコ テクニカル ティップスの表記法』を参照してください。

設定

このセクションでは、このドキュメントで説明する機能を設定するために必要な情報を提供しています。

注:この文書で使用されているコマンドの詳細を調べるには、「Command Lookup ツール」を使用してください(登録ユーザのみ)。

ネットワーク図

このドキュメントでは、次の図で示されるネットワーク設定を使用しています。

ospfdb2a.gif

設定

このドキュメントでは、次に示す設定を使用しています。

Router1.1.1.1
Current configuration:

hostname r1.1.1.1

interface Loopback0
 ip address 1.1.1.1 255.0.0.0
 
interface Ethernet2/0/0
 ip address 4.0.0.1 255.0.0.0
 
interface Serial2/1/0
 ip address 5.0.0.1 255.0.0.0
 
router ospf 1
 network 4.0.0.0 0.255.255.255 area 0
 network 5.0.0.0 0.255.255.255 area 0

end

Router2.2.2.2
Current configuration:

hostname r2.2.2.2

interface Loopback0
 ip address 2.2.2.2 255.0.0.0
 
interface Ethernet0/0/4
 ip address 6.0.0.2 255.0.0.0
 
interface Serial2/1/0
 ip address 5.0.0.2 255.0.0.0
 
router ospf 2
 network 6.0.0.0 0.255.255.255 area 0
 network 5.0.0.0 0.255.255.255 area 0

end

確認

ここでは、設定が正しく機能していることを確認するために使用する情報を示します。

一部の show コマンドはアウトプット インタープリタ ツールによってサポートされています(登録ユーザ専用)。このツールを使用することによって、show コマンド出力の分析結果を表示できます。

OSPF データベースの検査

このネットワーク環境の情報が OSPF データベースにどのように格納されているかを確認するには、show ip ospf database コマンドの出力を調べます。.

r2.2.2.2#show ip ospf database 

       OSPF Router with ID (2.2.2.2) (Process ID 2) 

                Router Link States (Area 0) 

Link ID   ADV Router   Age   Seq#          Checksum   Link count 
1.1.1.1   1.1.1.1      522   0x80000002    0x96D3         3 
2.2.2.2   2.2.2.2      401   0x80000003    0x9FC2         3 

r2.2.2.2#show ip ospf database router 1.1.1.1 

       OSPF Router with ID (2.2.2.2) (Process ID 2) 

                Router Link States (Area 0) 

  LS age: 540 
  Options: (No TOS-capability, DC) 
  LS Type: Router Links 
  Link State ID: 1.1.1.1
  
!--- For router links, the Link State Id is always the same !--- as the Advertising Router (the next line).

  Advertising Router: 1.1.1.1
  
!--- This is the router ID of the router that !--- created this LSA. 

  LS Seq Number: 80000002 
  Checksum: 0x96D3 
  Length: 60 
   Number of Links: 3 

    Link connected to: another Router (point-to-point)
    
!--- This entry shows that this router (1.1.1.1) is a neighbor !--- with 2.2.2.2.

     (Link ID) Neighboring Router ID: 2.2.2.2 
     (Link Data) Router Interface address: 5.0.0.1
     
!--- Interface on this router (1.1.1.1) which connects the !--- neighbor (2.2.2.2).

      Number of TOS metrics: 0 
       TOS 0 Metrics: 64
     	
!--- The OSPF cost of the link is 64.


    Link connected to: a Stub Network
	
!--- This represents the subnet of the serial link 5.0.0.0/8. 

     (Link ID) Network/subnet number: 5.0.0.0 
     (Link Data) Network Mask: 255.0.0.0 
      Number of TOS metrics: 0 
       TOS 0 Metrics: 64
		
!--- The OSPF cost of the link is 64.


    Link connected to: a Stub Network
	
!--- This represents the subnet of the !--- Ethernet segment 4.0.0.0/8.

     (Link ID) Network/subnet number: 4.0.0.0 
     (Link Data) Network Mask: 255.0.0.0 
      Number of TOS metrics: 0 
       TOS 0 Metrics: 10
		
!--- The OSPF cost of the link is 10.

  

r2.2.2.2#show ip ospf database router 2.2.2.2 

       OSPF Router with ID (2.2.2.2) (Process ID 2) 

                Router Link States (Area 0) 

  LS age: 424 
  Options: (No TOS-capability, DC) 
  LS Type: Router Links 
  Link State ID: 2.2.2.2 
  Advertising Router: 2.2.2.2 
  LS Seq Number: 80000003 
  Checksum: 0x9FC2 
  Length: 60 
   Number of Links: 3 

    Link connected to: a Stub Network 
     (Link ID) Network/subnet number: 6.0.0.0 
     (Link Data) Network Mask: 255.0.0.0 
      Number of TOS metrics: 0 
       TOS 0 Metrics: 10 

    Link connected to: another Router (point-to-point) 
     (Link ID) Neighboring Router ID: 1.1.1.1 
     (Link Data) Router Interface address: 5.0.0.2 
      Number of TOS metrics: 0 
       TOS 0 Metrics: 64 
  
    Link connected to: a Stub Network 
     (Link ID) Network/subnet number: 5.0.0.0 
     (Link Data) Network Mask: 255.0.0.0 
      Number of TOS metrics: 0 
       TOS 0 Metrics: 64

最短パスの計算

この項では、ルータ 2.2.2.2 から見た最短パスツリーを計算します。

ルータ 2.2.2.2 は自身の LSA を参照し、ルータ 1.1.1.1 が近接ルータであることを認識します。ルータ 2.2.2.2 がルータ 1.1.1.1 の LSA を参照し、1.1.1.1 が 2.2.2.2 を近接ルータとして認識していることを確認します。両方のルータが互いに近接ルータとして認識しあっている場合、両ルータは到達可能と見なされます。

さらに各ルータはローカルの近接ルータ テーブル(show ip ospf neighbor コマンドで表示できる)をチェックし、自身のインターフェイスと近接ルータのインターフェイスが共通の IP サブネット上にあることを確認します。確認ができたら、両ルータは近接ルータの LSA にリストされているスタブ ネットワークへのルートを設定します。

この例では、ルータ 1.1.1.1 のルータ LSA 内にスタブ ネットワークとして 4.0.0.0/8 がリストされているため、ルータ 2.2.2.2 は自身のルーティング テーブル内に 4.0.0.0/8 への経路を開設します。ルータ 1.1.1.1 では、スタブ ネットワークとして 5.0.0.0/8 もリストされています。ただし、ルータ2.2.2.2は5.0.0.0/8へのOSPFルートをインストールしません。これは、5.0.0.0/8への接続ルートがあるためです。接続ルートは、動的に学習されたルートよりも常に優れているためです。

Router 2_2_2_2#
show ip route ospf
 
O    4.0.0.0/8 [110/74] via 5.0.0.1, 00:09:26, Serial0/1/0 

Router 1_1_1_1#show ip route ospf 
O    6.0.0.0/8 [110/74] via 5.0.0.2, 00:00:49, Serial2/1/0 

トラブルシュート

現在、この設定に関する特定のトラブルシューティング情報はありません。

関連情報