In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to deeply understand the OSPF protocol. The editor thinks it is very practical, so I hope you can get something after reading this article. Let's take a look at it with the editor.
OSPF is a link-state routing protocol based on SPF algorithm.
The picture above shows the working process of the OSPF protocol when a new router is added to an OSPF area. If you can describe this picture in great detail, you will basically master the working process of the OSPF protocol.
First of all, we should know that a router running the OSPF protocol will eventually store three tables: the neighbor table, the topology table and the routing table. The following is to take the generation process of these three tables as a clue to analyze the changes that have taken place in the router in this process, so as to explain the working process of the OSPF protocol.
Establishment of neighbor table
A router that is new to the OSPF area must first establish an adjacency with its neighbor router as follows:
The new router sends out the first hello packet and waits for a reply with an interval of four times that of the hello packet. The state of the wait period is called the initial state of the router. During the wait, the new router receives the hello packet from another router and learns DE and BDR. If not, the selection begins. After receiving the hello0 packet from the new router, other routers on the network add the router's router Tn to the topology database and send a response hello packet, which contains a list of all the neighbors of their own router ID.
The new router sees its own ID appear in the neighbor list answered by other routers and establishes an adjacency, and the new router changes its state to two-way.
Through the above three steps, the newly joined router and its neighbor router have established an adjacency.
Establishment of Topology Table
When establishing the topology table, the newly joined router goes through pre-boot state, exchange state, load state, and full adjacency state. The following is to show you this process in the form of a graph:
Switching status: both routers send DBD,DR to send a series of DBD, including the network stored in their database. DBD does not contain detailed and necessary information, just to compare with your own database after receiving DBD message messages from other neighboring routers.
Load status: the new router needs more detailed information and will use LSR (link-state request packet) to make a request for details of a specific LSA, while the requested side will respond and send LSU (link-state update packet), which contains the LSA information of the information.
After the above four steps, the data topology maps of all routers in this OSPF area are synchronized.
Then each router runs the SPF algorithm according to the generated whole-area data topology diagram to generate routing entries to the target network.
After the above three major steps, the running process of OSPF protocol is basically completed.
There are several important issues to pay attention to in the above process:
(1) the administrative distance of this protocol is 110,The range of OSPF routing process ID must be between 1-65535 and has only local meaning. The routing process ID of different routers can be different, and the area ID is between 0 and 4294967295. When the area value is 0, this area is called backbone area.
(2) make sure that the router ID follows the following order:
The router ID specified with the router ID command has the highest priority
If not specified, the IP address of the loopback interface with the highest IP address is selected as route ID
If there is no swap interface, choose router ID which has the highest IP value in the up port.
However, it is recommended to use the command to specify it, which is more controllable.
(3) principles of DR election
The first factor is time, and the router that starts first is elected as DR.
If it is started at the same time, or re-elected, the highest priority is DR. By default, the interface priority of the multiaccess network is 1, the interface priority of the point-to-point network is 0, and the command to modify the interface priority is "ip ospf priority". If the interface priority is set to 0, then the interface does not participate in the DR election.
If the first two are the same, finally look at router ID, the highest router ID is elected as DR.
DR elections are not preemptive unless re-elected artificially. There are two ways to re-elect a DR, one is to restart the router, and the other is to execute the "clear ip ospf process" command.
The above is how to deeply understand the OSPF protocol. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.