Viewing OSPF link-state information
Syntax:
show ip ospf link-state [status][subsetoptions][advertise
subset-options]][detail]
To display OSPF link state information, enter
show ip ospf link-state
at any CLI level.
advertise
Displays the hexadecimal data in LSA packets (advertisements) for the OSPF areas configured on the routing switch.
The output can also be filtered by area (
area-id
),link-state-id
,router-id
,sequence-number
, and/ortype
.Default: All OSPF areas configured on the routing switch.
ospf-area-id
Used to restrict display of LSA database or advertisements to show only the data from a specific OSPF area.
Can also be used with other subset options (
router-id
,sequence-number
,external link-state-id
, and/ortype
) to further define the source of displayed information.link-state-id ip-addr
Used to restrict display of LSA database or advertisements to show only the data from sources having the specified IP address as a link-state ID.
Can also be used with other subset options (
ospf-area-id
,router-id
,sequence-number
,external link-state-id
, andtype
) to further define the source of displayed informationrouter-id ip-addr
Used to restrict display of LSA database or advertisements to show only the data from sources having the specified router ID.
Can also be used with other subset options (
ospf-area-id
,link-state-id
,sequence-number
, andtype
) to further define the source of displayed information.sequence-number integer
Used to restrict display of LSA database or advertisements to show only the data from sources having the specified sequence number.
Can also be used with other subset options (
ospf-area-id
,link-state-id
,router-id
, andtype
) to further define the source of displayed information.type
[router|network|summary|as-summary|external|multicast|nssa]
Used to restrict display of LSA database or advertisements to show only the data from sources having the specified type.
Can also be used with other subset options (
ospf-area-id
,link-state-id
,router-id
, andsequence-number
) to further define the source of displayed information.detail
Displays LSA details for the OSPF area(s) configured on the routing switch. The output can also be filtered by area (
area-id
),link-state-id
,router-id
, andsequence-number
. Default: All OSPF areas configured on the routing switch.
Example
When you enter this command, the switch displays an output similar to the following for all configured areas:
show ip ospf link-state output
OSPF Link State Database for Area 0.0.0.0 Advertising LSA Type Link State ID Router ID Age Sequence # Checksum ---------- --------------- --------------- ---- ----------- ---------- Router 10.0.8.32 10.0.8.32 65 0x80000281 0x0000a7b6 Router 10.0.8.33 10.0.8.33 1638 0x80000005 0x0000a7c8 Network 10.3.2.37 10.0.8.37 1695 0x80000006 0x00000443 Summary 10.3.16.0 10.0.8.33 1638 0x80000007 0x0000c242 Summary 10.3.16.0 10.0.8.35 1316 0x80000008 0x0000aa58 Summary 10.3.17.0 10.0.8.33 1638 0x8000027b 0x0000becf Summary 10.3.17.0 10.0.8.35 1316 0x80000008 0x0000a957 AsbSummary 10.0.8.36 10.0.8.33 1412 0x80000002 0x00002cba OSPF Link State Database for Area 10.3.16.0 Advertising LSA Type Link State ID Router ID Age Sequence # Checksum ---------- --------------- --------------- ---- ----------- ---------- Router 10.0.8.33 10.0.8.33 1727 0x8000027e 0x0000d53c Router 10.0.8.34 10.0.8.34 1420 0x80000283 0x0000de4f Network 10.3.16.34 10.0.8.34 1735 0x80000005 0x00001465
The OSPF link-state display shows the following contents of the LSA database; one table for each area:
Field |
Content |
---|---|
LSA Type |
The possible types are: |
|
|
Link State ID |
LSA ID for this LSA. The meaning depends on the LSA type. |
Advertised Router ID |
Router ID of the router that originated this LSA. |
Age |
Current age (in seconds) of this LSA. |
Sequence # |
Sequence number of the current instance of this LSA. |
Chksum(Hex) |
LSA checksum value. |
There is a software limitation for sending LSAs from OSPFv3 database to SNMP/CLI. A single query can take 128 links at the maximum. Hence, only up to 128 link entries per router LSA is displayed.
Output for show ip ospf link-state advertise
switch(config)# show ip ospf link-state advertise OSPF Link State Database for Area 0.0.0.0 Advertisements ------------------------------------------------------------------------ 000202010a0008200a00082080000281a7b60054000000050a030e00ffffff0003000001... 000202010a0008210a00082180000006a5c90024010000010a0008230a03112104000002 000102010a0008230a00082380000015755d006c010000070a030600ffffff0003000001... 000202020a0302250a0008258000000702440024ffffff000a0008250a0008230a000820 000202030a0310000a00082180000008c043001cffffff0000000002 000102030a0310000a00082380000009a859001cffffff0000000001 000002030a0310000a00082480000009ac53001cffffff0000000002 000202040a0008240a000821800000032abb001c000000000000000b 000102040a0008240a00082380000004c12a001c0000000000000002 OSPF Link State Database for Area 10.3.16.0 Advertisements ------------------------------------------------------------------------ 000202010a0008210a0008218000027fd33d0054050000050a031900ffffff0003000001... 000102010a0008220a00082280000284dc500060000000060a031500ffffff0003000001... 000102020a0311220a0008228000027bf9080020ffffff000a0008220a000821
Output for show IP OSPF link-state detail for router
This is an example of
show ip ospf link-state detail
output for a router.
switch(config)# show ip ospf link-state detail OSPF Link State Database for Area 0.0.0.0 LSA Age : 35 LSA Type : 0x1 (Router) Advertising Router : 2.2.2.3 Link State ID : 2.2.2.3 LSA Sequence : 0x80000007 LSA Checksum : 0xfd09 LSA Option Bits : E=1 MC=0 N/P=0 EA=0 DC=1 Router Capability Bits : B=0 E=1 V=0 Number of links : 1 Interface Type : 2 (Connected to Transit Network) LSA Metric : 1 Link Data : 2.2.2.3 LSA ID : 2.2.2.3 Number of TOS Metrics : 0
Output for show IP OSPF link-state detail for a network
This is an example of show
ip ospf link-state detail
summary for LSA detailed output.
switch(config)# show ip ospf link-state detail OSPF Link State Database for Area 0.0.0.0 LSA Age : 19 LSA Type : 0x2 (Network) Advertising Router : 16.93.223.84 Link State ID : 192.22.23.24 LSA Sequence : 0x80000001 LSA Checksum : 0x323e LSA Option Bits : E=1 MC=0 N/P=0 EA=0 DC=1 Network Mask : 255.255.255.0 Attached Router ID : 2.2.2.3 Attached Router ID : 192.93.226.105
Output for show IP OSPF link-state detail for summary of LSA detailed output
This is an example of
show ip ospf link-state detail
summary of LSA for AS Boundary Router.
switch(config)# show ip ospf link-state detail OSPF Link State Database for Area 0.0.0.0 LSA Age : 58 LSA Type : 0x4 (AS Boundary) Advertising Router : 16.93.226.105 Link State ID : 2.2.2.3 LSA Sequence : 0x80000001 LSA Checksum : 0x4bc4 LSA Option Bits : E=1 MC=0 N/P=0 EA=0 DC=1 LSA Metric : 1
Output for show IP OSPF link-state detail for AS external LSA
This example shows
show ip ospf link-state detail
for an AS external LSA.
switch(config)# show ip ospf link-state detail LSA Age : 971 LSA Type : 0x5 (AS External) Advertising Router : 2.2.2.3 Link State ID : 55.5.5.0 LSA Sequence : 0x80000001 LSA Checksum : 0xe17c LSA Option Bits : E=1 MC=0 N/P=0 EA=0 DC=0 LSA Metric : 10 Bit E : 0 Forwarding Address : 0.0.0.0
Output for show IP OSPF link-state detail for summary for NSSA
This example shows
show ip ospf link-state detail
summary for NSSA.
switch(config)# show ip ospf link-state detail LSA Age : 86 LSA Type : 0x7 (NSSA) Advertising Router : 16.93.226.105 Link State ID : 16.93.49.0 LSA Sequence : 0x80000003 LSA Checksum : 0x6c03 LSA Option Bits : E=1 MC=0 N/P=0 EA=0 DC=1 LSA Metric : 10 Network Mask : 255.255.255.0 Bit E : 0 (External Metric Type1) Forwarding Address : 0.0.0.0 External Route Tag : 0