LAB: Huawei OSPF DR/BDR election

In chapter 1, I have spoken about the Designated Router (DR) and Backup Designated Router (BDR) and I have explained why we need them in our OSPF network. In this chapter, I want to show you how the DR and BDR are being elected and this will be shown in LABS.

Before we go to the LABS, there is a miss-understanding that many students have when it come to the DR and BDR election. Most of students think that there will be only 1 DR and 1 BDR per area, and that’s totally wrong. In other word, the DR/BDR election happen per segment and not per area, which means that in case you have 4 segments in one area then you will have 4 DR’s and 4 BDR’s. I will show you in this chapter a LAB for this scenario.

For now let me show you directly to see how the DR/BDR election will happen.

LAB: OSPF DR/BDR election

Here I have a scenario where R1, R2 and R3 are connected to the same switch and are in the same area which is area 0. This is called a broadcast multi-access network. And as I have explained to you in chapter one, in a broadcast network we will have DR/BDR routers.

I have already configured the IP addresses and the OSPF, and I have given each routers in the following router IDs:

  • R1: 1.1.1.1
  • R2: 2.2.2.2
  • R3: 3.3.3.3

To justify that, let me show you the router id’s of each router.

[mepr-show rules=”319″ unauth=”message”]

Now, which of the 3 routers will be elected as the DR and which one will be the BDR?

The answer is easy. In case the priority is set to default (which is 1) that means that all routers have a priority of 1, then the router which has the highest router id will be the DR router. And the router which has the 2nd highest router id will be the BDR. You got me?

As I have already explained in chapter 1, all routers will form neighborship ONLY with the DR and the BDR, while with the other routers it will have a DROTHER state and the neighborship will not be fully formed.

Back to our scenario, R3 has the highest router id which is 3.3.3.3, that means that he should be the DR. While R2 has the 2nd highest router id which is 2.2.2.2, that means he should be the BDR. Let’s check this from the command line.

It clearly says that R3 is the DR, but it also mentions that R2 is the BDR. Let’s check if this is correct on R2.

That is correct!!! R2 is the BDR.

Please check that both R3 and R2 have same priority=1, that’s why the routers have compared the router id as the priority tied on both routers, and the one which had the higher one (R3) has been elected as the DR.

What about R1? He has the lowest router id. What state will it has? Let’s check together.

As you see, R1 has the state of DROther. That means that in case we had another router on this network who is DROther, then the neighborship will not be fully formed with R1 because, as I said, all routers will form neighborship only with the DR and BDR.

If you want, let me show you the OSPF peer on the 3 routers.

R3 has neighborship with R2 and R1. Let’s check now R2.

R2 has full neighborship with R1 and R3. Finally, let’s check R1.

R1 has a full neighborship with R2 an R3.

That’s great. Now my mission is to make R1 as the DR and R3 to be the BDR and I am not allow to play with the priority.

What I can do in this case is to higher the router id of R1 to be higher than the one of R3. Once done, I will reset the OSPF process on all 3 routers then they will enter into DR and BDR election again. The one which has the highest router id will be the DR (in my case R1) and the one which has the 2nd highest router ID will be the BDR (in my case R3). Let’s try to do that. First I need to change the router ID on R1 and will make it 11.11.11.11 as following:

I have removed the old router id (1.1.1.1) and put in place 11.11.11.11

Once I reset the OSPF process on all routers then theywill check who has the highest router ID and the highest one will be the DR.

Let’s reset the OSPF process on all 3 routers.

I waited until the neighborship has been formed. Let’s check whether R1 has been elected the DR.

Indeed, R1 is now the DR.

But look, it mentions that R3, who has the IP 192.168.123.3, is the BDR. Let’s check if this is true on R3.

Yep!!!! R3 is the BDR because it has the 2nd highest router id.

That means that R2 should have a DROther state. Let’s check.

Indeed, R2 who has the lowest router id ends up as DROther.

In the upcoming LAB I will show you how you can influence the DR/BDR election using the priority command. Please leave the current LAB as it is because we need to use it in the upcoming one.

[/mepr-show]

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

Please Login to Reply or add a comment!

About