Covers the configuration of OSPF router IDs and interface priorities on Cisco routers, including the commands required to apply and verify both settings.
OSPF Router ID & Priority
I'm on router one right now and I'm consoled into it, so let's go ahead and take a look at some of these commands.
The first thing that I'm going to do is a show ip ospf neighbor. When I do this, I can see what the neighbor ID is of my different neighbors. If you recognize this, this is actually the loopback addresses of these other devices, because we set loopback addresses on our devices, but what we didn't do is we didn't set up a router ID. So that all makes sense.
We see some other information here. It's interesting, we did talk about this, about the state that this is in. So these are in full and full DR states here. That's missing the DR or the BDR here, and that's because this is a serial interface, this is a point-to-point interface, and remember we said that it doesn't elect a DR there. So that explains that right there. This one is a fast ethernet, so even though there's a device on the other side, it still goes through that election process.
Let's take a look at another command here. I'm going to do a show ip ospf interface, and we're going to look at fa0/1. Here, when we look at this, we can see the IP address of this interface right here, and the router ID, which is the loopback address. If I do a show ip interface brief, I can see that this loopback interface is 10.241.0.2, so that's what we're seeing right here. On this link, the designated router is 10.241.0.1, so that is the other router. The other router is the designated router, so that would make this the backup designated router, which is what we see right there. And then we also see a priority of one.
The last one we'll do here is a show ip protocols, and this gives us just a short rundown of some information here, to include the router ID. So that's the one that we're going to be looking at right there.
As I mentioned, what we can do is we can set the router ID statically. What I'm going to do is get into global configuration mode and do router ospf and the process ID, which is 10, and we're going to do router-id and then specify what the router ID is. I'm just going to come up with — maybe it's 12.12.12.12. So it's in the format of an IP address. We'll just use that, and I'm going to hit enter there.
Notice here it says reload or use clear ip ospf process. One of the reasons why we have to do this is because it's not going to actively go and make a bunch of changes after a designated router and a backup designator has already been selected. So this is a command I'm going to have to enter here in a little bit.
The next thing I'm going to do is I'll exit out of this and get into the interface. I'm going to get into my interface fa0/1, and then within that interface I'm going to do ip ospf priority, and we're going to set it to a hundred. Then I will end out of here.
We see here this router ID has not changed at this point, which shouldn't be surprising, because it said that we need one extra step before we do that. I'm going to do a show ip ospf interface fa0/1. We see the priority right here and it's set to 100, so that has already changed — it doesn't wait for that to change. Although since it is a higher priority, we notice that this would be the DR at this point in time because it's the higher priority, but it stays as a backup designated router.
Now what I'm going to do is I'm going to do a clear ip ospf process and hit enter. It's going to say, are you sure you want to clear all of the processes, and I'm going to say yes. Now I'm going to do a show IP, and we see the router ID now is 12.12.12.12. So we made both of those changes successfully.
If I want to take those changes off, I just go back and do the same thing except put a no command at the beginning of it, and then it would take those off.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →