Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    show ospf database

    Syntax

    show ospf database<brief | detail | extensive | summary><advertising-router (address | self)><area area-id><asbrsummary><external><instance instance-name><link-local><logical-system (all | logical-system-name)><lsa-id lsa-id> <netsummary><network><nssa><opaque-area><router>

    Syntax (EX Series Switches and QFX Series)

    show ospf database<brief | detail | extensive | summary><advertising-router (address | self)><area area-id><asbrsummary><external><instance instance-name><link-local><lsa-id lsa-id> <netsummary><network><nssa><opaque-area><router>

    Release Information

    Command introduced before Junos OS Release 7.4.

    Command introduced in Junos OS Release 9.0 for EX Series switches.

    advertising-router self (address | self) option introduced in Junos OS Release 9.5.

    advertising-router self (address | self) option introduced in Junos OS Release 9.5 for EX Series switches.

    Command introduced in Junos OS Release 11.3 for the QFX Series.

    Description

    Display the entries in the OSPF version 2 (OSPFv2) link-state database, which contains data about link-state advertisement (LSA) packets.

    Options

    none
    —

    Display standard information about entries in the OSPFv2 link-state database for all routing instances.

    brief | detail | extensive | summary
    —

    (Optional) Display the specified level of output.

    advertising-router (address | self)
    —

    (Optional) Display the LSAs advertised either by a particular routing device or by this routing device.

    area area-id
    —

    (Optional) Display the LSAs in a particular area.

    asbrsummary
    —

    (Optional) Display summary AS boundary router LSA entries.

    external
    —

    (Optional) Display external LSAs.

    instance instance-name
    —

    (Optional) Display all OSPF database information under the named routing instance.

    link-local
    —

    (Optional) Display information about link-local LSAs.

    logical-system (all | logical-system-name)
    —

    (Optional) Perform this operation on all logical systems or on a particular logical system.

    lsa-id lsa-id
    —

    (Optional) Display the LSA with the specified LSA identifier.

    netsummary
    —

    (Optional) Display summary network LSAs.

    network
    —

    (Optional) Display information about network LSAs.

    nssa
    —

    (Optional) Display information about not-so-stubby area (NSSA) LSAs.

    opaque-area
    —

    (Optional) Display opaque area-scope LSAs.

    router
    —

    (Optional) Display information about router LSAs.

    Required Privilege Level

    view

    List of Sample Output

    show ospf database
    show ospf database brief
    show ospf database detail
    show ospf database extensive
    show ospf database summary

    Output Fields

    Table 1 describes the output fields for the show ospf database command. Output fields are listed in the approximate order in which they appear.

    Table 1: show ospf database Output Fields

    Field Name

    Field Description

    Level of Output

    area

    Area number. Area 0.0.0.0 is the backbone area.

    All levels

    Type

    Type of link advertisement: ASBRSum, Extern, Network, NSSA, OpaqArea, Router, or Summary.

    All levels

    ID

    LSA identifier included in the advertisement. An asterisk preceding the identifier marks database entries that originated from the local routing device.

    All levels

    Adv Rtr

    Address of the routing device that sent the advertisement.

    All levels

    Seq

    Link sequence number of the advertisement.

    All levels

    Age

    Time elapsed since the LSA was originated, in seconds.

    All levels

    Opt

    Optional OSPF capabilities associated with the LSA.

    All levels

    Cksum

    Checksum value of the LSA.

    All levels

    Len

    Length of the advertisement, in bytes.

    All levels

    Router

    Router link-state advertisement information:

    • bits—Flags describing the routing device that generated the LSP.
    • link count—Number of links in the advertisement.
    • id—ID of a routing device or subnet on the link.
    • data—For stub networks, the subnet mask. Otherwise, the IP address of the routing device that generated the LSP.
    • type—Type of link. It can be PointToPoint, Transit, Stub, or Virtual.
    • TOS count—Number of type-of-service (ToS) entries in the advertisement.
    • TOS 0 metric—Metric for ToS 0.
    • TOS—Type-of-service (ToS) value.
    • metric—Metric for the ToS.

    detail extensive

    Network

    Network link-state advertisement information:

    • mask—Network mask.
    • attached router—ID of the attached neighbor.

    detail extensive

    Summary

    Summary link-state advertisement information:

    • mask—Network mask.
    • TOS—Type-of-service (ToS) value.
    • metric—Metric for the ToS.

    detail extensive

    Gen timer

    How long until the LSA is regenerated.

    extensive

    Aging timer

    How long until the LSA expires.

    extensive

    Installed hh:mm:ss ago

    How long ago the route was installed.

    extensive

    expires in hh:mm:ss

    How long until the route expires.

    extensive

    sent hh:mm:ss ago

    How long ago the LSA was sent.

    extensive

    Last changed hh:mm:ss ago

    How long ago the route was changed.

    extensive

    Change count

    Number of times the route has changed.

    extensive

    Ours

    Indicates that this is a local advertisement.

    extensive

    Router LSAs

    Number of router link-state advertisements in the link-state database.

    summary

    Network LSAs

    Number of network link-state advertisements in the link-state database.

    summary

    Summary LSAs

    Number of summary link-state advertisements in the link-state database.

    summary

    NSSA LSAs

    Number of not-so-stubby area link-state advertisements in the link-state database.

    summary

    Sample Output

    show ospf database

    user@host> show ospf database
    OSPF link state database, Area 0.0.0.1
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Router   10.255.70.103    10.255.70.103    0x80000002   215  0x20 0x4112  48
    Router  *10.255.71.242    10.255.71.242    0x80000002   214  0x20 0x11b1  48
    Summary *23.1.1.0         10.255.71.242    0x80000002   172  0x20 0x6d72  28
    Summary *24.1.1.0         10.255.71.242    0x80000002   177  0x20 0x607e  28
    NSSA    *33.1.1.1         10.255.71.242    0x80000002   217  0x28 0x73bd  36
    
        OSPF link state database, Area 0.0.0.2
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Router   10.255.71.52     10.255.71.52     0x80000004   174  0x20 0xd021  36
    Router  *10.255.71.242    10.255.71.242    0x80000003   173  0x20 0xe191  36
    Network *23.1.1.1         10.255.71.242    0x80000002   173  0x20 0x9c76  32
    Summary *12.1.1.0         10.255.71.242    0x80000001   217  0x20 0xfeec  28
    Summary *24.1.1.0         10.255.71.242    0x80000002   177  0x20 0x607e  28
    NSSA    *33.1.1.1         10.255.71.242    0x80000001   222  0x28 0xe047  36
    
        OSPF link state database, Area 0.0.0.3
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Router   10.255.71.238    10.255.71.238    0x80000003   179  0x20 0x3942  36
    Router  *10.255.71.242    10.255.71.242    0x80000003   177  0x20 0xf37d  36
    Network *24.1.1.1         10.255.71.242    0x80000002   177  0x20 0xc591  32
    Summary *12.1.1.0         10.255.71.242    0x80000001   217  0x20 0xfeec  28
    Summary *23.1.1.0         10.255.71.242    0x80000002   172  0x20 0x6d72  28
    NSSA    *33.1.1.1         10.255.71.242    0x80000001   222  0x28 0xeb3b  36

    show ospf database brief

    The output for the show ospf database brief command is identical to that for the show ospf database command. For sample output, see show ospf database .

    show ospf database detail

    user@host> show ospf database detail
        OSPF link state database, Area 0.0.0.1
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Router   10.255.70.103    10.255.70.103    0x80000002   261  0x20 0x4112  48
      bits 0x0, link count 2
      id 10.255.71.242, data 12.1.1.1, Type PointToPoint (1)
      TOS count 0, TOS 0 metric 1
      id 12.1.1.0, data 255.255.255.0, Type Stub (3)
      TOS count 0, TOS 0 metric 1
    Router  *10.255.71.242    10.255.71.242    0x80000002   260  0x20 0x11b1  48
      bits 0x3, link count 2
      id 10.255.70.103, data 12.1.1.2, Type PointToPoint (1)
      TOS count 0, TOS 0 metric 1
      id 12.1.1.0, data 255.255.255.0, Type Stub (3)
      TOS count 0, TOS 0 metric 1
    Summary *23.1.1.0         10.255.71.242    0x80000002   218  0x20 0x6d72  28
      mask 255.255.255.0
      TOS 0x0, metric 1
    Summary *24.1.1.0         10.255.71.242    0x80000002   223  0x20 0x607e  28
      mask 255.255.255.0
      TOS 0x0, metric 1
    NSSA    *33.1.1.1         10.255.71.242    0x80000002   263  0x28 0x73bd  36
      mask 255.255.255.255
      Type 2, TOS 0x0, metric 0, fwd addr 12.1.1.2, tag 0.0.0.0
    
        OSPF link state database, Area 0.0.0.2
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Router   10.255.71.52     10.255.71.52     0x80000004   220  0x20 0xd021  36
      bits 0x0, link count 1
      id 23.1.1.1, data 23.1.1.2, Type Transit (2)
      TOS count 0, TOS 0 metric 1
    Router  *10.255.71.242    10.255.71.242    0x80000003   219  0x20 0xe191  36
      bits 0x3, link count 1
      id 23.1.1.1, data 23.1.1.1, Type Transit (2)
      TOS count 0, TOS 0 metric 1
    Network *23.1.1.1         10.255.71.242    0x80000002   219  0x20 0x9c76  32
      mask 255.255.255.0
      attached router 10.255.71.242
      attached router 10.255.71.52
    Summary *12.1.1.0         10.255.71.242    0x80000001   263  0x20 0xfeec  28
      mask 255.255.255.0
      TOS 0x0, metric 1
    Summary *24.1.1.0         10.255.71.242    0x80000002   223  0x20 0x607e  28
      mask 255.255.255.0
      TOS 0x0, metric 1
    NSSA    *33.1.1.1         10.255.71.242    0x80000001   268  0x28 0xe047  36
      mask 255.255.255.255
      Type 2, TOS 0x0, metric 0, fwd addr 23.1.1.1, tag 0.0.0.0
    
        OSPF link state database, Area 0.0.0.3
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Router   10.255.71.238    10.255.71.238    0x80000003   225  0x20 0x3942  36
      bits 0x0, link count 1
      id 24.1.1.1, data 24.1.1.2, Type Transit (2)
      TOS count 0, TOS 0 metric 1
    Router  *10.255.71.242    10.255.71.242    0x80000003   223  0x20 0xf37d  36
      bits 0x3, link count 1
      id 24.1.1.1, data 24.1.1.1, Type Transit (2)
      TOS count 0, TOS 0 metric 1
    Network *24.1.1.1         10.255.71.242    0x80000002   223  0x20 0xc591  32
      mask 255.255.255.0
      attached router 10.255.71.242
      attached router 10.255.71.238
    Summary *12.1.1.0         10.255.71.242    0x80000001   263  0x20 0xfeec  28
      mask 255.255.255.0
      TOS 0x0, metric 1
    Summary *23.1.1.0         10.255.71.242    0x80000002   218  0x20 0x6d72  28
      mask 255.255.255.0
      TOS 0x0, metric 1
    NSSA    *33.1.1.1         10.255.71.242    0x80000001   268  0x28 0xeb3b  36
      mask 255.255.255.255
      Type 2, TOS 0x0, metric 0, fwd addr 24.1.1.1, tag 0.0.0.0

    show ospf database extensive

    user@host> show ospf database extensive
        OSPF link state database, Area 0.0.0.1
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Router   10.255.70.103    10.255.70.103    0x80000002   286  0x20 0x4112  48
      bits 0x0, link count 2
      id 10.255.71.242, data 12.1.1.1, Type PointToPoint (1)
      TOS count 0, TOS 0 metric 1
      id 12.1.1.0, data 255.255.255.0, Type Stub (3)
      TOS count 0, TOS 0 metric 1
      Aging timer 00:55:14
      Installed 00:04:43 ago, expires in 00:55:14
      Last changed 00:04:43 ago, Change count: 2
    Router  *10.255.71.242    10.255.71.242    0x80000002   285  0x20 0x11b1  48
      bits 0x3, link count 2
      id 10.255.70.103, data 12.1.1.2, Type PointToPoint (1)
      TOS count 0, TOS 0 metric 1
      id 12.1.1.0, data 255.255.255.0, Type Stub (3)
      TOS count 0, TOS 0 metric 1
      Gen timer 00:45:15
      Aging timer 00:55:15
      Installed 00:04:45 ago, expires in 00:55:15, sent 00:04:43 ago
      Last changed 00:04:45 ago, Change count: 2, Ours
    Summary *23.1.1.0         10.255.71.242    0x80000002   243  0x20 0x6d72  28
      mask 255.255.255.0
      TOS 0x0, metric 1
      Gen timer 00:45:57
      Aging timer 00:55:57
      Installed 00:04:03 ago, expires in 00:55:57, sent 00:04:01 ago
      Last changed 00:04:48 ago, Change count: 1, Ours
    Summary *24.1.1.0         10.255.71.242    0x80000002   248  0x20 0x607e  28
      mask 255.255.255.0
      TOS 0x0, metric 1
      Gen timer 00:45:52
      Aging timer 00:55:52
      Installed 00:04:08 ago, expires in 00:55:52, sent 00:04:06 ago
      Last changed 00:04:48 ago, Change count: 1, Ours
    NSSA    *33.1.1.1         10.255.71.242    0x80000002   288  0x28 0x73bd  36
      mask 255.255.255.255
      Type 2, TOS 0x0, metric 0, fwd addr 12.1.1.2, tag 0.0.0.0
      Gen timer 00:45:12
      Aging timer 00:55:12
      Installed 00:04:48 ago, expires in 00:55:12, sent 00:04:48 ago
      Last changed 00:04:48 ago, Change count: 2, Ours
    
        OSPF link state database, Area 0.0.0.2
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Router   10.255.71.52     10.255.71.52     0x80000004   245  0x20 0xd021  36
      bits 0x0, link count 1
      id 23.1.1.1, data 23.1.1.2, Type Transit (2)
      TOS count 0, TOS 0 metric 1
      Aging timer 00:55:55
      Installed 00:04:02 ago, expires in 00:55:55
      Last changed 00:04:02 ago, Change count: 2
    Router  *10.255.71.242    10.255.71.242    0x80000003   244  0x20 0xe191  36
      bits 0x3, link count 1
      id 23.1.1.1, data 23.1.1.1, Type Transit (2)
      TOS count 0, TOS 0 metric 1
      Gen timer 00:45:56
      Aging timer 00:55:56
      Installed 00:04:04 ago, expires in 00:55:56, sent 00:04:02 ago
      Last changed 00:04:04 ago, Change count: 2, Ours
    Network *23.1.1.1         10.255.71.242    0x80000002   244  0x20 0x9c76  32
      mask 255.255.255.0
      attached router 10.255.71.242
      attached router 10.255.71.52
      Gen timer 00:45:56
      Aging timer 00:55:56
      Installed 00:04:04 ago, expires in 00:55:56, sent 00:04:02 ago
      Last changed 00:04:04 ago, Change count: 1, Ours
    Summary *12.1.1.0         10.255.71.242    0x80000001   288  0x20 0xfeec  28
      mask 255.255.255.0
      TOS 0x0, metric 1
      Gen timer 00:45:12
      Aging timer 00:55:12
      Installed 00:04:48 ago, expires in 00:55:12, sent 00:04:04 ago
      Last changed 00:04:48 ago, Change count: 1, Ours
    Summary *24.1.1.0         10.255.71.242    0x80000002   248  0x20 0x607e  28
      mask 255.255.255.0
      TOS 0x0, metric 1
      Gen timer 00:45:52
      Aging timer 00:55:52
      Installed 00:04:08 ago, expires in 00:55:52, sent 00:04:04 ago
      Last changed 00:04:48 ago, Change count: 1, Ours
    NSSA    *33.1.1.1         10.255.71.242    0x80000001   293  0x28 0xe047  36
      mask 255.255.255.255
      Type 2, TOS 0x0, metric 0, fwd addr 23.1.1.1, tag 0.0.0.0
      Gen timer 00:45:07
      Aging timer 00:55:07
      Installed 00:04:53 ago, expires in 00:55:07, sent 00:04:04 ago
      Last changed 00:04:53 ago, Change count: 1, Ours
    
        OSPF link state database, Area 0.0.0.3
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Router   10.255.71.238    10.255.71.238    0x80000003   250  0x20 0x3942  36
      bits 0x0, link count 1
      id 24.1.1.1, data 24.1.1.2, Type Transit (2)
      TOS count 0, TOS 0 metric 1
      Aging timer 00:55:50
      Installed 00:04:07 ago, expires in 00:55:50
      Last changed 00:04:07 ago, Change count: 2
    Router  *10.255.71.242    10.255.71.242    0x80000003   248  0x20 0xf37d  36
      bits 0x3, link count 1
      id 24.1.1.1, data 24.1.1.1, Type Transit (2)
      TOS count 0, TOS 0 metric 1
      Gen timer 00:45:52
      Aging timer 00:55:52
      Installed 00:04:08 ago, expires in 00:55:52, sent 00:04:06 ago
      Last changed 00:04:08 ago, Change count: 2, Ours
    Network *24.1.1.1         10.255.71.242    0x80000002   248  0x20 0xc591  32
      mask 255.255.255.0
      attached router 10.255.71.242
      attached router 10.255.71.238
      Gen timer 00:45:52
      Aging timer 00:55:52
      Installed 00:04:08 ago, expires in 00:55:52, sent 00:04:06 ago
      Last changed 00:04:08 ago, Change count: 1, Ours
    Summary *12.1.1.0         10.255.71.242    0x80000001   288  0x20 0xfeec  28
      mask 255.255.255.0
      TOS 0x0, metric 1
      Gen timer 00:45:12
      Aging timer 00:55:12
      Installed 00:04:48 ago, expires in 00:55:12, sent 00:04:13 ago
      Last changed 00:04:48 ago, Change count: 1, Ours
    Summary *23.1.1.0         10.255.71.242    0x80000002   243  0x20 0x6d72  28
      mask 255.255.255.0
      TOS 0x0, metric 1
      Gen timer 00:45:57
      Aging timer 00:55:57
      Installed 00:04:03 ago, expires in 00:55:57, sent 00:04:01 ago
      Last changed 00:04:48 ago, Change count: 1, Ours
    NSSA    *33.1.1.1         10.255.71.242    0x80000001   293  0x28 0xeb3b  36
      mask 255.255.255.255
      Type 2, TOS 0x0, metric 0, fwd addr 24.1.1.1, tag 0.0.0.0
      Gen timer 00:45:07
      Aging timer 00:55:07
      Installed 00:04:53 ago, expires in 00:55:07, sent 00:04:13 ago
      Last changed 00:04:53 ago, Change count: 1, Ours

    show ospf database summary

    user@host> show ospf database summary
    Area 0.0.0.1:
       2 Router LSAs
       2 Summary LSAs
       1 NSSA LSAs
    Area 0.0.0.2:
       2 Router LSAs
       1 Network LSAs
       2 Summary LSAs
       1 NSSA LSAs
    Area 0.0.0.3:
       2 Router LSAs
       1 Network LSAs
       2 Summary LSAs
       1 NSSA LSAs
    Externals:
    Interface fe-2/2/1.0:
    Interface ge-0/3/2.0:
    Interface so-0/1/2.0:
    Interface so-0/1/2.0:

    Published: 2014-05-08