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 (extended-link link-addr link-address)> <opaque-area (extended-prefix prefix prefix length)><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>
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. |
extended-link link-addr link-address |
(Optional) Displays the specific extended-link LSAs based on the link-address. |
extended-prefix prefix prefix/len |
(Optional) Displays the specific extended-prefix LSAs based on the prefix. |
router |
(Optional) Display information about router LSAs. |
Required Privilege Level
view
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.
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:
|
|
Network |
Network link-state advertisement information:
|
|
Summary |
Summary link-state advertisement information:
|
|
Gen timer |
How long until the LSA is regenerated. |
|
Aging timer |
How long until the LSA expires. |
|
Installed hh:mm:ss ago |
How long ago the route was installed. |
|
expires in hh:mm:ss |
How long until the route expires. |
|
sent hh:mm:ss ago |
How long ago the LSA was sent. |
|
Last changed hh:mm:ss ago |
How long ago the route was changed. |
|
Change count |
Number of times the route has changed. |
|
Ours |
Indicates that this is a local advertisement. |
|
Router LSAs |
Number of router link-state advertisements in the link-state database. |
|
Network LSAs |
Number of network link-state advertisements in the link-state database. |
|
Summary LSAs |
Number of summary link-state advertisements in the link-state database. |
|
NSSA LSAs |
Number of not-so-stubby area link-state advertisements in the link-state database. |
|
Sample Output
- show ospf database
- show ospf database
- show ospf database brief
- show ospf database detail
- show ospf database extensive
- show ospf database extensive
- show ospf database summary
- show ospf database opaque-area extended-link link-addr link-address
- show ospf database opaque-area extended-prefix prefix prefix/len
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
The output for show ospf databse nssa
with nssa-only
configuration statement enabled at [edit policy-options policy-statement
policy-name term term name then
external]
, which clears P-bit on type 7 LSA.
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 0x20 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 0x20 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 advertising-router self lsa-id 4.0.0.0 Flex-Algorithm Definition (16), length 28: Flex-Algo (1), length 1: 128 Metric-Type (2), length 1: 2 Calc-Type (3), length 1: 1 Priority (4), length 1: 10 FAD AG Exclude (1), length 4: Exclude AG (1), length 4: 0x4 FAD AG Include Any (2), length 4: Include Any AG (1), length 4: 0x2 FAD AG Include All (3), length 4: Include All AG (1), length 4: 0x2 FAD Flags (4), length 4: Flags (1), length 4: 0X80000000
show ospf database extensive
user@host> show ospf database advertising-router self lsa-id 7.0.0.1 extensive Extended Prefix (1), length 20: Route Type (1), length 1: 1 Prefix Length (2), length 1: 32 AF (3), length 1: 0 Flags (4), length 1: 0x40 Prefix (5), length 32: 2.2.2.2 Prefix Sid (2), length 8: Flags (1), length 1: 0x00 MT ID (2), length 1: 0 Algorithm (3), length 1: 0 SID (4), length 4: 1000 FAPM (3), length 8: Algorithm (1), length 1: 128 Flags (2), length 1: 0x00 Metric (3), length 4: 1000
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:
show ospf database opaque-area extended-link link-addr link-address
user@host> show ospf database extended-link link-addr 21.5.7.2 OSPF database, Area 0.0.0.0 Type ID Adv Rtr Seq Age Opt Cksum Len OpaqArea 8.0.0.1 7.7.7.7 0x8000021e 301 0x22 0x20ab 48
show ospf database opaque-area extended-prefix prefix prefix/len
user@host>show ospf database extended-prefix prefix 1.1.1.1/32 OSPF database, Area 0.0.0.0 Type ID Adv Rtr Seq Age Opt Cksum Len OpaqArea 7.0.0.1 1.1.1.1 0x80000213 1833 0x22 0x88ee 44
Release Information
Command introduced before Junos OS Release 7.4.
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.
show ospf database opaque-area extended-link link-addr
(link-address) option introduced in Junos OS Release 23.2R1 and Junos
OS Evoved 23.2R1.
show ospf database opaque-area extended-prefix prefix
(prefix
length) option introduced in Junos OS Release 23.2R1 and Junos OS Evoved
23.2R1.