show ip ospf database

To display the Open Shortest Path First (OSPF) database for a specific router, use the show ip ospf database command.

show ip ospf [ instance-tag ] database [ area-id ] [ link-state-id ] [ adv-router ip-address | self-originated ] [ detail ] [ vrf vrf-name ]

show ip ospf [ instance-tag ] database asbr-summary [ area-id ] [ link-state-id ] [ adv-router ip-address | self-originated ] [ detail ] [ vrf vrf-name ]

show ip ospf [ instance-tag ] database database-summary [ vrf vrf-name ]

show ip ospf [ instance-tag ] database external [ ext_tag value ] [ link-state-id ] [ adv-router ip-address | self-originated ] [ detail ] [ vrf vrf-name ]

show ip ospf [ instance-tag ] database network [ area-id ] [ link-state-id ] [ adv-router ip-address | self-originated ] [ detail ] [ vrf vrf-name ]

show ip ospf [ instance-tag ] database nssa-external [ area-id ] [ link-state-id ] [ adv-router ip-address | self-originated ] [ detail ] [ vrf vrf-name ]

show ip ospf [ instance-tag ] database opaque-area [ area-id ] [ link-state-id ] [ adv-router ip-address | self-originated ] [ detail ] [ vrf vrf-name ]

show ip ospf [ instance-tag ] database opaque-as [ link-state-id ] [ adv-router ip-address | self-originated ] [ detail ] [ vrf vrf-name ]

show ip ospf [ instance-tag ] database opaque-link [ area-id ] [ link-state-id ] [ adv-router ip-address | self-originated ] [ detail ] [ vrf vrf-name ]

show ip ospf [ instance-tag ] database router [ area-id ] [ link-state-id ] [ adv-router ip-address | self-originated ] [ detail ] [ vrf vrf-name ]

show ip ospf [ instance-tag ] database summary [ area-id ] [ link-state-id ] [ adv-router ip-address | self-originated ] [ detail ] [ vrf vrf-name ]

Syntax Description

instance-tag
(Optional) Name of the OSPF instance. The name can be a maximum of 20 alphanumeric characters.
area-id
(Optional) Area number used to define the particular area. Specify as either an IP address or a number from 0 to 4294967295.
link-state-id
(Optional) Portion of the Internet environment that is being described by the advertisement. The value entered depends on the advertisement's link-state type. Specify in the form of an IP address.
adv-router ip-address
(Optional) Displays all the link-state advertisements (LSAs) of the specified router.
self-originate
(Optional) Displays self-originated LSAs (from the local router).
asbr-summary
(Optional) Displays information about the autonomous system boundary router summary LSAs.
database-summary
(Optional) Displays each type of LSA for each area in the database, and the total number of LSAs.
external
(Optional) Displays information about the external LSAs.
ext_tag value
(Optional) Displays information based on an external tag. The range is from 1 to 4294967295.
network
(Optional) Displays information about the network LSAs.
nssa-external
(Optional) Displays information about the not-so-stubby area (NSSA) external LSAs.
opaque-area
(Optional) Displays information about the opaque area LSAs.
opaque-as
(Optional) Displays information about the opaque AS LSAs.
opaque-link
(Optional) Displays information about the opaque link-local LSAs.
router
(Optional) Displays information about the router LSAs.
summary
(Optional) Displays information about the summary LSAs.
vrf vrf-name
(Optional) Specifies the name of the virtual routing and forwarding (VRF) instance. The vrf-name argument can be specified as any case-sensitive, alphanumeric string up to 32 characters. The strings default and all are reserved VRF names.

Command Default

None

Command Modes

Any command mode

Command History

Release
Modification
5.0(3)N1(1)
This command was introduced.

Usage Guidelines

Use the ip ospf database command to display information about different OSPF LSAs.

When the link state advertisement is describing a network, the link-state-id argument can take one of two forms:

This command requires the LAN Base Services license.

Examples

This example shows how to display the OSPF database:

switch# show ip ospf database
 

This example shows how to display a summary of autonomous system border routers:

switch# show ip ospf database asbr-summary
 

This example shows how to display information about external links:

switch# show ip ospf database external
 

This example shows how to display a summary of the OSPF database:

switch# show ip ospf database database-summary
 

Related Commands

Command
Description
show running-config ospf
Displays the OSPF running configuration.