show ip ospf database detail
Use this command to display details of the OSPF database.
Command Syntax
show ip ospf database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as) (self-originate|adv-router A.B.C.D|)
show ip ospf <0-65535> database (asbr-summary|external|network|router|summary) (self-originate|adv-router A.B.C.D|)
show ip ospf database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as) A.B.C.D (self-originate|adv-router A.B.C.D|)
show ip ospf <0-65535> database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as) A.B.C.D (self-originate|adv-router A.B.C.D|)
Parameters
<0-65535>
The ID of the router process for which information should be displayed.
asbr-summary
Type 4 ASBR summary LSAs.
external
Type 5 external LSAs.
network
Type 2 network LSAs.
router
Type 1 router LSAs.
summary
Type 3 summary LSAs.
nssa-external
Type 7 NSSA external LSAs.
opaque-link
Type 9 LSAs which are not flooded beyond the local network.
opaque-area
Type 10 LSAs which are not flooded beyond the borders of their area.
opaque-as
Type 11 LSAs which are flooded throughout the AS.
A.B.C.D
Link state ID as an IP address.
self-originate
Display self-originated link states.
adv-router
Advertising router link states.
A.B.C.D
IPv4 address of advertising router.
Default
None
Command Mode
Privileged execution mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
External and Self-originate Parameters
This is sample output with the external and self-originate parameters.
#show ip ospf database external self-originate
OSPF Router process 100 with ID (10.10.11.50)
AS External Link States
LS age: 298
Options: 0x2 (*|-|-|-|-|-|E|-)
LS Type: AS-external-LSA
Link State ID: 10.10.100.0 (External Network Number)
Advertising Router: 10.10.11.50
LS Seq Number: 80000001
Checksum: 0x7033
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 10.10.11.50
External Route Tag: 0
Opaque-as and Self-originate Parameters
This is sample output with the opaque-as and self-originate parameters.
#show ip ospf database opaque-as self-originate
OSPF Router process 100 with ID (10.10.11.50)
AS-Global Opaque-LSA
LS age: 325
Options: 0x2 (*|-|-|-|-|-|E|-)
LS Type: AS-external Opaque-LSA
Link State ID: 11.10.9.23 (AS-external Opaque-Type/ID)
Opaque Type: 11
Opaque ID: 657687
Advertising Router: 10.10.11.50
LS Seq Number: 80000001
Checksum: 0xb018
Length: 25
Example: adv-router Parameter
This is a sample output with the adv-router parameter.
#show ip ospf database nssa-external adv-router 10.10.11.50
OSPF Router process 100 with ID (10.10.11.50)
NSSA-external Link States (Area 0.0.0.0)
NSSA-external Link States (Area 0.0.0.1 [NSSA])
LS age: 78
Options: 0x0 (*|-|-|-|-|-|-|-)
LS Type: AS-NSSA-LSA
Link State ID: 0.0.0.0 (External Network Number For NSSA)
Advertising Router: 10.10.11.50
LS Seq Number: 80000001
Checksum: 0xc9b6
Length: 36
Network Mask: /0
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 1
NSSA: Forward Address: 0.0.0.0
OSPF Router process 100 with ID (10.10.11.50)
NSSA-external Link States (Area 0.0.0.0)
NSSA-external Link States (Area 0.0.0.1 [NSSA])
LS age: 78
Options: 0x0 (*|-|-|-|-|-|-|-)
LS Type: AS-NSSA-LSA
Link State ID: 0.0.0.0 (External Network Number For NSSA)
Router and Link State ID Parameters
This is sample output with the router and link state ID parameters.
#show ip ospf database router 10.10.11.50
OSPF Router process 100 with ID (10.10.11.50)
Router Link States (Area 0.0.0.0)
LS age: 878
Options: 0x2 (*|-|-|-|-|-|E|-)
Flags: 0x3 : ABR ASBR
LS Type: router-LSA
Link State ID: 10.10.11.50
Advertising Router: 10.10.11.50
LS Seq Number: 80000004
Checksum: 0xe39e
Length: 36
Number of Links: 1
Link connected to: Stub Network
(Link ID) Network/subnet number: 10.10.10.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metric: 10
Router Link States (Area 0.0.0.1)
LS age: 877
Options: 0x2 (*|-|-|-|-|-|E|-)
Flags: 0x3 : ABR ASBR
LS Type: router-LSA
Link State ID: 10.10.11.50
Advertising Router: 10.10.11.50
LS Seq Number: 80000003
Example: adv-router Parameter for Flood Reduction
This is sample output using the adv-router parameter for flood reduction.
#show ip ospf database summary adv-router 10.10.11.50
OSPF Router process 100 with ID (10.10.11.50)
Summary Link States (Area 0.0.0.0)
LS age: 1(DoNotAge)
Options: 0x2 (*|-|-|-|-|-|E|-)
LS Type: summary-LSA
Link State ID: 10.10.11.0 (summary Network Number)
Advertising Router: 10.10.11.50
LS Seq Number: 80000001
Checksum: 0x36ac
Length: 28
Network Mask: /24
TOS: 0 Metric: 10
Summary Link States (Area 0.0.0.1)
LS age: 989
Options: 0x2 (*|-|-|-|-|-|E|-)
LS Type: summary-LSA
Link State ID: 10.10.11.0 (summary Network Number)
Advertising Router: 10.10.11.50
LS Seq Number: 80000001
Checksum: 0x36ac
Length: 28
Network Mask: /24
TOS: 0 Metric: 10
#show ip ospf database external self-originate
OSPF Router process 100 with ID (10.10.11.50)
AS External Link States
LS age: 298
Options: 0x2 (*|-|-|-|-|-|E|-)
LS Type: AS-external-LSA
Link State ID: 10.10.100.0 (External Network Number)
Advertising Router: 10.10.11.50
LS Seq Number: 80000001
Checksum: 0x7033
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 10.10.11.50
External Route Tag: 0
Output Fields Description
Database Detail Header Fields
Here is the explanation of the "show command" output fields.
|
Field |
Description |
|---|---|
|
LS age |
Age of the LSA in seconds. “Do Not Age” is displayed if the DNA bit is set. |
|
Options |
LSA options as explained in Table 74. |
|
Flags |
ABR: Area border router ASBR: AS boundary router VL-endpoint: Endpoint of an active virtual link that is using the described area as a transit area Shortcut: shortcut ABR NSSA-Translator: NSSA border router with NSSA Translate or State enabled |
|
LS Type |
Type of LSA:
Router-LSA Network-LSA Summary-LSA ASBR-summary-LSA AS-external-LSA AS-NSSA-LSA Link-Local Opaque-LSA Area-Local Opaque-LSA AS-external Opaque-LSA |
|
Link State ID |
Identifier of the router described by the LSA. |
|
Opaque Type |
Opaque type used to identify the application type of the LSA:
9: link-local scope 10: area-local scope 11: LSA flooded throughout the AS |
|
Opaque ID |
Identifier used to differentiate LSAs of the same type. |
|
Advertising Router |
Identifier of the router that originated the LSA. |
|
LS Seq Number |
Sequence number of the LSA. This number increments each time a new instance of the LSA originates. This update helps other routers identify the most recent instance of the LSA. |
|
Checksum |
Checksum of the entire LSA, except the LS age field. |
|
Length |
Length of the LSA |
|
I LSA |
Indication LSA: ASBR set the infinity metric to tell all routers in the backbone not to originate DNA LSAs. |
OSPF LSA Option Bits
Here is the explanation of the "show command" output fields.
|
Bit |
Description |
|---|---|
|
DN |
Used in MPLS-based L3 VPNs. When a route learned from a customer network via OSPF is advertised across a BGP/MPLS VPN using Multiprotocol BGP and advertised back to a customer network via OSPF, a loop can happen where the OSPF route is redistributed back to the VPN service provider network via BGP. The DN-bit prevents this type of routing loop. When an OSPF router receives a Type 3, 5, or 7 LSA with the DN-bit set, it foes use that LSA for OSPF route calculations. |
|
O |
Originating router supports Type 9, 10, and 11 Opaque LSAs. |
|
DC |
Originating router supports OSPF over Demand Circuits. |
|
L |
Whether the OSPF packet contains a Link-Local Signaling (LLS) data block. This bit is set only in Hello and database description packets. |
|
N/P |
The N-bit is used only in Hello packets when the originating router supports Type-7 NSSA-External-LSAs. Neighboring routers with mismatched N-bit will not form a neighbor relationship. This restriction ensures that all OSPF routers within an area support NSSA capabilities. When the N-bit is set, the E-bit must be 0. The P-bit is used only in Type-7 NSSA-External-LSA headers. Due to this reason, the N- and P-bits share the same position in the options field. The P (Propagate) bit is set to inform an NSSA ABR to translate Type-7 LSAs into Type-5 LSAs. |
|
MC |
Originating router supports multicast extensions to OSPF (MOSPF) |
|
E |
Originating router accepts AS External LSAs. The bit is set in all AS External LSAs and in all LSAs originated in the backbone and non-stub areas; and is be set to 0 in all Hellos and LSAs originated within a stub area. Additionally, this bit is used in Hello packets to indicate the capability of a router interface to send and receive Type-5 AS-External-LSAs. Neighboring routers with mismatched E-bit do not form a neighbor relationship. This restriction ensures that all OSPF routers within an area support the stub capabilities. |
|
T |
Originating router supports Multitopology OSPF (MT-OSPF.) Older OSPF specifications used this bit when the originating router support TOS-based routing. However, OSPF TOS-based routing was never deployed; therefore the T-bit was never used. |
Type 1 Router LSAs (“router” Parameter)
Here is the explanation of the "show command" output fields.
|
Field |
Description |
|---|---|
|
Number of Links |
Number of router links the LSA describes. |
|
Link connected to |
Description of the router link:
another Router (point-to-point) a Transit Network Stub Network a Virtual Link |
|
(Link ID) |
Identifier of the router to which the link connects:
Neighboring Router ID Designated Router address Network/subnet number Neighboring Router ID |
|
(Link Data) |
Extra information:
Router Interface address Network Mask |
|
Number of TOS metrics |
Number of TOS (Type of Service) metrics for this link, not including the metric for TOS 0. |
|
TOS 0 Metric |
Cost of using this router link for TOS 0. |
Type 2 Net Link States (“network” Parameter)
Here is the explanation of the "show command" output fields.
|
Field |
Description |
|---|---|
|
Network Mask |
IP address mask for the network. |
|
Attached Router |
Identifiers of each router attached to the network. |
Type 3 Summary LSAs (“summary” Parameter) and Type 4 ASBR Summary LSAs (“asbr-summary” Parameter)
Here is the explanation of the "show command" output fields.
|
Field |
Description |
|---|---|
|
Network Mask |
For Type 3 LSAs, the destination network's IP address mask. Not meaningful for Type 4 link state advertisements. |
|
TOS: 0 Metric |
Cost of using this router link for TOS 0. |
Type 5 AS External LSAs (“external” Parameter)
Here is the explanation of the "show command" output fields.
|
Field |
Description |
|---|---|
|
Network Mask |
IP address mask for the advertised destination |
|
Metric Type |
1: Type 1 external metric that is comparable directly (without translation) to the link state metric 2: Type 2 external metric that is considered larger than any link state path |
|
TOS |
Always zero. |
|
Metric |
The cost of this route. |
|
Forward Address |
Data traffic for the advertised destination is forwarded to this address. |
|
External Route Tag |
Custom field attached to each external route whose use is defined by the application. |
Type 7 NSSA External Link States (“nssa-external” Parameter)
Here is the explanation of the "show command" output fields.
|
Field |
Description |
|---|---|
|
Network Mask |
IP address mask for the advertised destination |
|
Metric Type |
1: Type 1 external metric that is comparable directly (without translation) to the link state metric 2: Type 2 external metric that is considered larger than any link state path |
|
Metric |
The cost of this route. |
|
NSSA: Forward Address |
Data traffic for the advertised destination is forwarded to this address. |
|
External Route Tag |
Custom field attached to each external route whose use is defined by the application. |