After learning the DR/BDR selection rules in OSPF, many people find it very simple. However, when doing experiments, they find that sometimes the selected DR/BDR is not what they expected, and they feel confused: Is there something wrong with the selection rules they learned? Actually, no. There is another important point of knowledge in the selection of DR/BDR: DR/BDR cannot be preempted! But before learning new knowledge points, let's review the selection rules of DR/BDR! DR/BDR election rules We all know that DR/BDR is a property of a router interface. It can only indicate the role of a router on a certain network segment, and cannot represent the entire router. Therefore, the selection of DR/BDR is based on a certain network segment. For example, in the multi-point access topology below, there are four routers in the same network segment 10.1.1.0/24. DR and BDR will be selected on this network segment. Initially, the four routers will consider themselves as DR/BDR, and will set the DR and BDR marks in the messages they send. When a router receives a packet with a higher DR priority than its own, it stops declaring itself as DR/BDR and instead declares the router with a higher DR priority as DR/BDR. Select based on DR priority If a router receives a packet with the same DR priority, it will compare the Router IDs. If the Router ID of the other party is larger than its own, it will declare the other party as the DR/BDR. Select by Router ID The above is the DR/BDR selection rule:
Non-preemptibility of DR/BDR selection If everything follows the DR/BDR selection rules, there will be no doubts, and the world will be peaceful. However, when we check the roles of DR and BDR, we often see that the router that becomes DR/BDR is not what we expect. For example, in the figure below, there are 3 routers. Initially, R3 has a DR priority of 30, the largest value, so it will be selected as the DR on this network segment; R2 has the second highest priority, so it will be selected as the BDR on this network segment. DR/BDR If we add another router R2 to the network, and the DR priority is 50, what will happen? Will R2 become the new DR and R3 become the BDR? Add a new router R2 In fact, at this time, nothing will change on the network, R3 still exists as DR, and R1 still exists as BDR! If you check the status of the routers at this time, you will find that the DR/BDR selection rule is wrong! No changes to the network In fact, the DR/BDR selection rules mentioned above are not wrong. The reason for this situation is that the selection of DR/BDR needs to follow another rule: the selection of DR/BDR is lifelong and will not be preempted! This means that on a network segment, once a DR/BDR is selected, it will remain the DR/BDR until it fails, and will not be replaced by a later router with a higher priority. Why do this? OSPF's approach actually meets the actual network usage requirements: stability overrides everything. When switching DR/BDR, LSA needs to be re-advertised, and the network will be temporarily blocked, which is not allowed in actual work. If a high-priority router joins the network, switching DR/BDR may cause network oscillation. For example, if the newly added OSPF router is unstable, sometimes up and sometimes down, the entire network will be unusable. Therefore, when OSPF was designed, this was taken into consideration. Once the DR/BDR is selected, it will not change! We encountered this situation in the laboratory. Don't worry, just clear the OSPF process of all routers and let them reselect! But in the actual network, you can't clear the OSPF process casually! And many times, we encounter the situation that the DR/BDR is not the router we expect, because we are slow to type the command. Initially, a router will wait for 40 seconds (by default) before selecting a DR/BDR. If a router with a high DR priority joins the network after 40 seconds, it will not have a chance to become a DR/BDR! Routers with a DR priority of 0 do not participate in DR/BDR selection. After reading the above description, you should be able to understand that even if the DR priority of a router is the highest, it may not necessarily become a DR/BDR. If you want an OSPF router to always become the DR/BDR of a certain network segment, it will not work by modifying the DR priority and Router ID. In fact, if you want a router to always become a DR, there is only one way: set the DR priority of other OSPF routers to 0. When the DR priority of a router is set to 0, it will not participate in the selection of DR/BDR on this network segment, and its role will always be DR Other. DR priority is set to 0 Of course, the risk of this approach is that if the DR router fails, the entire network will be paralyzed and there will be no way to forward packets. This is because DR Others can only exchange routing information with DRs, and DR Others do not exchange routing information with each other. Summarize After the above description, you should have understood the DR/BDR selection mechanism and the reasons why preemption is not possible. Let me make a brief summary:
|
<<: 5G is here. How to build the emerging edge DCs?
>>: What are LACP and PAGP? What are the differences?
Gateway Gateways are used to control the flow of ...
As today's corporate organizations are active...
Since April 2021, my country's 5G development...
Recently, China Unicom announced its full-year pe...
According to the latest report from Valuates Repo...
China's 5G construction is in full swing. Acc...
People sometimes mistakenly use the terms “web sc...
MWC 2023 is about to be held, and the 5G Advanced...
During the summer vacation, TmhHost offers a 30% ...
[[438351]] My conclusion from the above is: HTTP ...
666clouds recently launched an event for New Year...
Since the beginning of this year, South Korea, Ja...
UCloud has recently launched the Golden Autumn Ca...
About the author: Xiao Honghui, graduated from th...