OSPF Adjacency Troubleshooting Solution – Getting Close to the OSPF adj
OSPF Adjacency Troubleshooting Solution – Getting Close to the OSPF adj
In this video, Cisco CCNA & CCNP instructor Mark Jacob shows how to troubleshoot OSPF Adjacency issues by showing the distance between routers with the show ip ospf neighbor command.
I’m Mark Jacob, Cisco instructor here at Interface Technical Training. You may be wondering why it says, “Getting close to the adj.” Well, as we go through this video here, it’s going to become readily apparent. It’s not a lack of proofreaders. That was done on purpose. I have a couple of routers here ‑‑ router one, router two. I have them connected, Fast Ethernet.
What I want to do is kind of explore the adjacency process in OSPF. If you use the memory aid, the one that I like to use, do all interesting teachers enhance each lesson fully down, attempt, in it, two‑way, X start, exchange, loading, full. If you just fire up OSPF on two routers, the only thing you actually see on this screen is loading and full. You miss a bunch.
If you’re troubleshooting, everything that you missed was what you need to see. A lot of troubleshooting OSPF is, “If I’m not getting to a fully adjacent state, how far am I getting before it fails and dies?” Let’s take a look at what we have so far. Router one, I’ll do a show ip ospf neighbor, just to see what’s there. I just climbed up on top of router one and I’m looking off in the distance.
There in the distance I see router two. His Neighbor ID is 184.108.40.206. His priority is 1. His state, or our state ‑‑ right now ‑‑ is full. He is the DR. The comparison I can make, if I type the same command on router two ‑‑ show ip ospf neighbor ‑‑ now it’s like I climbed up on top of router two and I’m looking off of the distance. I say, “Hey, over there I see somebody name 220.127.116.11, and he’s the BDR.”
Router two sees that router one is the BDR. Router one sees that router two is the BDR. Now, this state is already established. We didn’t get to see any of this happen…We will. Again, priority is going to come into play here as well. Just while it’s on the screen, we’ll take a look at it. You also can see from the diagram that it’s Fast Ethernet 0/0 that is the connection between these two devices.
Let’s take a look at that…Show ip ospf interface Fast Ethernet 0/0. You’ll notice that this side says, “Hey, my priority is 1, and I am the BDR,” which is what this guy is saying as well. “Hey, over there I see that guy.” The command, show io ospf neighbor, don’t get confused. Remember that you’ve asked the router, “Hey, look at our neighbor and tell me what you see.” We’re just seeing here that it agrees.
If I type the similar command on router two, show ip ospf interface Fast Ethernet 0/0…Same here. I see that, I ‑‑ this is information now about me ‑‑ I am router two and here’s what I know about myself…I am the DR and my priority value is set to 1. Well, the states through which OSPF passes, as you’re probably well aware, most of them are transitory other than two‑way and then full.
This video doesn’t really go into why two‑way is not necessarily transitory…but, I want to see this process happen. I want to manipulate the priority and see if I can impact the winner. The main thing here is the DR, the BDR, and the multiaccess environment…Who gets to win? Well it turns out that the winning value is whoever has the higher priority. However, if you don’t do anything to change it, the default priority value OSPF, as it’s indicated here, priority 1.
They’re equal in priority value. There’s got to be a tiebreaker. The tiebreaker is whichever router has the higher router ID. It turns out, who’s the winner…Well router two has an easy to remember router ID of 18.104.22.168, router one is 22.214.171.124.
Let’s do something to impact this. Let’s go to configure terminal. Let’s go to interface Fast Ethernet 0/0. I want to impact the priority of router one . I want it to become the DR even though it’s got a lower router ID. What do I have to do? Well, I have to set it’s priority to some value that’s higher than router two. Let’s go ip ospf priority and pick a value…I don’t know, let’s go 4, 4 is bigger than 1…6 is greater than 1.
I set my OSPF priority value to 4. I see, “Hey, stuff is happening.” By the way, why am I seeing stuff happening? This is what I was saying before. Ordinarily you don’t see this on the screen. If you want to, you have to type the command, that is why it looks like we have bad proofreaders, on the title of this video.
Let me go out to privilege EXEC mode. I’m going to type, “Debug ip ospf adjacency. That’s what I want to watch. It’s like ‑‑ notice that little caret ‑‑ “You went wrong right about the A.” What the heck? I’m pretty sure Merriam‑Webster says adjacency is spelled…All right, well let’s do this…
I’ll hit the up arrow, and backspace, and question mark…It’ll tell me my options. What are my options? Well there it is. It’s spelled correctly, adjacency, but look what you have to type to get it. Adj. In other words, adj, is not the short version of the command. Adj, is the command. In other words, if you try to type the whole thing it won’t understand what you’re talking about.
Nevertheless, I am running that debug, which is why I am seeing those messages. If I do a, show debug, you’ll notice I’m debugging those events. Let’s do the same thing, though. Let’s do a, show ip ospf neighbor, and see what it says. It says, “Well I see my neighbor and he is the DR.” Wait a minute, I just set my priority value higher. Well, another thing that you want to do if you’re going to try to manipulate settings in OSPF is clear the OSPF process.
Let’s do that. In fact, let’s go over here in router two…clear ip ospf process. It challenges me. “Yes, do you want to do that?” I’ll say, “Yes, I do.” Reset the processes…Let’s see if it listens to our changes. By the way, this was what I was saying. Notice all the stuff that’s happening on the screen. One of the things that went by actually precedes the DR, BDR…Actually, not precedes it, but it’s like it can with it.
If you look, notice, we are not the slave. What I did, by the way, to kind of coordinate this, I threw on router one is an NTP master, so that I could get very precise matching of time. This is happening at approximately 20:48:27. 20:48:27, let’s see if it gives us any additional information…BDR. Ah, notice this guy says, “We are the slave.”
We are not the slave. If you’re not the slave then ‑‑ scroll down ‑‑ we are the master. That is the other thing that sometimes confuses people with OSPF. I can influence the winner of the DR/BDR election by manipulated priority. You are the winner if you have a higher priority. The decision for who is the master and who is the slave, is purely based on router ID.
It may seem odd to contemplate, but you could have a router…Like router one could be the DR ‑‑ I influenced the election by giving it a higher priority ‑‑ whereas router two is the master. Again, we’re not going deep into…The master’s the only one that can increment the database number, but just we want to see this process happening. What have I done so far? I’ve increased the priority value on router one to see if I could make it to DR.
I’ll do a, show ip ospf interface Fast Ethernet 0/0, see if what I typed had an impact. You’ll notice it says, “We are the DR. The priority is 4.” Now, there’s one other thing I wanted to show you during this video about impacting the winner. Let’s go to configure terminal and router OSPF one.
I’m going to set a neighbor command ‑‑ I’m going to tell router one about router two ‑‑ because in the neighbor command you can also set a priority value. It’s kind of a wished‑for priority, “I wished that guy over there had such and such priority.” I’ll say, “Neighbor 126.96.36.199.” Notice if I do priority, I can say ‑‑ question mark ‑‑ what I want to set it to.
Right now router two has a priority unchanged, with the default value of 1. I’m going to say, “Let’s set that guy to a 4.” I’m going to go to router two. I’m going to say, “Router ospf one.” I’m going to say, “Neighbor,” kind of like crisscross configuration here, “188.8.131.52.” I’m going to say, “I wish your priority was two.” In actuality, I’ve lied. I’ve given router two a wish list.
Router two is wishing that router one’s priority was two. Router one is wishing that router two’s priority was 4…Say that five times fast. It’s not really, because if I go back to interface…Let’s go back to this guy, do show ip ospf interface Fast Ethernet 0/0, what’s the real priority? The real priority is, router one is 4. What is router two’s real priority? Do show ip ospf interface Fast Ethernet 0/0, and my real priority is 1.
Who should win, who should become the DR/BDR? Should be router one. Let’s check and see if this neighbor statement has had any impact. I’ll get back privilege EXEC on both of these guys. Let me check right now who is the winner. Show ip ospf, just so we can verify this…Router one is saying, “Hey, router two, he’s the BDR.” I’m going to go over to router two and I’m going to say, Clear ip ospf process and clear it.
Give it a minute. this is the stuff you want to see if you’re troubleshooting, a bunch of debugs flying by. Then, let’s see who wins. Let everything settle down…play your Jeopardy theme song right now. Now let’s go back to router one. Hit the up arrow, look at my neighbors. Then you notice it says, “My neighbor, his priority is 1 and he’s the BDR.”
If I do a, show ip ospf neighbor, on this guy…I see, over there, router ID 184.108.40.206. In reality, that wished‑for didn’t really have any impact. What was set on the interface is what won. One more thing, though…Notice that I cleared the process on the BDR. Let’s try it and see if we can make any impact by doing, clear ip ospf process, on the DR. Say, “Yes,” to that…Let it go. This is real‑time.
I did not speed this up in any way, which you probably can tell. Let’s do a, show ip ospf neighbor, now. It’s like, “Look at that.” Router one is saying, “Hey, over there I see router two. His priority is 1 and he’s the DR. He’s the DR with the priority of 1.” I go to router two and I say, Show ip ospf neighbor. He says, “Hey, over there I see a guy, he’s priority 4 and he’s the BDR.”
I found this odd. I was like, “How in the world could he be the BDR if his…?” It’s not like they’re unaware of it. They’re displaying it…”I’m aware that his priority is 4 and he’s still the BDR.” Router one is saying, “I’m aware that that guy’s priority is 1, but he’s the DR.”
Let’s try one other thing. I’ll do a, clear ip ospf process I’m going to say, “Yes,” but I’m not going to hit Enter. Clear ip ospf process, and, “Yes,” again. I’m going to hit Enter. Then hit over here, enter, as fast as I can. Try to get them as close as humanly possible to reset…See if that has an impact. The results before were against what we would think OSPF should do.
If I have a higher priority, I should’ve won this election. One more time let’s check it, show ip ospf neighbor. Notice he says, “I see that guy…” Be careful when you’re resetting, or you’re manipulating a priority. Even in the Cisco curriculum books, when it talks about making changes like this ‑‑ it’s usually in the note, offset by a couple lines.
It says, “To make sure that your changes have an effect, you may have to do the, clear ip ospf process.” That’s a guarantee, that one you have to type. Or you’ll also notice, pretty much every time, it makes that note. It also says, “You may have to reload the router.” Once again, it’s not what you want as the Network Admin. I do not want somebody that has a priority of 4 being the BDR, and another router with a priority of 1 being the DR.
I tested it, but I’m not going to make you sit through it. I reload these routers and they come back up. Then they come up in the state they’re supposed to be. Debug ip ospf adj. If you’re on the very bleeding adj of debugging ospf, it’s a very useful command, to see this stuff behind the scenes happening.
You May Also Like
Mark Jacob, Cisco Instructor, presents an introduction to Cisco Modeling Labs 2.0 or CML2.0, an upgrade to Cisco’s VIRL Personal Edition. Mark demonstrates Terminal Emulator access to console, as well as console access from within the CML2.0 product. Hello, I’m Mark Jacob, a Cisco Instructor and Network Instructor at Interface Technical Training. I’ve been using … Continue reading A Simple Introduction to Cisco CML2
In this video, Cisco CCNA instructor Mark Jacob shows how to create a Login and Message of the Day (MOTD) banners in Cisco IOS. The Banner is an interesting feature of the Cisco IOS. You could probably get by without it, but in a commercial environment you want to have it.
In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management