About the DR/BDR election process explained in volume one

Source: Internet
Author: User
Tags rfc

Why are DR and bdr elections required on the MA network? If each router sends its own LSDB database, there will be a large number of LSA traffic in the network, and a large portion of those LSA is duplicated. So in order to reduce the bandwidth consumed by LSA packets, Elect the DR and BDR to send LSA on behalf of everyone.
650) this.width=650; "style=" border-bottom:0px;border-left:0px;border-top:0px;border-right:0px; "title=" 1426421122983 "border=" 0 "alt=" 1426421122983 "src=" http://s3.51cto.com/wyfs02/M02/5B/4B/ Wkiol1ufui3dovetaac9ecb-c2s474.jpg "longdesc="./1426421122983.png "height=" 407 "/>

It is easy to see that if all routers form adjacency, then 25 LSA is required to advertise the entire network.

After the election of Dr, Dr is responsible for the following tasks:

    • Represents the MA network, as well as routers on other attach in the MA network.

    • Manage broadcast traffic

Simply put, Dr and the network segment behind can be regarded as a pseudo-node, from attach to the pseudo-node of the router to the pseudo-node cost of the normal interface cost, but from the pseudo-node to the attach router cost is 0. (I don't quite understand the meaning of this passage.)
Dr represents a pseudo-node for a particular segment, and both Dr and BDR are concepts of interfaces rather than routers.
650) this.width=650; "style=" border-bottom:0px;border-left:0px;border-top:0px;border-right:0px; "title=" 1426422546245 "border=" 0 "alt=" 1426422546245 "src=" http://s3.51cto.com/wyfs02/M00/5B/4B/ Wkiol1ufui3xxqy5aac8qy2gnpo905.jpg "longdesc="./1426422546245.png "height=" 489 "/>

As you can see, all routers are associated with the Dr. There is not a regular adjacency between each other.

The above design has a problem, if the Dr hangs, then need to re-election Dr, the process of the network is unreachable. So, in order to avoid a single point of failure, the design of OSPF is, Enable a BDR. All routers also establish adjacency with the DR and BDR. Moreover, there is a complete adjacency relationship between the DR and the bdr. When Dr hangs, you can quickly switch to the BDR to prevent the network from being unavailable.

The necessary conditions for DR/BDR elections:

    • Use a 8bit priority. The Cisco default priority is 1 and can be modified via the interface command IP OSPF priority. 0 for non-participation in elections

    • A field in the Hello packet with the priority and the interface address of the DR and BDR that you think you have.

    • When an interface is activated in the MA network, the Initialize DR and BDR fields are 0.0.0.0 and set a wait timer with the same length as the dead timer

    • Information from the DR and Bdr is recorded in the interface table.

The election process for Dr and BDR:

Step1. After two-way communication have been established with one or more neighbors, examine the priority, Dr., and BDR fields of E Ach neighbor ' s Hello. List all routers eligible for election (that's, routers with precedence greater than 0 and whose neighbor state was at least two-way); All routers declaring themselves to be the DR (their own interface address are in the Dr field of the Hello packet); And all routers declaring themselves to being the BDR (their own interface address is in the BDR field of the The Hello packet). The calculating router would include itself on this list unless it is ineligible.

On the broadcast link, after the OSPF router enters the 2-way state, the DR/BDR election begins. First, why is the 2-way state start the election, because in the 2-way state, all routers in the Neighbor ID field have all the other router's RID, Ensured the fairness of the elections.
At the time the election is initialized (note that the election is initialized), all the routers that have an election condition write their rids to the DR and Bdr fields of the Hello package.

Step2. From the list of eligible routers, create a subset of all routers not claiming to be the DR (routers declaring themselves To is the DR cannot be elected BDR).

The second step is confusing because all the routers in the first step have already written their rids to the Dr Field, so the subset that does not generate itself as a Dr must be empty. This step seems to be in conflict with STEP1. It is important to note that the process of election has been in existence since the start of the OSPF process. This means that the process is always valid, not just for the initial election.
In other words, the Dr field of all the routers in this subset does not write their own rids, so this step is actually preparing for the BDR.
Again, there is a lot of talk now that OSPF is actually the first to elect the BDR and then put the BDR as Dr, personally think this is wrong. From the following steps we can see that in the initialized state, all routers claim to be NULL in the subset of Dr and Bdr,step2. You should jump to the STEP5 for Dr's election. After the DR Election, all the router's Dr fields are written with the Dr Rid instead of their own rids, and the conditions for entering that subset are met. All routers except Dr will enter the subset and begin the BDR election.

step3. If one or more neighbors-subset include its own interface address in the BDR field, the neighbor with the highest Priority would be declared the BDR. In a tie, the neighbor with the highest Router ID would be chosen.

Step3 more clearly, the process of initialization all routers in the BDR write their own, after the election is completed, only the BDR wrote himself. The rest is written about the BDR's RID.

Step4. If no router in the subset claims to is the BDR, the neighbor with the highest priority would become the BDR. In a tie, the neighbor with the highest Router ID would be chosen.

Step4 says that if no one claims to be a bdr, then it means the BDR is dead, and the BDR will be re-elected. (The dead are not talking, the same can be done, the dead bdr will not speak ...) Therefore, the BDR does not say that he is a bdr, then it means that the bdr hung.)

step5. If one or more of the eligible routers include their own address in the Dr. Field, the neighbor with the highest priority W Ill be declared the DR. In a tie, the neighbor with the highest Router ID would be chosen.

This step is Dr's election. If a lot of people say that they are DR, then the priority of a large selection of DR, the same priority, the rid of the big is Dr. (If the RID is the same, then you think too much, the neighbors will not come up)

step6. If no router has declared itself the DR, the newly elected BDR would become the Dr.

This step is similar to the concept of step4, mainly how to determine the Dr Hung. The Dr did not speak, he thought the Dr hung up. This time the BDR automatically becomes Dr. If the DR is not elected at this time, then the BDR election, why? Because everyone's Dr field is still written that the dead Dr, does not meet the step5 conditions, so step5 no way to execute.

STEP7. If the router performing the calculation is the newly elected Dr. or BDR, or if it is no longer the DR or BDR, repeat steps 2 through 6.

STEP7 confirms the problem that this process is not just for initialization.

Here are a few questions to note:

  • Elections are a process inside a router, so there is not much information to grab the packet.

  • Once the DR and Bdr decide that there will be no change when the new router joins, how is this non-preemption feature implemented? A new router will not know whether it is in a new network environment or has a DR/BDR environment. So, The normal situation should be the same. However, note that the electoral process introduced a wait time, a new on-line router does not start the election process immediately, but instead waits for a wait hour, which is introduced to learn the existing DR and BDR. This time the DR and Bdr fields are all 0 .

  • About the DR and Bdr in the end who is the first election, the network now many people say that BDR is the first election. Then found no dr,bdr automatically elected Dr. Personal feeling this is a misunderstanding of the RFC document read. The process given by the RFC is not a strictly sequential process, It should be a trigger mechanism for a state. From the time the debug came out, the two were simultaneous. However, it is possible that the granularity of debug time is much smaller than the actual processing time interval.
    650) this.width=650; "style=" border-bottom:0px;border-left:0px;border-top:0px;border-right:0px; "title=" 1426437482439 "border=" 0 "alt=" 1426437482439 "src=" http://s3.51cto.com/wyfs02/M01/5B/4B/ Wkiol1ufui6xuavhaafpx3qib98171.jpg "longdesc="./1426437482439.png "height=" 203 "/>
    650) this.width=650; "style=" border-bottom:0px;border-left:0px;border-top:0px;border-right:0px; "title=" 1426437554274 "border=" 0 "alt=" 1426437554274 "src=" http://s3.51cto.com/wyfs02/M02/5B/4B/ Wkiol1ufui-qnkr9aafue4jaex8697.jpg "longdesc="./1426437554274.png "height=" 205 "/>
    From the grasp of the package, the feeling is in accordance with the document description, the first election Dr. (This problem does not seem to make much sense, the implementation of the vendor does not necessarily follow the RFC document completely)

Reference: http://blog.sina.com.cn/s/blog_995092640101b4zx.html

Explanation of the DR/BDR election process in volume one

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.