Show commands

Use these M4500 CLI commands to display OSPF router, area, database, interface, neighbor, range, and traffic statistics information.

show ip ospf

This command displays information relevant to the OSPF router.

Default None
Format show ip ospf [vrf <vrf-name>]
Mode Privileged Exec

Display Message

!

Some of the information below displays only if you enable OSPF and configure certain features.

Fields Definition
Router ID A 32-bit integer in dotted decimal format identifying the router, about which information is displayed. This is a configured value.
OSPF Admin Mode Shows whether the administrative mode of OSPF in the router is enabled or disabled. This is a configured value.
RFC 1583 Compatibility Indicates whether 1583 compatibility is enabled or disabled. This is a configured value.
External LSDB Limit The maximum number of non-default AS-external-LSA (link state advertisement) entries that can be stored in the link-state database.
Exit Overflow Interval The number of seconds that, after entering overflow state, a router will attempt to leave overflow state.
SPF Delay Time The number of seconds between two subsequent changes of LSAs, during which time the routing table calculation is delayed.
SPF Hold Time The number of seconds between two consecutive spf calculations.
Flood Pacing Interval The average time, in milliseconds, between LS Update packet transmissions on an interface. This is the value configured with the timers pacing flood command.
LSA Refresh Group Pacing Time The size of the LSA refresh group window, in seconds. This is the value configured with the timers pacing lsa-group command.
Opaque Capability Shows whether the router is capable of sending Opaque LSAs. This is a configured value.
Autocost Ref BW Shows the value of auto-cost reference bandwidth configured on the router.
Default Passive Setting Shows whether the interfaces are passive by default.
Prefix Suppression Whether the prefix-suppression is enabled or disabled.
Maximum Paths The maximum number of paths that OSPF can report for a given destination.
Maximum Routes The number of maximum IPv4 routes in a VRF.
Default Metric Default value for redistributed routes.
Stub Router Configuration One of Always, Startup, or None.
Stub Router Startup Time Configured value in seconds. This row is only listed if OSPF is configured to be a stub router at startup.
Summary LSA Metric Override One of Enabled (met), Disabled, where met is the metric to be sent in summary LSAs when in stub router mode.
BFD Enabled Displays the BFD status.
Default Route Advertise Indicates whether the default routes received from other source protocols are advertised or not.
Always Shows whether default routes are always advertised.
Metric The metric of the routes being redistributed. If the metric is not configured, this field is blank.
Metric Type Shows whether the routes are External Type 1 or External Type 2.
Redistributing This field is a heading and appears only if you configure the system to take routes learned from a non-OSPF source and advertise them to its peers.
Source Show source protocol/routes that are being redistributed. Possible values are static, connected, or BGP.
Tag The decimal value attached to each external route.
Subnets For redistributing routes into OSPF, the scope of redistribution for the specified protocol.
Distribute-List The access list used to filter redistributed routes.
Number of Active Areas The number of OSPF areas to which the router is attached on interfaces that are up.
ABR Status Shows whether the router is an OSPF Area Border Router.
ASBR Status Reflects whether the ASBR mode is enabled or disabled. Enable implies that the router is an autonomous system border router. The router automatically becomes an ASBR when it is configured to redistribute routes learnt from other protocols. The possible values for the ASBR status is enabled (if the router is configured to redistribute routes learned by other protocols) or disabled (if the router is not configured for the same).
Stub Router Status When OSPF runs out of resources to store the entire link state database, or any other state information, OSPF goes into stub router mode. As a stub router, OSPF re-originates its own router LSAs, setting the cost of all non-stub interfaces to infinity. To restore OSPF to normal operation, disable and re-enable OSPF. One of Active, Inactive.
Stub Router Reason One of Configured, Startup, or Resource Limitation. This row is only listed if stub router is active.
Stub Router Startup Time Remaining The remaining time, in seconds, until OSPF exists stub router mode. This row is only listed if OSPF is in startup stub router mode.
Stub Router Duration The time elapsed since the router last entered the stub router mode. The row is only listed if stub router is active and the router entered the stub mode because of a resource limitation. The duration is displayed in DD:HH:MM:SS format.
External LSDB Overflow When the number of non-default external LSAs exceeds the configured limit, External LSDB Limit, OSPF goes into LSDB overflow state. In this state, OSPF withdraws all of its self-originated non-default external LSAs. After the Exit Overflow Interval, OSPF leaves the overflow state, if the number of external LSAs has been reduced.
External LSA Count The number of external (LS type 5) link-state advertisements in the link-state database.
External LSA Checksum The sum of the LS checksums of external link-state advertisements contained in the link-state database.
AS_OPAQUE LSA Count Shows the number of AS Opaque LSAs in the link-state database.
AS_OPAQUE LSA Checksum Shows the sum of the LS Checksums of AS Opaque LSAs contained in the link-state database.
New LSAs Originated The number of new link-state advertisements that have been originated.
LSAs Received The number of link-state advertisements received determined to be new instantiations.
LSA Count The total number of link state advertisements currently in the link state database.
Maximum Number of LSAs The maximum number of LSAs that OSPF can store.
LSA High Water Mark The maximum size of the link state database since the system started.
AS Scope LSA Flood List Length Length of global flood list for LSAs with AS scope.
Retransmit List Entries The total number of LSAs waiting to be acknowledged by all neighbors. An LSA may be pending acknowledgment from more than one neighbor.
Maximum Number of Retransmit Entries The maximum number of LSAs that can be waiting for acknowledgment at any given time.
Retransmit Entries High Water Mark The highest number of LSAs that have been waiting for acknowledgment.
NSF Helper Support Whether this router is configured to act as a graceful restart helpful neighbor. Possible values are: Helper Support Always, Disabled, or Planned.
NSF Helper Strict LSA Checking As a graceful restart helpful neighbor, whether to terminate the helper relationship if a topology change occurs during a neighbor's graceful restart.

show ip ospf abr

This command displays the internal OSPF routing table entries to Area Border Routers (ABR). This command takes no options.

Default None
Format show ip ospf abr [vrf <vrf-name>]
Mode

Privileged EXEC

User EXEC

Display Message

Fields Definition
Type

The type of the route to the destination. It can be either:

intra — Intra-area route inter — Inter-area route

Router ID Router ID of the destination.
Cost Cost of using this route.
Area ID The area ID of the area from which this route is learned.
Next Hop Next hop toward the destination.
Next Hop Intf The outgoing router interface to use when forwarding traffic to the next hop.

show ip ospf area

This command displays information about the area. The <areaid> identifies the OSPF area that is being displayed.

Default None
Format show ip ospf area <areaid> [vrf <vrf-name>]
Mode

Privileged EXEC

User EXEC

Display Message

Fields Definition
AreaID The area id of the requested OSPF area.
External Routing A number representing the external routing capabilities for this area.
SPF Runs The number of times that the intra-area route table has been calculated using this area's link-state database.
Area Border Router Count The total number of area border routers reachable within this area.
Area LSA Count Total number of link-state advertisements in this area's link-state database, excluding AS External LSA’s.
Area LSA Checksum A number representing the Area LSA Checksum for the specified AreaID excluding the external (LS type 5) link-state advertisements.
Flood List Length The length of the area's LSA flood list.
Import Summary LSAs Shows whether summary LSAs are inmported.
Stub Area Metric Value The metric value of the stub area.

The following OSPF NSSA specific information displays only if the area is configured as an NSSA:

Fields Definition
Import Summary LSAs Shows whether to import summary LSAs into the NSSA.
Redistribute into NSSA Shows whether to redistribute information into the NSSA.
Default Information Originate Shows whether to advertise a default route into the NSSA.
Default Metric The metric value for the default route advertised into the NSSA.
Default Metric Type The metric type for the default route advertised into the NSSA.
Translator Role The NSSA translator role of the ABR, which is always or candidate.
Translator Stability Interval The amount of time that an elected translator continues to perform its duties after it determines that its translator status has been deposed by another router.
Translator State Shows whether the ABR translator state is disabled, always, or elected.

show ip ospf asbr

This command displays the internal OSPF routing table entries to Autonomous System Boundary Routers (ASBR). This command takes no options.

Default None
Format show ip ospf asbr [vrf <vrf-name>]
Mode

Privileged EXEC

User EXEC

Display Message

Fields Definition
Type

The type of the route to the destination. It can be one of the following values:

intra — Intra-area route inter — Inter-area route

Router ID Router ID of the destination.
Cost Cost of using this route.
Area ID The area ID of the area from which this route is learned.
Next Hop Next hop toward the destination.
Next Hop Intf The outgoing router interface to use when forwarding traffic to the next hop.

show ip ospf database

This command displays information about the link state database when OSPF is enabled. If you do not enter any parameters the command displays the LSA headers for all areas. Use the optional <areaid> parameter to display database information about a specific area. Use the optional parameters to specify the type of link state advertisements to display.

Default None
Format show ip ospf [<areaid>] database [vrf <vrf-name>] [{asbr-summary | external | network | nssa-external | opaque-area | opaque-as | opaque-link | router | summary}] [<lsid>] [{adv-router [<ipaddr>] | self-originate}]
Mode

Privileged EXEC

User EXEC

Fields Definition
vrf-name Specify the virtual router for which to display information
adv-router Display the LSAs that are restricted by the advertising router. To specify a router, enter the IP address of the router.
asbr-summary Use asbr-summary to show the autonomous system boundary router (ASBR) summary LSAs.
external Use external to display the external LSAs.
network Use network to display the network LSAs.
nssa-external Use nssa-external to display NSSA external LSAs.
opaque-area Use opaque-area to display area opaque LSAs.
opaque-as Use opaque-as to display AS opaque LSAs.
opaque-link Use opaque-link to display link opaque LSAs.
router Use router to display router LSAs.
summary Use summary to show the LSA database summary information.
lsid Use <lsid> to specify the link state ID (LSID). The value of <lsid> can be an IP address or an integer in the range of 0-4294967295.
adv-router Use adv-router to show the LSAs that are restricted by the advertising router.
self-originate Use self-originate to display the LSAs in that are self originated.

Display Message

The information below is only displayed if OSPF is enabled.

Fields Definition
Links Id A number that uniquely identifies an LSA that a router originates from all other self originated LSAs of the same LS type.
Adv Router The Advertising Router. Is a 32 bit dotted decimal number representing the LSDB interface.
Age A number representing the age of the link state advertisement in seconds.
Sequence A number that represents which LSA is more recent.
Chksm The total number LSA checksum.
Options This is an integer. It indicates that the LSA receives special handling during routing calculations.
Rtr Opt Options are valid for router links only.

show ip ospf database database-summary

Use this command to display the number of each type of LSA in the database for each area and for the router. The command also displays the total number of LSAs in the database.

Default None
Format show ip ospf database database-summary
Mode

Privileged EXEC

User EXEC

Display Message

Fields Definition
Router Total number of router LSAs in the OSPF link state database.
Network Total number of network LSAs in the OSPF link state database.
Summary Net Total number of summary network LSAs in the database.
Summary ASBR Number of summary ASBR LSAs in the database.
Type-7 Ext Total number of Type-7 external LSAs in the database.
Opaque Link Number of opaque link LSAs in the database.
Opaque Area Number of opaque area LSAs in the database.
Type-5 Ext Total number of Type-5 external LSAs in the database.
Self-Originated Type-5 Ext Total number of self originated Type-5 external LSAs in the database.
Subtotal Number of entries for the identified area.
Opaque AS Number of opaque AS LSAs in the database.
Total Number of entries for all areas.

show ip ospf interface

This command displays the OSPF information for the specific interface.

Default None
Format show ip ospf interface {<slot/port> | loopback <loopback-id> | vlan <vlan-id>}
Mode

Privileged EXEC

User EXEC

Display Message

Fields Definition
IP Address The IP address for the specified interface.
Subnet Mask A mask of the network and host portion of the IP address for the OSPF interface.
Secondary IP Address(es) The secondary IP addresses if any are configured on the interface.
OSPF Admin Mode States whether OSPF is enabled or disabled on a router interface.
OSPF Area ID The OSPF Area ID for the specified interface.
OSPF Network Type The type of network on this interface that the OSPF is running on.
Router Priority A number representing the OSPF Priority for the specified interface.
Retransmit Interval A number representing the OSPF Retransmit Interval for the specified interface.
Hello Interval A number representing the OSPF Hello Interval for the specified interface.
Dead Interval A number representing the OSPF Dead Interval for the specified interface.
LSA Ack Interval A number representing the OSPF LSA Acknowledgment Interval for the specified interface.
Transit Delay A number representing the OSPF Transit Delay for the specified interface.
Authentication Type The OSPF Authentication Type for the specified interface are: none, simple, and encrypt.
Metric Cost The cost of the OSPF interface.
Prefix Suppression Displays whether prefix suppression is enabled, disabled, or not configured on the interface.
Passive Status Shows whether the interface is passive or not.
OSPF MTU-ignore Indicates whether to ignore MTU mismatches in database descriptor packets sent from neighboring routers.
Flood Blocking Indicates if flood blocking is enabled or disabled.

The information below is displayed only if OSPF is enabled.

Fields Definition
State The OSPF Interface States are: down, loopback, waiting, point-to-point, designated router, and backup designated router.
Designated Router The router ID representing the designated router.
Backup Designated Router The router ID representing the backup designated router.
Number of Link Events The number of link events.
Local Link LSAs The number of Link Local Opaque LSAs in the link-state database.
Local Link LSA Checksum The sum of LS Checksums of Link Local Opaque LSAs in the link-state database.
Prefix Suppression Displays whether prefix-suppression is enabled, disabled, or unconfigured on the given interface.

show ip ospf interface brief

This command displays brief information for the IFO object or virtual interface tables.

Default None
Format show ip ospf interface brief [vrf <vrf-name>]
Mode

Privileged EXEC

User EXEC

Display Messages

Fields Definition
Interface Valid slot and port number separated by a forward slash.
OSPF Admin Mode States whether OSPF is enabled or disabled on a router interface.
OSPF Area ID The OSPF Area ID for the specified interface.
Router Priority A number representing the OSPF Priority for the specified interface.
Cost The metric cost of the OSPF interface.
Hello Interval A number representing the OSPF Hello Interval for the specified interface.
Dead Interval A number representing the OSPF Dead Interval for the specified interface.
Retransmit Interval A number representing the OSPF Retransmit Interval for the specified interface.
Retransmit Delay Interval A number representing the OSPF Transit Delay for the specified interface.
LSA Ack Interval A number representing the OSPF LSA Acknowledgment Interval for the specified interface.

show ip ospf interface stats

This command displays the statistics for a specific interface. The information below will only be displayed if OSPF is enabled.

Default None
Format show ip ospf interface stats {<slot/port> | loopback <loopback-id> | vlan <vlan-id>}
Mode

Privileged EXEC

User EXEC

Display Messages

Fields Definition
OSPF Area ID The area id of this OSPF interface.
Area Border Router Count The total number of area border routers reachable within this area. This is initially zero, and is calculated in each SPF pass.
AS Border Router Count The total number of Autonomous System border routers reachable within this area.
Area LSA Count The total number of link-state advertisements in this area's link-state database, excluding AS External LSAs.
IP Address The IP address associated with this OSPF interface.
OSPF Interface Events The number of times the specified OSPF interface has changed its state, or an error has occurred.
Virtual Events The number of state changes or errors that occurred on this virtual link.
Neighbor Events The number of times this neighbor relationship has changed state, or an error has occurred.
Sent Packets The number of OSPF packets transmitted on the interface.
Received Packets The number of valid OSPF packets received on the interface.
Discards The number of received OSPF packets discarded because of an error in the packet or an error in processing the packet.
Bad Version The number of received OSPF packets whose version field in the OSPF header does not match the version of the OSPF process handling the packet.
Source Not On Local Subnet The number of received packets discarded because the source IP address is not within a subnet configured on a local interface.
Virtual Link Not Found The number of received OSPF packets discarded where the ingress interface is in a non-backbone area and the OSPF header identifies the packet as belonging to the backbone, but OSPF does not have a virtual link to the packet’s sender.
Area Mismatch The number of OSPF packets discarded because the area ID in the OSPF header is not the area ID configured on the ingress interface.
Invalid Destination Address The number of OSPF packets discarded because the packet’s destination IP address is not the address of the ingress interface and is not the AllDrRouters or AllSpfRouters multicast addresses.
Wrong Authentication Type The number of packets discarded because the authentication type specified in the OSPF header does not match the authentication type configured on the ingress interface.
Authentication Failure The number of OSPF packets dropped because the sender is not an existing neighbor or the sender’s IP address does not match the previously recorded IP address for that neighbor.
No Neighbor at Source Address The number of OSPF packets dropped because the sender is not an existing neighbor or the sender’s address does not match the previously recorded IP address for that neighbor.
Invalid OSPF Packet Type The number of OSPF packets discarded because the packet type field in the OSPF header is not a known type.
Hellos Ignored The number of received Hello packets that were ignored by this router from the new neighbors after the limit has been reached for the number of neighbors on an interface or on the system as a whole.

show ip ospf neighbor

This command displays information about OSPF neighbors. If you do not specify a neighbor IP address, the output displays summary information in a table. If you specify an interface or tunnel, only the information for that interface or tunnel displays.The <ip-address> is the IP address of the neighbor, and when you specify this,

detailed information about the neighbor displays. The information below only displays if OSPF is enabled and the interface has a neighbor.

Default None
Format show ip ospf neighbor [vrf <vrf-name>] [interface {<slot/port> | vlan <vlan-id>}] [<ip-address>]
Mode

Privileged EXEC

User EXEC

Display Message

If you do not specify an IP address, a table with the following columns displays for all neighbors. If you specify a interface, only the information for that interface displays:

Fields Definition
Router ID The 4-digit dotted-decimal number of the neighbor router.
Priority The OSPF priority for the specified interface. The priority of an interface is a priority integer from 0 to 255. A value of '0' indicates that the router is not eligible to become the designated router on this network.
IP Address The IP address of the neighbor.
Interface

The interface of the local router in slot/port format. The state of the neighboring routers. Possible values are:

Down - initial state of the neighbor conversation - no recent

information has been received from the neighbor.

Attempt - no recent information has been received from the neighbor

but a more concerted effort should be made to contact the neighbor.

Init - an Hello packet has recently been seen from the neighbor, but

bidirectional communication has not yet been established.

State

2 way - communication between the two routers is bidirectional.

Exchange start - the first step in creating an adjacency between the

two neighboring routers, the goal is to decide which router is the master and to decide upon the initial DD sequence number.

Exchange - the router is describing its entire link state database by

sending Database Description packets to the neighbor.

Loading - Link State Request packets are sent to the neighbor asking

for the more recent LSAs that have been discovered (but not yet received) in the Exchange state.

Full - the neighboring routers are fully adjacent and they will now

appear in router-LSAs and network-LSAs.

Dead Time The amount of time, in seconds, to wait before the router assumes the neighbor is unreachable.

If you specify an IP address for the neighbor router, the following fields display:

Fields Definition
Interface Valid slot and port number separated by a forward slash.
Neighbor IP Address The IP address of the neighbor router.
Interface Index The interface ID of the neighbor router.
Area ID The area ID of the OSPF area associated with the interface.
Options An integer value that indicates the optional OSPF capabilities supported by the neighbor. The neighbor's optional OSPF capabilities are also listed in its Hello packets. This enables received Hello Packets to be rejected (i.e., neighbor relationships will not even start to form) if there is a mismatch in certain crucial OSPF capabilities.
Router Priority The OSPF priority for the specified interface. The priority of an interface is a priority integer from 0 to 255. A value of '0' indicates that the router is not eligible to become the designated router on this network.
Dead Timer Due The amount of time, in seconds, to wait before the router assumes the neighbor is unreachable.
Up Time Neighbor uptime; how long since the adjacency last reached the Full state.
State The state of the neighboring routers.
Events The number of times this neighbor relationship has changed state, or an error has occurred.
Retransmitted LSAs The number of LSAs retransmitted to this neighbor.
Retransmission Queue Length An integer representing the current length of the retransmission queue of the specified neighbor router IDf the specified interface.

show ip ospf range

This command displays information about the area ranges for the specified <areaid>. The <areaid> identifies the OSPF area whose ranges are being displayed.

Default None
Format show ip ospf range <areaid> [vrf <vrf-name>]
Mode

Privileged EXEC

User EXEC

Display Message

Fields Definition
Prefix The summary prefix.
Subnet Mask The subnetwork mask of the summary prefix.
Type S (Summary Link) or E (External Link)
Action Advertise or Suppress
Cost Metric to be advertised when the range is active. If a static cost is not configured, the field displays Auto. If the action is Suppress, the field displays N/A.
Active Whether the range is currently active (Y or N).

show ip ospf statistics

This command displays information about recent Shortest Path First (SPF) calculations. The SPF is the OSPF routing table calculation. The output lists the number of times the SPF has run for each OSPF area. A table follows this information. For each of the 15 most recent SPF runs, the table lists how long ago the SPF ran, how long the SPF took, and the reasons why the SPF was scheduled.

Default None
Format show ip ospf statistics [vrf <vrf-name>]
Mode

Privileged EXEC

User EXEC

Display Message

Fields Definition
Delta T The time since the SPF ran last time. The time is in the format hh:mm:ss, giving the hours, minutes, and seconds.
Intra The time taken to compute the intra-area routes, in milliseconds.
Summ The time taken to compute the inter-area routes, in milliseconds.
Ext The time taken to compute the external routes, in milliseconds.
SPF Total The totat time to compute the routes, in milliseconds. The total may exceed the sume of the Intra, Summ, and Ext times.
RIB Update

The time from the completion of the routing table calculation until all changes have been made in the routing table, named Routing Information Based (RIB). The time is in milliseconds. The reason the SPF was scheduled. Reason codes are as follows:

R - a router LSA has changed

Reason

N - a network LSA has changed

SN - a type 3 network summary LSA has changed

SA - a type 4 ASBR summary LSA has changed

X - a type 5 or type 7 external LSA has changed

show ip ospf stub table

This command displays the OSPF stub table. The information below will only be displayed if OSPF is initialized on the switch.

Default None
Format show ip ospf stub table [vrf <vrf-name>]
Mode

Privileged EXEC

User EXEC

Display Message

Fields Definition
Area ID A 32-bit identifier for the created stub area.
Type of Service The type of service associated with the stub metric. only supports Normal TOS.
Metric Val The metric value is applied based on the TOS. It defaults to the least metric of the type of service among the interfaces to other areas. The OSPF cost for a route is a function of the metric value.
Import Summary LSA Controls the import of summary LSAs into stub areas.

show ip ospf traffic

This command displays the OSPFv2 packets, the LSA statistics, and the OSPFv2 message queue statistics. Packet statistics count packets and LSAs since OSPFv2 counters were cleared last time (using the command clear ip ospf counters).

Default None
Format show ip ospf traffic [vrf <vrf-name>]
Mode

Privileged EXEC

User EXEC

Display Message

Fields Definition
OSPFv2 Packet Statistics The number of packets of each type sent and received since OSPF counters were last cleared.
LSAs Retransmitted The number of LSAs retransmitted by this router since OSPF counters were last cleared.
LS Update Max Recieve Rate The maximum rate of LS Update packets received during any 5-second interval since OSPF counters were last cleared. The rate is in packets per second.
LS Update Max Send Rate The maximum rate of LS Update packets transmitted during any 5-second interval since OSPF counters were last cleared. The rate is in packets per second.
Number of LSAs Received The number of LSAs of each type received since OSPF counters were last cleared.
OSPFv2 Queue Statistics For each OSPFv2 message queue, the current count, the high water mark, the number of packets that failed to be enqueued, and the queue limit. The high water marks are not cleared when OSPF counters are cleared.

show ip ospf lsa-group

This command displays the number of self-originated LSAs within each LSA group.

Default None
Format show ip ospf lsa-group [vrf vrf-name]
Mode

Privileged EXEC

User EXEC

Display Message

Fields Definition
Total self-originated LSAs The number of LSAs originated from self.
Average LSAs per group The average number of self-originated LSAs per group.
Pacing group limit The maximum number of self-originated LSAs in one LSA group. If the number of LSAs in a group exceeds this limit, OSPF redistributes LSAs throughout the refresh interval to achieve better balance.
Number of self-originated LSAs within each LSA group The detail number of self-originated LSAs.
Group Start Age The start time of LSA Group aged.
Group End Age The end time of LSA Group aged.
Count The number of LSA Group aged.