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

HTML page basic structure and loading process

[[433851]] Hello everyone, I am Pippi. Preface Fo...

It is urgent for operators to improve network operation and maintenance

Communication networks are the underlying infrast...

Understand the ins and outs of DNS in one article

[[333115]] 1. Background By the late 1970s, the A...

5G is used to serve IoT, what will 6G be used for?

"5G is used to serve IoT (Internet of Things...

High-performance IO model: Reactor vs Proactor, how does it work?

We all know that a lot of ideas in the field of s...

...

Ten Wi-Fi predictions for 2024 and beyond

As available spectrum increases around the world,...

Yu Xin: What does ofo want to do?

[51CTO.com original article] The 16th China Inter...

A detailed study of the IPv6 address structure

IPv6 stands for Internet Protocol Version 6, whic...

Android Network Programming-TCP/IP Protocol

In the article Android Network Programming - Comp...