Two types of relationships between OSPF routers

In OSPF, there are two types of relationships between routers

  • neighbor
  • adjacency

To understand how OSPF works, it is important to understand the relationship between these two types of OSPF routers.

Neighbor

Neighbor is the relationship between OSPF routers on the same network. OSPF first discovers neighbors through Hello packets.

Adjacency

Adjacency is the relationship between OSPF routers that exchange LSAs. Adjacency is a prerequisite for being a neighbor, and a special kind of neighbor is an adjacency.

Figure Neighbor and Adjacency

Network types and neighbor/adjacency

One of the things that gets confusing when thinking about neighbor and adjacency is that neighbor does not necessarily mean adjacency. It depends on the OSPF network type.

The OSPF network type is a classification of OSPF enabled interfaces. The main network types are as follows

  • BROADCAST
  • POINT_TO_POINT
  • NON_BROADCAST
  • POINT_TO_MULTIPOINT

The interface on which OSPF is enabled determines the default network type.

Interface typeOSPF Network type
EthernetBROADCAST
Point-to-pointPOINT_TO_POINT
Frame Relay/ATMNON_BROADCAST
Table Default Network Types
Unless explicitly configured, the network type will never be POINT_TO_MULTIPOINT.

We rarely use Frame Relay/ATM anymore. Therefore, it is enough to know only BROADCAST and POINT_TO_POINT as network types.

POINT_TO_POINT has only two OSPF routers connected to the same network. Therefore, in POINT_TO_POINT, neighbor is adjacency. On the other hand, BROADCAST will have two or more OSPF routers connected on the same network. Neighbor, i.e., not necessarily adjacency.

図 ネットワークタイプとネイバー/アジャセンシー

DR/BDR Overview

On a BROADCAST network, such as Ethernet, the relationship between DR/BDR is adjacency. DR and BDR are routers that are elected to efficiently synchronize LSDB on networks that are BROADCAST network types such as Ethernet.

Consider the example of four OSPF routers, R1 to R4, connected to the same Ethernet network. If R1 is the DR, the relationship between R1 is neighbor and adjacency; R2 to R4 exchange LSAs with R1. Other than that, they are just neighbors. For example, R2 and R3 are simply neighbors that are OSPF routers connected on the same network; they do not exchange LSAs.

Figure Relationships with the DR become adjacency.
In the above figure, the BDR is omitted.

Summary

Point

  • There are two types of relationships between OSPF routers: neighbor and adjacency.
  • The neighbor is the relationship between the OSPF routers on the same network.
  • Adjacency is the relationship between the routers that exchange LSAs.
  • Depending on the network type, the neighbor may not necessarily be the adjacency.

Related articles

How the OSPF works