OSPF Router ID on Huawei

When I was doing the previous LAB, I came across the router id, and I told you that I will speak about it later.

The router id in OSPF is nothing more than how the OSPF router is represented to his neighbor. You can think it is like the name of the router in the OSPF process.

It is very advisable that you put a router id manually on the router when configuring OSPF because this will help you to know to which other router you are forming a neighborship specially if you have a very big network.

The router id can be set statically, but in case not set then it pick up an IP address automatically. Here how this happens:

Priority 1 Router id set manually
Priority 2 The highest IP address of a loopback interface
Priority 3 The highest IP address of an active physical interface

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

This is the sequence of priorities. As you see, if you set the route id manually, it has always the highest priority. However, when you set it then the change will not happen automatically, in this case you need to reset the full OSPF process for the change to happen.

Enough theory!!! Let’s apply this on a LAB so you can understand it better. I will be using the last LAB scenario and will only do changes on the router id’s.

LAB: Setting up OSPF Router ID

We are still on the same LAB scenario and OSPF is already configured. Based on my explanation, each router will have now a router id. Let’s see what is the router id that R1 has now.

I have used the command “display ospf brief” to see what is the router id of R1. I can see that the router has picked up the ip 192.168.12.1 to be the router id. If we go to R2 and check with whom he is forming a neighborship, we will see that he is going to show that he is forming a neighborship with 192.168.12.1 because this is the router id of R1. Let’s check.

Indeed, R2 is saying that he has neighborship with a router on his interface G0/0/0 which has a router id of 192.168.12.1 – this is R1.

Let’s imagine that we do have an OSPF network of 50 routers, then it is going to be very difficult for us, as network engineers, when checking the OSPF peer to recognize each router from his router id in case we leave it to be selected automatically. Is there a better way? Yes there is. We can put manually the router id that we wish to be displayed for each router. And as I have explained, it has the highest priority. Let me change the router id on R1 and make it 11.11.11.11 then this will be much easier for me to know that this is R1.

Using the command above, I could change the router id to 11.11.11.11. But you see, I got a notification that I need to rest the protocol (in our case OSPF) in order to have the router id applied. What does this mean? This means that the router id for now has been changed but has not been applied on the OSPF. Let me show you that.

You see that even if I have changed the router id on R1, but on OSPF it still sees the router id as 192.168.12.1. To change this, we need to reset the whole OSPF process then the router id will be applied on OSPF. Let me show you how you can do that.

You should go one level back to the user mode and reset the ospf process using the command “reset ospf process”. Once done, you can check if the router is has been changed to 11.11.11.11 as I have put it. Let’s see.

Here it is. The router is has been changed now to 11.11.11.11. Excellent. What about R2, will he show now that he is forming a neighborship with 11.11.11.11 on the interface G0/0/0/0? Let’s check:

Here it is. R2 is showing now that he has formed a neighborship with 11.11.11.11 which is the router id of R1. Excellent!!!!

This way you can set the router id manually on your OSPF routers to recognized them when doing troubleshooting.

[/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