show ip ospf database
Shows OSPFv2 database information.
Syntax
show ip ospf database
database-summary
[
vrf
vrfname
]
show ip ospf database
external-link-state
[
advertise
index
|
extensive
|
link-state-id
id
|
router-id
router-id
|
sequence-number
num
]
[
vrf
vrfname
]
show ip ospf database
grace-link-state
[
vrf
vrfname
]
show ip ospf database
link-state
[
adv-router
router-id
|
advertise
index
|
asbr
{
asbr-id
|
adv-router
router-id
}
|
extensive
|
link-state-id
id
|
network
{
net-id
|
adv-router
router-id
}
|
nssa
{
nssa-id
|
adv-router
router-id
}
|
router
{
router-id
|
adv-router
router-id
}
|
self-originate
|
sequence-number
num
|
summary
{
id
|
adv-router
router-id
}
]
[
vrf
vrfname
]
show ip ospf database
[
vrf
vrfname
]
Parameters
-
database-summary
- Displays how many link state advertisements (LSAs) of each type exist for each area, as well as total number of LSAs.
-
vrf
name
- Specifies the name of the VRF instance. If this option is not used, details for the default VRF are shown in the output.
-
external-link-state
- Displays information by external link state, based on the following parameters:
- advertise
index
- Displays the hexadecimal data in the specified LSA packet. The index parameter identifies the LSA packet by its position in the router‘s External LSA table. To determine an LSA packet‘s position in the table, enter the
show ip ospf external-link-state command.
- extensive
- Displays LSAs in decrypt format. Do not use this parameter in combination with other display parameters because the entire database is displayed.
- link-state-id
id
- Displays external LSAs for the LSA source that you specify.
- router-id
router-id
- Displays external LSAs for the advertising router that you specify.
- sequence-number
num
- Displays the External LSA entries for the hexadecimal LSA sequence number that you specify.
-
link-state
- Displays the link state, based on the following parameters:
- adv-router
router-id
- Displays the link state for the advertising router that you specify.
- advertise
index
- Displays the hexadecimal data in the specified LSA packet. The index parameter identifies the LSA packet by its position in the router‘s external-LSA table. To determine an LSA packet‘s position in the table, enter the
show ip ospf external-link-state command.
- asbr
- Displays autonomous system boundary router (ASBR) LSAs.
- extensive
- Displays LSAs in decrypt format. Do not use this parameter in combination with other display parameters because the entire database is displayed.
- link-state-id
id
- Displays LSAs for the LSA source that you specify.
- network
- Displays either all network LSAs or the LSAs for a network that you specify.
- nssa
- Displays either all NSSA LSAs or the LSAs for a not-so-stubby area (NSSA) that you specify.
- router
- Displays LSAs by router link.
- router-id
router-id
- Displays LSAs for the advertising router that you specify.
- self-originate
- Displays self-originated LSAs.
- sequence-number
- Displays the LSA entries for the hexadecimal LSA sequence number that you specify.
- summary
- Displays summary information. You can specify link-state ID or advertising router ID.
- adv-router
router-id
- Displays the link state for the advertising router that you specify.
Modes
Privileged EXEC mode
Examples
The following example shows output for the
show ip ospf database command.
device# show ip ospf database
Link States
Index Area ID Type LS ID Adv Rtr Seq(Hex) Age Cksum
1 0 Rtr 200.1.2.3 200.1.2.3 0x80000bb8 235 0x6a51
2 0 Rtr 20.20.20.20 20.20.20.20 0x80000088 1680 0xcb6a
3 0 Rtr 54.1.1.1 54.1.1.1 0x8000009f 599 0x6c3d
4 0 Net 53.1.1.1 200.1.2.3 0x80000006 235 0xd22
5 0 Net 53.54.43.53 200.1.2.3 0x8000007e 626 0x53e6
The following example shows output for the
show ip ospf database command when the
database-summary keyword is used.
device# show ip ospf database database-summary
Area ID Router Network Sum-Net Sum-ASBR NSSA-Ext Opq-Area Subtotal
0 3 2 0 0 0 0 5
AS External 0
Total 3 2 0 0 0 0 5