IP Routing

What Does the show ip ospf neighbor Command Reveal?

Document ID: 13688

Updated: Aug 10, 2005



This document explains the information contained in the show ip ospf neighbor command output.

An interface data structure stores information from a network to which it is connected. Using this information, an Open Shortest Path First (OSPF) router builds hello packets. These hello packets are exchanged between directly-connected neighbors to learn more about each other. You can use the show ip ospf neighbor command to observe the neighbor data structure. This command displays OSPF-related neighbor information.



Readers of this document should be knowledgeable of the following:

  • A basic understanding of IP routing protocols

  • The OSPF routing protocol in general

Refer to Routing Basics and OSPF to learn more about IP routing protocols.

Components Used

The information in this document is based on the software and hardware versions:

  • Cisco IOS® Software Release 12.2(10b)

  • Cisco 2500 Series Routers

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, see the Cisco Technical Tips Conventions.

Neighbor Data Structure

The following diagram and show ip ospf neighbor command output is used as an example:


Router2# show ip ospf neighbor 

Neighbor ID     Pri    State      Dead Time    Address     Interface    1      FULL/DR    00:00:36    Ethernet0

The following sections describe the show ip ospf neighbor command output from the example above.

Neighbor ID

The Neighbor ID is the router ID of the neighbor router. The router ID is the highest IP address or the highest ip address among loopback addresses (if one is configured) on the Cisco router or can be configured manually by "router-id x.x.x.x". In the example above, Router 1 has a loopback address,, which becomes the router ID. Once the router ID is chosen, it will not be changed unless the ospf process is reset(clear ip ospf process xx) or the router is reloaded. And IP address of router ID doesn't need to be reachable.


The Pri field indicates the priority of the neighbor router. The router with the highest priority becomes the designated router (DR). If the priorities are the same, then the router with the highest router ID becomes the DR. By default, priorities are set to 1. A router with a priority of 0 never becomes a DR or a backup designated router (BDR); it is always a DROTHER, meaning a router that is neither the DR or the BDR.


The State field indicates the functional state of the neighbor router. Refer to OSPF Neighbor States for more information about states. FULL means the router is fully adjacent with its neighbor. The neighbor is the DR, so it is Router 1.

Dead Time

The Dead Time field indicates the amount of time remaining that the router waits to receive an OSPF hello packet from the neighbor before declaring the neighbor down. On broadcast and point-to-point media, the default dead interval is 40 seconds. On non-broadcast and point-to-multipoint links, the default dead interval is 120 seconds. In the above example, the Dead Time is 36 seconds before declaring the neighbor down.


The Address field indicates the IP address of the interface to which this neighbor is directly connected. In the case of unnumbered links, this field shows the IP address of the interface to which the neighbor is unnumbered. When OSPF packets are transferred to the neighbor, this address will be the destination address. In the above example the interface IP address of the neighbor is


The Interface field indicates the interface on which the OSPF neighbor has formed adjacency. In the above example the neighbor can be reached through Ethernet 0.

Related Information

Updated: Aug 10, 2005
Document ID: 13688