show ip ospf database

Use this command to display the OSPF link state database.

Syntax

show ip ospf database [area ospf area ID] [asbr-summary link-state-id] [external link-state-id] [network link-state-id] [nssa-external link-state-id] [router link-state-id] [summary link-state-id] database-summary [process process ID range] [vrf {vrf name | all}] [opaque-global link-state-id]

Parameters

area Area ID.
ospf area ID OSPF area ID in either:
  • Decimal value. Range is 0–4294967295
  • IP address format
  OSPF area ID in IP address format.
link-state-id (Optional) Specifies the link state identifier. Valid values are IP addresses.
router Displays router (Type 1) link state advertisements in their detailed format. Router advertisements are originated by all routers.
opaque-global Opaque global LSA. Displays all OSPF-remotely learned VNI/VTEP associations.
network Displays network (Type 2) link state advertisements in their detailed format. Network advertisements are originated by designated routers.
summary Displays summary (Type 3) link state advertisements in their original format. Summary advertisements are originated by ABRs.
asbr-summary Displays Autonomous System Border Router (ASBR) summary (Type 4) link status advertisements in their detail format. ASBR-summary advertisements are originated by ABRs.
external Displays external (Type 5) link state advertisements. Type 5 link state advertisements in their detailed format.
nssa-external Displays nssa-external (Type 7) link state advertisements in their detailed format. Type 7 advertisements are originated by ASBRs.
database-summary Displays a numerical summary of the contents of the link state database.
process process ID range Process identification range. Range is 1–65535.
vrf vrf name |all The VRF name. Either a specific VRF name (maximum of 32 characters) or all to specify all all VRFs.

Defaults

If link-state-id is not specified, the specified type of database records appears for all link state IDs.

Mode

All command modes.

Example

This example show how to display external OSPF database information for link-state ID 10.1.128.0:

System(rw)->show ip ospf database external 10.1.128.0
Displaying External Advertisements
LS age: 1461
Options: No TOS-capability
LS Type: AS External Links
Link State ID: 10.1.128.0
Advertising Router: 5.5.5.5
LS Seq Number: 80000004
Checksum: 0xb9a1
Length: 24
Network Mask: 255.255.128.0
Metric type 2 external (larger than any link state path)
TOS: 0 Metric: 20
Forwarding Address: 0.0.0.0
External Route Tag: 0
Number of TOS metrics: 0
System(rw)->
This example shows how to display OSPF-learned VNI/VTEP associations:
show ip ospf database opaque-global

LS age: 264
Options: No TOS-capability, E
LS Type: Opaque Global Links
Link State ID: 128.0.43.103    (VXLAN vni 11111)
Advertising Router: 192.168.10.9
LS Seq Number: 80000035
Checksum: 0xd142
Length: 1c
Opaque Information:
       Endpoint IP Address TLV: 192.168.10.5

show ip ospf database Output Details provides an explanation of the command output.

Click to expand in new window

show ip ospf database Output Details

Output... What it displays...
Advertising Router Router ID of the router originating the link state record.
LS Age Age (in seconds) of the link state record.
Options Options associated with this link state record.
LS Type Specifies the link state type for this link state record.
Link State ID Link ID, which varies as a function of the link state record type, as follows:
  • Net Link States—Shows the interface IP address of the designated router to the broadcast network.
  • Router Link States—Shows the ID of the router originating the record.
  • Summary Link States—Shows the summary network prefix.
  • VNI/VTEP—Shows VXLAN VNI.
Advertising Router Specifies the IP address of the router advertising this link state.
LS Seq Number OSPF sequence number assigned to each link state record.
Checksum Field in the link state record used to verify the contents upon receipt by another router.
Length Link count of router link state records. This number is equal to, or greater than, the number of active OSPF interfaces on the originating router.
Network Mask Specifies the network mask for this link state record.
TOS Specifies the Type of Service (ToS) configured for this link state record.
Metric Specifies the ToS metric value.
Forwarding Address Specifies the forwarding IP address associated with this link state record.
External Route Tag Specifies the external route tag assigned to this link state record.
Number of TOS metrics Specifies the number of ToS metrics associated with this link state record.
Opaque Information Shows OSPF-remotely learned VNI/VTEP associations.