Document ID: 28174
It is sometimes noticed on a router that the output of certain Open Shortest Path First (OSPF) show commands (such as show ip ospf neighbor and show ip ospf database) take a long time to complete. The output appears line-by-line, and after one line is shown, it takes between 15 and 20 seconds before the next line appears. This document discusses some of the reasons for this behavior and possible solutions.
There are no specific requirements for this document.
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
For more information on document conventions, refer to the Cisco Technical Tips Conventions.
Because of the nature of the problem, this document is only able to describe the problem and cannot show an example of the problem. To describe the problem, it took 16 seconds for this output to be completely displayed.
citrus# show ip ospf database OSPF Router with ID (10.48.77.45) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 10.48.77.45 10.48.77.45 72 0x80000001 0x5A6F 1 citrus#
The most common commands to display this behavior are:
show ip ospf border-routers
show ip ospf database (including the more specific version of the command, such as show ip ospf database router)
show ip ospf interface
show ip ospf neighbor
To determine why this behavior is happening, enable the debug ip packet detail command on a router while issuing the show ip ospf database command, as shown in the example below.
citrus# debug ip packet detail IP packet debugging is on (detailed) citrus# show ip ospf database OSPF Router with ID (10.48.77.45) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 10.48.77.45 Oct 23 11:26:16: IP: s=10.48.77.45 (local), d=255.255.255.255 (Dialer1), len 70, sending broad/multicast Oct 23 11:26:16: UDP src=57969, dst=53 Oct 23 11:26:16: IP: s=18.104.22.168 (local), d=255.255.255.255 (Dialer2), len 70, sending broad/multicast Oct 23 11:26:16: UDP src=57969, dst=53 Oct 23 11:26:16: IP: s=10.48.77.45 (local), d=255.255.255.255 (Ethernet0), len 70, sending broad/multicast Oct 23 11:26:16: UDP src=57969, dst=53 ... Oct 23 11:26:31: IP: s=10.48.77.45 (local), d=255.255.255.255 (Ethernet0), len 70, sending broad/multicast Oct 23 11:26:31: UDP src=57969, dst=5310.48.77.45 160 0x80000001 0x3AFD 1 citrus#
The output above demonstrates that as soon as the show ip ospf database command is issued, the router is broadcasting User Datagram Protocol (UDP) packets with destination port 53 on all interfaces. UDP 53 is the Domain Name Service (DNS). By looking into the configuration of the router, you can see why the router is trying to do a DNS lookup.
To solve this problem, the reason the router is sending DNS queries needs to be determined. By looking at the configuration of the router with the show run and include commands, the following can be seen.
citrus# show run | include name hostname citrus ip ospf name-lookup citrus#
The router has the ip ospf name-lookup command in the configuration. This command configures OSPF to look up DNS names for use in all OSPF show EXEC command displays. This feature makes it easier to identify a router because the router is displayed by name rather than by its router ID or neighbor ID. So, when this command is configured, the router will do a DNS lookup for the OSPF router-id in the various show commands. If it can resolve such a router-id to a name, it will display the name in the show command instead of the IP address.
Note that ip ospf name-lookup will trigger DNS lookups only if ip domain-lookup is not disabled globally. By default, ip domain-lookup is enabled on Cisco IOS® Software.
When configuring ip ospf name-lookup in a Cisco router you may run into the following possible problems:
There is no DNS server specified in the router configuration. In this case, you will broadcast DNS queries as shown in the debug output above. If this is the situation, the delay is caused by waiting for the DNS queries to time out.
If this is the problem, a DNS server can be configured on the router by issuing the ip name-server command. For further information, refer to Configuring DNS on Cisco Routers.
There is a DNS server specified in the router but it is not reachable. It is possible that a DNS server is configured in the router with the ip name-server command, but this DNS server is not reachable for some reason. You can check if the DNS server is reachable by pinging it. If the ping fails, the DNS server is not reachable and no DNS lookups can be done.
To solve this problem, check why the DNS server is not reachable (server is down or there is a routing problem in the network). As a workaround in this situation, you can disable the OSPF name-lookup feature by issuing the no ip ospf name-lookup global command.
|Updated: Aug 10, 2005||Document ID: 28174|