Neighbors and adjacencies in OSPF: a single word can lead to a huge difference

Neighbors and adjacencies in OSPF: a single word can lead to a huge difference

What you call a "neighbor" relationship is actually an "adjacent relationship"

When learning OSPF, you often say that routers form a "neighbor" relationship. In fact, this statement is inaccurate. Most people should express an "adjacent" relationship. Have you realized the difference between the two?

[[283392]]

Although the difference between "neighbor" and "adjacent" is not that big in Chinese, they are two completely different words in English and have no connection at all:

  • "Neighbor" in English is "Neighbor";
  • "Adjacency" in English is "Adjacency.

In the OSPF world, they are quite different, and can be said to be two completely different states. Let's take a look at them together!

Neighbor relations stop at "2-Way", adjacency relations include the entire process

OSPF State Machine

Friends who have bought my column should know that OSPF has 8 states when forming neighbor relationships, and different things will be done in each state. If you haven't bought it, you can refer to Section 4 of the column: Mastering OSPF's 8 neighbor states is half the battle for OSPF.

As shown in the "2-Way" state in the figure above, it means that the two OSPF routers have established two-way communication and selected DR/BDR. At this point, we can say that a "neighbor" relationship has been formed between the routers.

After two routers have a "neighbor" relationship, they must go through four states: ExStart, Exchange, Loading, and Full, and fully synchronize the LSDB before they can be called an "adjacency" relationship.

That is to say, the "adjacency" relationship refers to the entire process of exchanging information between OSPF routers, while the "neighbor" relationship only requires two routers to enter the "2-way" state, and there is no need to exchange LSA information.

Now you understand what I said at the beginning, why most people got it wrong! The "neighbor" relationship we usually talk about actually refers to the "adjacent" relationship that exchanges LSA information!

So why is it enough to form a "neighbor" relationship between routers? This involves the content of DR/BDR!

On the same LAN, all OSPF routers need to form an "adjacent" relationship with the DR/BDR

Anyone who knows a little about OSPF will know about DR/BDR, which are concepts that emerged to save resources! For example, as shown in the figure below, if there is no DR/BDR, the four routers on the same LAN will have to form an "adjacent" relationship with each other, which is a huge waste of resources! The number of "adjacent" relationships formed can be calculated using the "n(n-1)/2" formula.

Two-to-two adjacency relationships

With DR/BDR, all OSPF routers (DR Other) only need to exchange LSA with DR/BDR. There is no need to exchange LSA with each other, which can save a lot of resources.

For brevity, only DR is listed.

In this way, other routers (DR Other) only need to form a "neighbor" relationship, and no further interaction is required!

From the above we can see that not all routers need to form an "adjacent" relationship. Sometimes a "neighbor" relationship is sufficient.

Neighbor and Adjacency Status

Summarize

If you hear a friend at work say that OSPF routers form an "adjacent" relationship, then there is no doubt that this person must be an independent expert. You must communicate with him more about network knowledge, because most people still follow the trend and say "neighbors" without making such a strict distinction!

<<:  Ministry of Industry and Information Technology: A number of key 5G technologies for specific needs of the industrial Internet will be achieved in 2022

>>:  After reading the long connection in HTTP protocol, most programmers collected it...

Recommend

Six tips to help you choose the best responsive design framework

【51CTO.com Quick Translation】 For designers and f...

How will 5G impact AR and VR?

There has been a lot of discussion about the evol...

Computer software: Recommend 10 practical office efficiency tools

[[395494]] 1. Everything search tool Everything i...

LTE vs. 5G: What’s the difference?

For years, it seemed like the hype about 5G would...

The Implications of the ZTE Incident for Operators

Although the ZTE incident has not yet reached a f...

Log Analysis for Software Defined Data Center (SDDC)

Modern infrastructure is generating log data at a...

What are the six components of structured cabling?

The six major components of structured cabling ar...

...