10. The Neighbor Data Structure
An OSPF router converses with its neighboring routers. Each
separate conversation is described by a "neighbor data structure".
Each conversation is bound to a particular OSPF router interface,
and is identified either by the neighboring router's OSPF Router ID
or by its Neighbor IP address (see below). Thus if the OSPF router
and another router have multiple attached networks in common,
multiple conversations ensue, each described by a unique neighbor
data structure. Each separate conversation is loosely referred to
in the text as being a separate "neighbor".
The neighbor data structure contains all information pertinent to
the forming or formed adjacency between the two neighbors.
(However, remember that not all neighbors become adjacent.) An
adjacency can be viewed as a highly developed conversation between
The functional level of the neighbor conversation. This is
described in more detail in Section 10.1.
A single shot timer whose firing indicates that no Hello Packet
has been seen from this neighbor recently. The length of the
timer is RouterDeadInterval seconds.
When the two neighbors are exchanging databases, they form a
master/slave relationship. The master sends the first Database
Description Packet, and is the only part that is allowed to
retransmit. The slave can only respond to the master's Database
Description Packets. The master/slave relationship is
negotiated in state ExStart.
DD Sequence Number
A 32-bit number identifying individual Database Description
packets. When the neighbor state ExStart is entered, the DD
sequence number should be set to a value not previously seen by
the neighboring router. One possible scheme is to use the
machine's time of day counter. The DD sequence number is then
incremented by the master with each new Database Description
packet sent. The slave's DD sequence number indicates the last
packet received from the master. Only one packet is allowed
outstanding at a time.
The OSPF Router ID of the neighboring router. The Neighbor ID
is learned when Hello packets are received from the neighbor, or
is configured if this is a virtual adjacency (see Section C.4).
The Router Priority of the neighboring router. Contained in the
neighbor's Hello packets, this item is used when selecting the
Designated Router for the attached network.
Neighbor IP address
The IP address of the neighboring router's interface to the
attached network. Used as the Destination IP address when
protocol packets are sent as unicasts along this adjacency.
Also used in router links advertisements as the Link ID for the
attached network if the neighboring router is selected to be
Designated Router (see Section 12.4.1). The Neighbor IP address
is learned when Hello packets are received from the neighbor.
For virtual links, the Neighbor IP address is learned during the
routing table build process (see Section 15).
The optional OSPF capabilities supported by the neighbor.
Learned during the Database Exchange process (see Section 10.6).
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 (see Section 10.5). The optional OSPF capabilities
are documented in Section 4.5.
Neighbor's Designated Router
The neighbor's idea of the Designated Router. If this is the
neighbor itself, this is important in the local calculation of
the Designated Router. Defined only on multi-access networks.
Neighbor's Backup Designated Router
The neighbor's idea of the Backup Designated Router. If this is
the neighbor itself, this is important in the local calculation
of the Backup Designated Router. Defined only on multi-access
The next set of variables are lists of link state advertisements.
These lists describe subsets of the area topological database.
There can be five distinct types of link state advertisements in an
area topological database: router links, network links, and Type 3
and 4 summary links (all stored in the area data structure), and AS
external links (stored in the global data structure).
Link state retransmission list
The list of link state advertisements that have been flooded but
not acknowledged on this adjacency. These will be retransmitted
at intervals until they are acknowledged, or until the adjacency
Database summary list
The complete list of link state advertisements that make up the
area topological database, at the moment the neighbor goes into
Database Exchange state. This list is sent to the neighbor in
Database Description packets.
Link state request list
The list of link state advertisements that need to be received
from this neighbor in order to synchronize the two neighbors'
topological databases. This list is created as Database
Description packets are received, and is then sent to the
neighbor in Link State Request packets. The list is depleted as
appropriate Link State Update packets are received.