The show ip ospf Command
This section explains the show ip ospf command. This command is extremely useful, because it shows how the OSPF routing protocol is running on a particular router. It includes the number of times that the SPF routing algorithm has been run, which is indicative of the stability of the network. To issue the command, use the following syntax:
Router#sshhooww iipp oossppff [ process-id]
Checking the Configuration of OSPF on a Single Router 239
Example 7-6 shows the output of this command. Table 7-6 explains how to read this information.
Example 7-6 The show ip ospf process-id Command Output
SanJose#sshhooww iipp oossppff 110000
Routing Process “ospf 100″ with ID 184.108.40.206
Supports only single TOS(TOS0) routes
It is an internal router
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
Number of external LSA 0. Checksum Sum 0×0
Number of DCbitless external LSA 0
Number of DoNotAge external LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Number of interfaces in this area is 3
Area has no authentication
SPF algorithm executed 10 times
Area ranges are
Link State Update Interval is 00:30:00 and due in 00:18:54
Link State Age Interval is 00:20:00 and due in 00:08:53
Number of DCbitless LSA 2
Number of indication LSA 0
Number of DoNotAge LSA 0
Table 7-6 Explanation of the show ip ospf Command Output
240 Chapter 7: Configuring OSPF in a Single Area
Table 7-6 Explanation of the show ip ospf Command Output (Continued)
The show ip ospf database Command
The following command displays the contents of the router’s topological database and the different LSAs that have populated the database:
Router#show ip ospf database
In this example, because the router used is an internal router, the LSAs displayed will be the router
and network updates. This command has many parameters that enable the user to examine very
speciﬁc information. This section considers the general command.
Checking the Configuration of OSPF on a Single Router 241
Example 7-7 shows the output of this command. Table 7-7 explains the meaning of the important ﬁelds.
Example 7-7 The show ip ospf database Command Output
242 Chapter 7: Configuring OSPF in a Single Area
Table 7-7 Explanation of the show ip ospf database Command (Continued)
The show ip ospf interface Command
This command shows how OSPF has been conﬁgured on an interface level and how it is working at the interface. This level of detail is excellent for troubleshooting conﬁguration errors:
Router#show ip ospf interface [ type number]
Important information such as the DR, the BDR, a list of neighbors, and the network type is shown by this command. Example 7-8 shows the output of this command. Table 7-8 explains how to read this information.
Example 7-8 The show ip ospf interface [type number] Command Output
Checking the Configuration of OSPF on a Single Router 243
Table 7-8 Explanation of the show ip ospf interface Command
244 Chapter 7: Configuring OSPF in a Single Area
Table 7-8 Explanation of the show ip ospf interface Command (Continued)
The show ip ospf neighbor Command
This command shows OSPF neighbors. All the neighbors known to the router can be viewed, or the command can be made more granular and the neighbors can be shown on a per-interface basis. One neighbor also might be picked out for scrutiny. This level of detail is excellent for troubleshooting conﬁguration errors:
Router#show ip ospf neighbor [ type number] [ neighbor-id] [detail]
Checking the Configuration of OSPF on a Single Router 245
Example 7-9 shows the output of this command.
Example 7-9 The show ip ospf neighbor Command Output
To be more speciﬁc in what is viewed, it is possible to look at the neighbors that have been discovered on a particular interface, as seen in Example 7-10.
To see all the neighbors in as much detail as possible, however, use the command displayed in
Example 7-11 Using the show ip ospf neighbor detail Command
246 Chapter 7: Configuring OSPF in a Single Area
Example 7-11 Using the show ip ospf neighbor detail Command (Continued)
Table 7-9 explains the meanings of the important ﬁelds from Examples 7-9 through 7-11.
Table 7-9 Explanation of the show ip ospf neighbor Command
Checking the Configuration of OSPF on a Single Router 247
Table 7-9 Explanation of the show ip ospf neighbor Command (Continued)
The show ip protocols Command
This command shows the conﬁguration of IP routing protocols on the router. It details how the protocols were conﬁgured and how they interact with one another. It also indicates when the next updates will occur. This command is excellent for troubleshooting conﬁguration errors and understanding how the network is communicating about its routes:
248 Chapter 7: Configuring OSPF in a Single Area
Table 7-10 Explanation of the show ip protocols Command
Troubleshooting OSPF in a Single Area 249
Table 7-10 Explanation of the show ip protocols Command (Continued)
The show ip route Command
This command shows the IP routing table on the router. It details how the network is known to the router and how the router discovered the route. This command is excellent for troubleshooting conﬁguration errors and understanding how the network is communicating about its routes. It is given detailed consideration in Chapter 1, “IP Routing Principles.”
Router#show ip route
The commands covered in this section are useful to verify that the conﬁguration has worked and that the OSPF network is functioning correctly. In a single-area environment, the full complexity of OSPF is not engaged. The full strength and complexity of OSPF come to the forefront in the design and conﬁguration of a multiarea network.
Troubleshooting OSPF in a Single Area
Troubleshooting an OSPF network requires the same skills of detection and critical thinking as those needed in any problem solving. Whether you are a doctor trying to locate the cause of a patient’s pain or a network administrator investigating a corporate network’s slow response time, the approach needs to be methodical and well-documented. The better your understanding of the subject, or patient, the easier it is to diagnose the problem. As a network administrator, this understanding will grow if you document not only your network, but also every change that is made to that network.
Cisco provides many tools to aid the troubleshooting process. There are courses and many technical documents in addition to a forum for questions and answers. The following web pages provide some excellent troubleshooting tools, which will help in the everyday maintenance of your network and provide a good learning resource. Some of these resources might require you to be a registered user and to log in:
■ A page of troubleshooting tools:
Because Cisco sometimes reorganizes its web pages, this reference might change. Luckily, Cisco maintains an excellent search engine. You should search for tools from
the home page.
■ A utility that allows the output of listed show commands and interprets the output:
■ A troubleshooting assistant that leads you through a series of screens to help diagnose a problem:
The debug Commands
An excellent, though dangerous, troubleshooting tool is the debug command. The debug command has the highest process priority and is therefore capable of consuming all the resources on the router, thus becoming the problem as opposed to helping to solve the problem. It is important simply to turn on debug for the speciﬁc task to be monitored and to turn it off as soon as the data is gathered. The no form of this command disables debugging output.
You would be wise to direct the output to a log ﬁle so that the data can be perused with care. The debug commands are EXEC commands.
The options available for monitoring OSPF are listed in Table 7-11.
Table 7-11 The debug Command Options for OSPF