OSPF(show ip ospf database)

 OSPFのトポロジデータベースの内容を確認するには、「show ip ospf database」コマンドを使用します。このコマンドで、トポロジデータベースの全体の概要を把握することができます。

●「show ip ospf database」の出力結果

Router_F#show ip ospf database

       OSPF Router with ID (172.21.0.2) (Process ID 1)


                Router Link States (Area 1) ← LSAタイプ1

Link ID         ADV Router      Age    Seq#       Checksum Link count
172.21.0.1      172.21.0.1      55     0x80000006 0xC86F   1
172.21.0.2      172.21.0.2      32     0x80000003 0xC96F   1

                Net Link States (Area 1) ← LSAタイプ2

Link ID         ADV Router      Age    Seq#       Checksum
172.21.0.2      172.21.0.2      32     0x80000002 0xCE7C

                Summary Net Link States (Area 1) ← LSAタイプ3

Link ID         ADV Router      Age    Seq#       Checksum
172.18.0.0      172.21.0.1      39     0x80000002 0xE5AA
172.19.0.0      172.21.0.1      39     0x80000004 0x9A13
172.20.0.0      172.21.0.1      39     0x80000002 0x2E8A
192.168.33.1    172.21.0.1      39     0x80000002 0xC527

                Summary ASB Link States (Area 1) ← LSAタイプ4

Link ID         ADV Router      Age    Seq#       Checksum
172.18.0.1      172.21.0.1      39     0x80000002 0xCDC0

                AS External Link States ← LSAタイプ5

Link ID         ADV Router      Age    Seq#       Checksum Tag
172.17.0.0      172.18.0.1      1790   0x80000003 0xCC04   0
192.168.1.0     172.18.0.1      1795   0x80000001 0xA580   0
192.168.2.0     172.18.0.1      1795   0x80000001 0x9A8A   0
192.168.3.0     172.18.0.1      1795   0x80000001 0x8F94   0
192.168.4.0     172.18.0.1      1795   0x80000001 0x849E   0

特定のLSAの情報を詳しく確認したい場合には、パラメータを指定します。

show ip ospf database router

 LSAタイプ1のルータLSAを確認するには、「show ip ospf database router」で確認できます。

●「show ip ospf database router」の出力結果

Router_D#show ip ospf database router

       OSPF Router with ID (172.20.0.1) (Process ID 1)


                Router Link States (Area 0)

  Routing Bit Set on this LSA
  LS age: 392
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 172.18.0.1
  Advertising Router: 172.18.0.1
  LS Seq Number: 80000003
  Checksum: 0xCD54
  Length: 48
  AS Boundary Router
   Number of Links: 2

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 172.19.0.1
     (Link Data) Router Interface address: 172.18.0.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 1562

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 172.18.0.0
     (Link Data) Network Mask: 255.255.0.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 1562


  LS age: 103
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 172.19.0.1
  Advertising Router: 172.19.0.1
  LS Seq Number: 80000004
  Checksum: 0xE9A5
  Length: 60
   Number of Links: 3

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 172.19.0.1
     (Link Data) Router Interface address: 172.19.0.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 172.18.0.1
     (Link Data) Router Interface address: 172.18.0.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 1562

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 172.18.0.0
     (Link Data) Network Mask: 255.255.0.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 1562


  LS age: 102
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 172.20.0.1
  Advertising Router: 172.20.0.1
  LS Seq Number: 80000004
  Checksum: 0x479
  Length: 60
   Number of Links: 3

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 172.21.0.1
     (Link Data) Router Interface address: 172.20.0.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 1562

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 172.20.0.0
     (Link Data) Network Mask: 255.255.0.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 1562

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 172.19.0.1
     (Link Data) Router Interface address: 172.19.0.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 10


  Routing Bit Set on this LSA
  LS age: 113
  Options: (No TOS-capability, No DC)
  LS Type: Router Links
  Link State ID: 172.21.0.1
  Advertising Router: 172.21.0.1
  LS Seq Number: 80000005
  Checksum: 0xC272
  Length: 48
  Area Border Router
   Number of Links: 2

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 172.20.0.1
     (Link Data) Router Interface address: 172.20.0.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 1562

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 172.20.0.0
     (Link Data) Network Mask: 255.255.0.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 1562

show ip ospf database network

 LSAタイプ2のネットワークLSAを確認するには、「show ip ospf database network」で確認できます。

●「show ip ospf database network」の出力結果

Router_D#show ip ospf database network

       OSPF Router with ID (172.20.0.1) (Process ID 1)


                Net Link States (Area 0)

  Routing Bit Set on this LSA
  LS age: 1590
  Options: (No TOS-capability, DC)
  LS Type: Network Links
  Link State ID: 172.19.0.2 (address of Designated Router)
  Advertising Router: 172.20.0.1
  LS Seq Number: 80000002
  Checksum: 0xE84A
  Length: 32
  Network Mask: /16
        Attached Router: 172.20.0.1
        Attached Router: 172.19.0.1

show ip ospf database summary

 LSAタイプ3のネットワークLSAを確認するには、「show ip ospf database summary」で確認できます。

●「show ip ospf database summary」の出力結果


Router_D#show ip ospf database summary

       OSPF Router with ID (172.20.0.1) (Process ID 1)


                Summary Net Link States (Area 0)

  Routing Bit Set on this LSA
  LS age: 64
  Options: (No TOS-capability, No DC)
  LS Type: Summary Links(Network)
  Link State ID: 172.21.0.0 (summary Network Number)
  Advertising Router: 172.21.0.1
  LS Seq Number: 80000005
  Checksum: 0x4585
  Length: 28
  Network Mask: /16
        TOS: 0  Metric: 10

show ip ospf database asbr-summary

 LSAタイプ4のネットワークLSAを確認するには、「show ip ospf database asbr-summary」で確認できます。

●「show ip ospf database asbr-summary」の出力結果


Router_F#show ip ospf database asbr-summary

       OSPF Router with ID (172.21.0.2) (Process ID 1)


                Summary ASB Link States (Area 1)

  Routing Bit Set on this LSA
  LS age: 171
  Options: (No TOS-capability)
  LS Type: Summary Links(AS Boundary Router)
  Link State ID: 172.18.0.1 (AS Boundary Router address)
  Advertising Router: 172.21.0.1
  LS Seq Number: 80000002
  Checksum: 0xCDC0
  Length: 28
  Network Mask: /0
        TOS: 0  Metric: 3134

show ip ospf database external

 LSAタイプ5のネットワークLSAを確認するには、「show ip ospf database external」で確認できます。

●「show ip ospf database external」の実行結果


Router_F#show ip ospf database external

       OSPF Router with ID (172.21.0.2) (Process ID 1)


                AS External Link States

  Routing Bit Set on this LSA
  LS age: 1414
  Options: (No TOS-capability)
  LS Type: AS External Link
  Link State ID: 172.16.0.0 (External Network Number )
  Advertising Router: 172.18.0.1
  LS Seq Number: 80000002
  Checksum: 0xFD66
  Length: 36
  Network Mask: /16
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 172.17.0.1
        External Route Tag: 0

show ip ospf database nssa-external

 LSAタイプ5のネットワークLSAを確認するには、「show ip ospf database nssa-external」で確認できます。

●「show ip ospf database nssa-external」の出力結果


Router_F#show ip ospf database nssa-external

       OSPF Router with ID (192.168.65.1) (Process ID 1)


                Type-7 AS External Link States (Area 1)

  Routing Bit Set on this LSA
  LS age: 34
  Options: (No TOS-capability, No Type 7/5 translation, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 172.21.0.1
  LS Seq Number: 80000001
  Checksum: 0x4CA2
  Length: 36
  Network Mask: /0
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 1
        Forward Address: 0.0.0.0
        External Route Tag: 0

  LS age: 1270
  Options: (No TOS-capability, Type 7/5 translation, DC)
  LS Type: AS External Link
  Link State ID: 192.168.65.0 (External Network Number )
  Advertising Router: 192.168.65.1
  LS Seq Number: 80000001
  Checksum: 0xA08B
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 100
        Forward Address: 172.21.0.2
        External Route Tag: 0

次の「OSPF(確認コマンド)」では、OSPFの設定や正しく動作していることを確認するためのコマンドを解説します。