Before we dive into our next discussion, I solved our R1 R2 problem, which I still don't understand why it was happening because here's the deal, the neighborship is now properly formed and I had figured out that they were both trying to use the same router ID.
Here's the thing. We know that dynamically your router is going to look at your interfaces and choose the router ID based on that. So the best option here would be the highest loopback address on R2 and the best option here on R1 would be this one right here.
But for some reason, they were trying to use the exact same router ID. I don't know why. I haven't gone that deep. But as soon as I manually configured the router ID, so if we type in do show run pipe to section router BGP, I manually configured the router ID to this on this router.
We go over to R2. I manually configured the router ID on this router and then the neighborship just worked. But I had done a little quick research on the error message we had received about the BGP wrong identifier.
The BGP wrong identifier over here and then over the messages we were getting over here was again identifier wrong. So I just did a quick search and it said both routers are trying to use the same BGP router ID.
So I went ahead and manually set it and everything was fine. But again, why are they trying to do that? I don't know. I don't have an answer to that right now because there's nothing in the IP addressing space that would even convince them to try to use the same router ID when it's all said and done because I don't have duplicate addresses on these routers.
All right. Problem solved, though. That's the main thing. Yeah. All right. So let's dive into our next topic of the session. Yeah, I know it really right. Like, in my opinion, that's a bug, right? That's a bug that shouldn't have happened. And I've never had that happen before in this demo at all, which just is strange to me when it's all said and done. Yeah.
Yeah, it keeps us on our toes as IT professionals, makes our lives very interesting. I agree. All right. So now let's dive into our discussion on BGP best path selection process. So the BGP best path selection process is what? Well, let's think about it from an EIGRP standpoint. So EIGRP does what?
Well, I have a router that learns from all of its neighbors and then based on all the information gathered, I will decide what the best path is to reach a given destination based on what? The metric, right? It's going to be the metric. My EIGRP metric is going to figure out, well, we're using the diffusing update algorithm, I should say, for EIGRP. If I go this way, it's this far. If I go this way, it's this far, this way, this way, this way, this way.
And I will ultimately choose the one that is the closest based on the metric. Oh, yeah, it's pretty simple. OSPF, we learned about in our OSPF discussion last week, it was based on cost, cost of interfaces, cumulative added together, all of that stuff. And if an area board of routers in there, I mean, we're not going to go over that again. But in the end, again, it was based on what? Bandwidth. So the EIGRP, our metric would be based on things like bandwidth, delay, reliability, load. By default, it's just bandwidth and delay.
And with something like OSPF, it's purely based on interface costs. Well, BGP's best path selection process doesn't even care about that stuff. None of that stuff. And BGP's best path selection process is going to be based on a whole list of attributes that have to be analyzed from top down. Top down processing immediately execute upon a match. That's it. Once you find that match, that is unique, that is the one you want to use, it's over, it's done, you don't use any of the other ones in the list.
Kind of like an access control list when it's all said and done. Now, when you think about BGP, and you think about the web of connections that we have between different autonomous systems, our BGP routers are going to receive information about each prefix from different autonomous systems, different peering autonomous systems.
So when you think about this one here, 192.0.2.0-24, as we were talking about earlier, every autonomous system is going to learn about that multiple times. For example, this autonomous system here is going to learn about it this way, it's going to learn about it this way, it'll also learn about it this way. You're like, wait, how does it learn about that way? Because this autonomous system learns it that way, it's going to share with that one, that one's going to, right, but also what about this way, this way, this way, this way, this way?
I mean, it's going to be going everywhere. So there has to be some sort of elimination process in order to ultimately what? Determine what is the best path to use in this very specific moment in time under this given scenario with these given conditions.
So that way, they're the single best path can be chosen. Here's the list. Now, I want you to realize that this is a Cisco specific list. And from other vendors, you might see a slightly different list. For example, this option here is Cisco proprietary, you're only going to find it on Cisco products. It's not something that's going to come into play if you're using non Cisco products running BGP.
Something to keep in mind. But first and foremost, before we even go through this 11 step process or begin it, first things first, having next top IP address, right, that is reachable, meaning that we're going to ignore any path that we receive, if we can't get to the next top IP address, no matter what.
So for some reason, you learn something, but you cannot get to the next hop IP address, because you don't have a route in your routing table to get to the next hop IP address, then you are not going to use that path, you are going to ignore it, the rest doesn't even matter. And that makes sense, right? Because you don't want to use something that you can't actually get to the next hop router for.
The next one is don't use any path. So ignore paths that have a path that contains your own autonomous system number. We talked about that a little earlier. In our last discussion, by default, if you receive information, and that information has your own autonomous system number in it, ignore it by default.
That is a loop prevention mechanism. That's what that is to make sure that we don't accidentally cause loops. Because think about it this way. If I taught you about this, and then you taught them, and they taught me, and then I went and use them, does that not mean we'd have something like this? Or oops, traffic would do something like this, and we
Yes, that's exactly what would happen. So that's why this rule exists here. Do not ever, unless overridden by an administrator, accept any path that has your own autonomous system number in it.
All right, so once those two conditions are checked off, and you're like, okay, I can get to the next hop IP address, it doesn't contain my own autonomous system. Now it's time to go through all of this stuff here.
So if I type in something like do show IP BGP, we're going to see that stuff right here. You'll see that the next hop information is there. So I can reach these next hops. So that's good. There's metric, there's local preference, there's weight, there's the AS pass. So that's just some of them.
But this is not fun. Why? Because that's just a small list. So we're going to take you out to that BGP router that's out on the internet. So that way, there, we can go through all of these one by one, learn about them. So that way, there, we can be successful on the exam.
Because on the exam, they might give you output like this and ask you, why was such and such a path chosen? What was the deciding factor? Which item in this list is the reason why the route that was chosen was chosen?
So yes, you got to memorize this. Now, typically on the exam, how far do they go? Typically, we're down to here. You typically don't have to go beyond that on the certification exam. So would I encourage you to memorize whatever you see here in bold? Absolutely. That's why it's bolded.
We love oranges and orange marmalade. Repeat after me. We love oranges and orange marmalade. We love oranges and orange marmalade. I didn't come up with that.
I didn't come up with that. But my mentor did back in the day. And for some people, it works. For some people, it doesn't. But if it works for you, great. But know the order and memorize whether it's highest or lowest, or local, or shortest, right? Those are the things you got to know at a minimum to get ready for the certification exam.
All right. So number one, prefer the path with the highest weight. So this one is Cisco proprietary. Like I said, it's only going to be available on Cisco routers running BGP. So every single one of our BGP learned routes is going to have a weight attribute associated with it.
By default, if you learn it from another neighbor, it is going to have a weight of zero. If you use the network command locally on your device, then the weight will be set to 32,768, as you can see right here.
So if you learn it, it's set to zero. If you created it, you set it to 32,768. Right? Higher is better. Higher is better. Always remember that. And that's what's listed right here on our page. Higher is better.
The total range is zero to 65,535. But now the real way to learn this is to go to our BGP router that's out on the internet. Because what has to happen here is that for every single network you learn, you have to go through this process.
So for example, and now this is going to help you understand this a lot more because there's more here. All of these are for 1.0.0.0 size 24. You see where the next one starts? Down here. 1.0.4.0. So everything between the next one, the next network ID, and that, that's all belonging to that one network. All of it.
Now remember I said only one of them can be the best path. And it's the one with the greater than sign. Where is the greater than sign? It's right here. This is the one installed in the routing table. That is the best one. The question is why? That's what we're trying to learn. That's what we're trying to understand. That's what we need to be able to do for the certification exam. Why was this one chosen? Why does it have the greater than sign?
If I type in right now, show IP route, you'll see that it's via 4.68.4.46. 4.68.4.46. Why is that one in the routing table?
Okay. Well, let's look at weight first. Weight, as we already described defaults to 0 if you learned it. So I learned about 1.0.0.0 size 24 from this one, this one, this one, this one, this one, this one, this one. Now you get the picture. So therefore, since I learned it, weight is 0 by default 0.0.0.0.0.0.0. 0.0.0.0.0.0.0.0. That means we have a tie, doesn't it? We have a tie.
We have a tie. So as long as two, as long as two or more have the lowest possible value, then you have a tie. So anytime you have a tie, what does that mean? It means you got to move on to the next one. So tied. We now have to move on to the next one.
Step number two now. But before we get there, let's just go back and understand that if at any point in time, if we manually change this value, we manually change this value, then we could manipulate the decision making process. We'll talk about that later today.
But just be mindful of that. You might be saying, well, this is silly, Raymond. They're all going to be 0 if I learn it. Yeah, but you can change it, right? You can manipulate that to change the decision making process. Because remember, from that list, weight is first. So if you want your router, let's say, to use this one here instead, then what would you do? Raise the weight of all, no, higher is better, right? Higher is better. Raise the weight of that to, in this case, 1.
Even though you can go up to 65,000, 35,000, just change that to 1. And guess what? It's now the best. And the greater than sign would move right here. And this is the one that would be installed in the routing table. Why? Higher is better for weight.
But right now, they're all the same. Since they're all the same, that means we have a tie. When you have a tie, you move on to the next one in the list. All right, so now local preference. This one here is an industry standard attribute, meaning it's going to work on Cisco devices, non-Cisco devices, everything.
And in this particular case, it is prefer the path with the highest local preference. So local preference defaults to a value of 100. It defaults to a value of 100. And therefore, anything higher than 100 is better. Anything lower than 100 is worse. Higher is better.
So where do we find that in our table? We're going to find that in our table right over here. So what I want you to pay attention to, especially for the exam, is if it's blank, blank means 100, right? I've got to prove that to you just to make sure you recognize that.
Let's type in show IPBGP. Oh, got to get out of the way here. Show IPBGP 1.0.0.0 slash 24. All right, you'll see it says right there, local pref 100. We go to the next one, local pref 100. Next one, local pref 100. So you can see blank equals 100 in this table.
Blank equals 100. So in this case, every one of them is tied again. But keep in mind, right, that if I wanted to have another one of these chosen, could we manipulate local preference? Sure, of course we could. If I gave one of these a value higher than everyone else, give it a highest value, let's say we change it to 105.
Well, then now it would be the preferred one because it's the only one at 105. Everybody else is at 100. And we win. And so therefore, let's say we it was this one we changed to 105. It is now going to be the one that's installed in the routing table.
But remember, local preference is only going to be used if weight is tied. If weight is not tied, then the weight is the winner. So if there's a tie in weight, local preferences then check. But if there's no tie in weight, then weight is the winner. Always remember that it's so important, especially for the exam to understand this breakdown.
So even if you had values here, let's get a little creative here. Let's make a mess.
OK, so let's say weight here was 50, weight here was 90, weight here was 100, or 1,000. Put in 1,000 for fun. All right. And but let's say local preference over here was 1,005. Let's say local preference here was 92 and 56 and 47. Right. None of these are tied.
None of these matter because someone over here wins. If you win in weight, then that doesn't matter. But if everybody over here was normal or tied, even if two were tied, let's just make two of them tied.
So if two of them are tied at 50 and 50, what you now have to realize is all the rest are now out of the game. You're now all out of the game. Since you're all out of the game, these two are the only two that are left. So now we're only comparing these two now.
And look, this one is 100. This one is 92. So who's the winner? 100 would be the winner here. Why? Because 100 is greater than 92. Just trying to get you in the right mindset of how you break things down in case any of these show up on the exam.
My pen just died. It had like one scribble left in it today. Going to have to charge it. So now let's say local preference is tied. So if local preference is tied, what does that mean? It means now you have to look at this really interesting attribute called locally originated.
Prefer the path that was locally originated. All this means is this. Did you inject it into BGP or did you learn it? Did you inject it into BGP or did you learn it?
So one of the ways you can check this out is based on something we saw on our own routers today, the ones that we were playing around with. And when we were at ISPA, if you recall from ISPA, when we use the network command and I own that route, we got a next top of 0, 0, 0, 0.
So immediately if you ever see next top 0, 0, 0, 0, you know 100% that it was locally originated. But that is not 100% accurate all the time. And the reason why is because you go to somebody like R2. We use the network command here, but we don't own the network. Somebody else owns the network.
But this was also locally originated. But for the sake of this certification exam, the easiest way to see if it's locally originated is just look for 0, 0, 0, 0, because you're not going to have the ability to deep dive into all the options on that platform, on that device, on the exam to verify if it's actually truly locally originated or not.
So here's my exam tip for you. If you see 0, 0, 0, 0 in the next hop, it's locally originated. If you don't see it, assume it's not locally originated because there's like a 99.0% chance that it was not locally originated. So play the odds in that particular case and you'll win on this certification exam.
So if you see 0, 0, 0, then that means locally originated. If you don't, then that means it's not. So that's the best way to approach that for the exam.
All right. So in this case, none of them are locally originated. They all were learned in this particular scenario. So that means we have a tie. None were locally originated. They were all learned. So therefore, it's a tie. Now we got to move down to the next one.
The next one says prefer the shortest AS path. So remember, the AS path is the hop by hop by hop by hop by hop in order to get there. So take it from the perspective of the actual router in this case. This particular router, it has learned about this network from this next hop.
So this next hop address, this router that has this IP address is in this autonomous system.
Yes. Therefore, this next hop IP address is in this autonomous system.
And this one is in this autonomous system. Now, remember what I said earlier, this network lives in this autonomous system. So the router I'm on is in an autonomous system.
And all of its neighbors belong to the autonomous system that's listed next here. And then this network is in this autonomous system. So this is our AS path. For me to this autonomous system, it's ultimately to the destination. For me to this autonomous system to this one, the ultimate destination.
Look down here. Now there's a little bit more. Me to this autonomous system, then this autonomous system, then this one. Me to this one, then this one, then this one. Or going down to the bottom, we got five me to this one. then to this one. Then to this one. Then to this one. Then to this one.
Based on the shortest path. Shortest path. So out of all of these now, out of all of these, the shortest we have is how long, folks? The shortest path is how long? How many ASs?
Okay, so I see 2. 2, 2, 2, 2, 2, 2, 2. I see 3. 2, 2, 2, 2, 2, 2, 2, 2. 4, 3, 5. So what's the shortest? What's the shortest? What number? It is, it is, chat in.
That's right, 2. That's it, okay? So but is there a tie? Okay, so we've got a tie, a tie, a tie, a tie, a tie, a tie, right? Okay, so with that in mind now, all the paths that have two AS numbers in it are still in the competition.
If you have three, you're out. If you have four, you're out. If you have five, you're out. So now we are only caring about these ones here, plus these ones here. And that's it. The rest of them, you don't qualify anymore. You are not good enough. Shortest AS path.
All right. So because we have a tie, then we got to move on. But if you were on the exam, and all of a sudden you saw that there was only one with two, or one with three, and all the other ones were higher than those numbers, then that's your winner. That is your winner, right? And let's not forget here.
We're only this far because weight is tied, local preference is tied. It was not locally, none of them were locally originated, so all of them are tied with being learned. And now we're down to the AS path. That's the order. You got to go through the order that way.
And so now we're looking at the AS path, and we've got a bunch that are tied, and some that are not anymore, so away you go, you're gone. And whatever's remaining, we'll keep working with.
The next one is prefer the path with the lowest origin code, or origin type, I should say. So what is the origin type? The origin type is based on whether it was IGP, EGP, or incomplete. That's right. This is one of the hardest ones to wrap your heads around.
Okay, these are your origin codes, that's it. And they don't mean what you think they mean. That's right, they don't mean what you think they mean.
So I, where am I looking for the I over here? These are where the origin codes show up. Notice that they're all I's. Every single one of them is an I. So obviously we already know we're tied.
Okay, what are the other options that you can have? You can have an E, and you can have a question mark. So E will never show up. You're not going to see it nowadays. Why? Because E actually stands for EGP, which is the predecessor to BGP.
The origin of that network is EGP, the predecessor to BGP, and nobody's using it anymore. So you're not going to ever see that code. So in reality, you're going to see this code, or you're going to see this code.
I is better than E, which is better than question mark. Let me repeat that. I is better than E, which is better than question mark. So if we go back to this page here, notice how it says lowest origin type, lowest.
Well, lowest origin type, think of it this way. This is the lowest, then this, then this. So I is the lowest. Question mark is the highest. That's the way to think about it.
So when does I show up? I is going to show up when you use the network command to put the route into the BGP. I'm not joking about that. That's right. I told you it's tough to wrap your head around this one.
So let's just take a moment here and do a little side discussion by going back to our routers here. So you notice how we have an I here. Why? Because I use the network command. You notice how we have an I here. Why? Because I use a network command.
Even if you use something like the aggregate address command, you're going to see an I there. When are you going to see the question mark? When you use the redistribute command. Redistribute. So let's see, do I have a connected route here I can redistribute or a static route I can redistribute?
So for example, let's this is a connected route. Let's redistribute connected and watch what happens. Let's type in redistribute connected. Yeah, that's good enough. Just for fun. Do you show IP BGP? There you go. There's your question marks. That's it. I'm serious, folks. Okay, so on the exam, right? If you see question mark, it simply means that somebody used the redistribute command at some point.
If you see the I, it means somebody did like network command or the aggregate address command or something like that. That's all. When it's all said and done, right? If you boil it down to those basic things, you're going to be able to answer the questions on the exam relatively easily.
So the key here is if you see eyes and question marks for the exact same network. So for example, we go back to here. If you saw some eyes here and you saw some question marks, the eyes are better than the question marks, meaning eliminate the question marks and whatever eyes are leftovers, you'll continue using.
That's it.
If there's only one eye and the rest are question marks, there is your winner. You're done. You found the answer you were looking for.
Yon says, does that mean that they're locally sourced since they're 0000? Those ones? Yes. As I was referring to a while ago, we were having. Yes. So we were talking about the originated option. That's what I was referring to when we were having to originate option. This one right here.
And so you see the best way to know if it's a locally originated is 0000. If the next half is 0000, that's not. But there are other times that it could be locally originated, but not show 0000. But for the sake of this exam and for us to say, focus on what we need to know, that's how you're going to do it on the exam.
If you see 000, that's locally originated. If not, then it's not locally originated. It's that simple.
And you remember that for the exam, you'll have no problem getting through this, getting through step three, I should say.
Redistributed always 000. Well, what would just happen in our case?
OK, in this case, the answer is yes, it was 0000. Why? Because we own those networks. OK, we own those networks. They are directly connected to us.
That's why they're showing up as 0000. But if it was not something that was directly connected to us, if it was something that we learned, then, no, it would not show up as 0000.
All right. Let me rephrase that. If you redistributed it and it was something you learned. So if I learned it and then I redistributed it, then it would not show up as 0000.
So, no, it's not always going to be 0000. Yeah. Right. It's just like, you know, if you have a network that's directly connected to us, it's going to show up as 0000.
So where are we? Origin type. That's right. And we have a network that's directly connected to us.
So, no, it's not always going to be 0000. Yeah. Right. It's just like over here on R2. You see how we use the network command here, but it's not 0000. Why? Because I learned it via OSPF.
So where are we? Origin type. That's right. And we have successfully identified I versus question mark. So know that for the exam. I is better than question mark.
I is better than question mark. All right. Next one is six. Multi-exit discriminator. So as we are picking our way down through here.
We are now looking for MED. This is the MED. I know it doesn't say MED, but that is the MED. Okay. That is the MED. The multi-exit discriminator.
Now, the MED has a couple of different purposes, and one of the purposes is to take whatever, let's say you're redistributing. Let's say you're redistributing from EIGRP into BGP or you're redistributing from OSPF into BGP as an example.
When you redistribute in that particular case, EIGRP would have a metric. Let's say your metric was 32,852 because that was the metric to get to the destination. Let's say for OSPF, your cost was 37 to get to the destination.
Well, then when you redistribute into BGP from OSPF or EIGRP, that metric value is retained for this area right here. It's imported as well. Even though that doesn't mean the same thing for BGP, it actually becomes the MED. It becomes the metric in that particular case.
But that's not only what it's for because we can manipulate this value any way we want, and we could ultimately manipulate the decision-making process as well. But it can be used as a placeholder for the metric of other dynamic routing protocol.
This is really good for MPLS because if you've ever worked with MPLS, if you have OSPF and you redistribute into BGP, and then your service provider takes that BGP route, shares it all the way over to your branch office from headquarters, and then it sends it into your branch office, and then you redistribute it back into OSPF, let's say.
If you're using OSPF in headquarters and you're using OSPF in the branch office, now the metric that you have in the headquarters is going to be preserved as it goes through the BGP environment, and then your branch office can pick up where that metric left off in headquarters.
That's pretty cool when you think about it that way.
So that's just one example of how that can be used.
But there are a multitude of different ways that we can use it, and I'll show you one here a little later on when we show you how to manipulate the MED.
So MED, lower is better.
Lower is better.
So when we start looking at this list, you'll see this one has 10, so oh, timed out.
Let's log back in.
You'll see here that this one is 10, and we had an AS.
Oh, what happened?
Oh, I hit a button.
Okay, this one is 10, but it had an AS path of 2, correct?
So we were still in the running.
We were still in the running.
But now because lower is better when it comes to MED, we are no longer valid because this one is 0, this one's 0, this one's 0, this one's 0, this one's 0, 0, 0, 0.
So you see there's a whole bunch of other ones that are lower than me, so bye-bye.
You're no longer valid because lower is better.
So essentially, who do we have left?
I think we got this one left.
We got this one left, this one left, this one left.
We got this one, this one, this one, this one, okay, no, you're gone, you're gone.
We got this one left, we've got this one left.
We got this one left, this one left, this one left, this one left, you're gone, you're gone, you're gone, you're gone, so that's it.
There we go.
Oh, and I just realized, I think, I kept saying we had one with five,
but I was looking at it incorrectly.
The one with five is actually for 1040-24.
I'm seeing that now.
So we didn't actually have one with five for 1000-24.
We didn't.
So that's fine.
It didn't matter.
It wasn't in the running anyways.
But, yeah, that would be for 1040 because it's lined up with that one.
All right.
I just saw it incorrectly.
Crooked eyeballs today.
All right.
So, as you can see, we're picking the list off, right?
It's a lot of work.
Thank goodness BGP can do that relatively fast.
Now, more than likely, folks, on the exam, that's it.
You're not going to have to go any further, okay?
You would have actually found one by now on the exam that was the ultimate winner, either based on weight, local preference, probably not locally originated, probably not.
Let's be clear about that.
So more than likely weight or local preference or AS path would have been the winner or even med.
Probably not originated, probably not origin type.
If it is origin type, though, it means that one of the paths would have an I and the rest would all have question marks.
So that would be it.
All right.
So keep that in mind.
Make sure you know that list, the top six minimum.
You have to.
All right.
Now, seven, it says prefer EBGP over IBGP.
Now, I can't verify all of these because I don't have the rights to just start digging into this router and go deep into it.
But I can verify number seven.
How can I verify number seven?
Seven is actually pretty easy because E versus I would show up on the left-hand side.
That's right.
Show up on the left-hand side right here, right in this space.
You see this space right here?
Right.
In that space, you could have an I, not this I, this I, not this I, this I.
You could have an I in there.
If you have an I in there, it means IBGP.
It means you learned it from an IBGP neighbor.
Whereas if you don't see an I, it means you learned it from an EBGP neighbor.
If we go to our Cisco pod here we have, let's see if I can just demonstrate that for you real quickly.
Let's go to R1, and let's just inject a network on R1.
Let's just find any one we can find in a routing table on R1.
This may or may not work, but let's just take this for fun, and let's type in network,
and it might not work only because of administrative distance yelling at me when it's all said and done,
but we'll give it a try.
It's 255.255.255.252.
Do show IBGP.
All right.
Is it in there?
Okay.
There it is.
Let's go to R2 now and see if R2 shows it.
Yep.
There it is.
This is all I wanted to show you.
I.
There you go.
IBGP.
IBGP neighbor.
That's it.
All right.
So that's this I right here.
Now, notice there's an R.
Okay.
What is the R?
You don't have to worry about this for this exam, but I'll tell you right now, you never know.
It could show up.
Rib failure.
So the rib failure is not a Mortal Kombat move, sorry, but I guess it could be.
Rib failure refers to the fact that we cannot install this in the routing table because there is this route already in the routing table with a better administrative distance.
So if I say show IBGP rib failure, you'll see it says that these are not installed in the routing table because it has too high of an administrative distance.
So IBGP routes have an administrative distance of 200, and all of these are learned either because they're directly connected to us or we learn them via OSPF or EIGRP or maybe even exterior border gateway protocol.
So if you learn about something via EBGP and IBGP, then EBGP is going to be the winner.
If you learn about something via EBGP and OSPF, EBGP is the winner.
But if you learn about something via OSPF and IBGP, then OSPF is the winner because IBGP has a higher administrative distance of 200.
So if there's an I, it means IBGP.
If there's nothing there, it means EBGP.
So we come back and we look at this.
We'll see that there are no I's, no I's at all over here on the left-hand side, left-hand side, left-hand, nothing, nothing.
So we have a tie in regards to IBGP.
Sorry, tie in regards to EBGP, EBGP in that case.
But if all of them are I's except for one of them, then that would be the winner, the one without.
So seven's not the deciding factor.
We go to eight.
Prefer the path of the lowest IGB metric to the EBGP next time.
So I can't actually verify that on these routers.
I do not have permissions to do that on these routers.
But essentially, it's saying, all right, so now that we've gotten this far, what is the IGB path to get there?
What is the IGB metric, the IGB metric to get there, the IGB metric to get there, the IGB metric to get there, there, there, there, there, there, there, there, there, there, and so on and so forth.
I can't verify that on these routers.
I do not have permissions to do that.
But let's say that in this particular case, two or more are tied.
So then the next one, if two or more are tied, more than likely on the exam, you never have to do that one anyways, okay?
Keep that in mind.
Prefer the older path, okay, the older path.
Which one has been, which one have we known longer than the other?
That's right.
Which one have we known longer than the other?
Now, for the certification exam, not something that would be easy for you to do.
So I wouldn't worry too much about that one.
But if you ever had to verify that, the easiest thing to do is look at your neighborships, okay?
Now, that's not 100% perfect.
But typically on an exam, just looking at how long you've been neighbors with somebody will ultimately determine if that is the reason why you won.
So, for example, six weeks, three days.
Now, we know.
We know already that this one is the winner.
This one is the winner.
We know that already because there's a greater than sign there.
We know that.
So if we look now at how long they've been a neighbor with me, six weeks, three days.
Anybody else here longer than that?
Yeah, we do.
Okay.
So, so, it is very possible, very possible in this particular situation.
Since somebody is older than us, we may have won in this case purely based on this one here.
We may have won using eight in that example.
But I can't verify that right now because I don't have permissions on that router because this one is actually older than this one.
And we go down.
This one's even older.
Ten weeks, three days, okay?
And so on and so forth.
But I guess now the question is, is did we actually learn about that network from this one?
91.
So that's another thing you would have to check.
Is 91 actually on this list?
It is.
It's right there.
Okay, so we did learn about that.
So why did this one beat this one?
Well, if we look at this table, it would be the one probably because there's a lower IGP metric to the BGP Next Hub.
However, think about it this way, too.
What if, what if the owner of this network sent out an update recently?
And as that update rippled through the Internet, it arrived at this router first from this neighbor 30 seconds before it arrived from any other neighbor.
If that's the case, then that would imply that my router has preferred the older path in this case because it learned about it from that router 30 seconds before anybody else.
So it's older by 30 seconds.
These are some interesting attributes, isn't it?
Again, very tough to verify that on routers.
You don't have the permissions to verify stuff like those numbers on, those statistics on, as well as on a certification exam.
So the odds of getting this far in an exam are, like, next to none, folks.
But you can see what's happening here, right?
The router's getting down to these, like, nitty-gritty things that it's like, okay, well, since I've known you longer, I guess I'm going to use you.
And then what?
We got 10.
If that's tied.
If two of them are tied in that case, and that can happen, then you got to go with the path with the peering router that has a lower router ID.
So whoever has a lower router ID now is ultimately going to be the winner.
So, again, I can't confirm 100% without a doubt in this particular scenario that the preferred the older path is the winner.
But when you think about it, this would have a lower router ID because if the router is using that as its router ID, then it has the lower router ID.
So let's say everything else was still tied, then it's the lower router ID that's the winner here in this example.
And I can verify that by just typing in show IP BGP neighbor.
And as we go down through the neighbors, let's change this to this.
We're going to do this and say instead pipe to include BGP neighbor is.
So pipe to include BGP neighbor is.
And pipe to include remote router ID.
And let's see if that gives me what I want.
It does.
Perfect.
So you'll see here, for example, that I have this BGP neighbor using this address and there is its router ID.
So the address is not exactly the same as the router ID.
But from a router ID standpoint, there's 4, 12, 37, 216.
It's still the lowest one when it's all said and done.
But, again, very, very tough things for you to actually be able to verify when you are provided limited information on the exam.
But you'll see router ID.
And if the router ID is tied, and that would happen if, for example, you had peerings between two routers like this.
So the router IDs would be the same.
So in that case, if the router IDs are tied because you have dual connections to the router,
then you've got to prefer the lowest IP address of the neighboring device.
It's incredible, right?
Absolutely incredible.
Yeah, usually the higher router ID is the winner.
But, yeah, in this case it's lower router ID.
Incredible, isn't it?
Incredible.
Difference.
Just little minor differences that you can be tested on an exam, little things like that.
So there you go, folks.
That is the BGP best path selection process.
So right now I do not have the perfect, perfect opportunity to tell you exactly why it was chosen
because I don't have permissions on this BGP router because it doesn't belong to me.
But, and I can't verify how long it's known that very specific route for,
that we're talking about 1.0.0.0 size 24.
So we do have neighbors.
If, for example, this neighbor has been known the longest out of anybody else,
then I safely conclude, oh, that's the reason why we won.
But in this case, I can't today.
And that's okay.
That's okay.
I want to be very clear, though, very clear.
There will not be anything that gets down to where you can't truly verify it when it's all said and done.
But that's the gist of it.
Your ability to walk through it is what I'm trying to teach you here, especially the first six.
Being able to walk through the first six and figure things out is the key to your success in that case.
Ooh, great question coming in.
I really have to think about that.
So the question is, all right, so we're down to the last two steps.
What if we're using a loopback address as the neighbor address, which happens to be the router ID we choose?
Oh, okay, that's simple.
That's simple.
That has no effect on us.
Absolutely not.
Because if you think about the router ID, if you're using a loopback address as the router ID in this scenario here, okay,
so you're using a loopback, loopbacks, right?
So when it comes to the router ID, prefer the path with the peering router that has the lower router ID.
So in this particular case, right, we have a path through here.
We have a path through here.
The router ID is tied.
So then we go down to 11.
Prefer the path with the peer who has the lower neighbor address.
Okay, we're talking about the physical address of the interface.
Which of these two physical interfaces is lower IP address?
That's the winner.
So in the last two steps, what if we're using a loopback address as neighbor, which happens to be the router ID it chooses?
That's fine, because this is going to be based on this and the router ID,
and this is going to be based on the actual interface IP addresses.
This is going to be actually based on interface IP addresses.
Does that answer your question?
All right.
So exam, make sure you know these.
Would it be the same if there are other routers in between?
Okay, so if there are other routers in between, remember, we're forming TCP peerings in that case.
So that's still the same result.
So if I had a router here and I had a router here and I had a router here and I had a router here, all right,
and basically what you're saying is here's a loopback, here's a loopback, and I have two interfaces that go out.
And let's say there's one link here and let's say there's two interfaces there.
It doesn't matter.
The fact of the matter is I'm trying to go from here and form a neighborship to what address?
This address over here.
From here to this address over here.
All right, so if we're peering with the loopbacks, okay, then we'd have the same router ID
and then prefer the path to peer who has the lower neighbor address.
In this scenario here, neighbor address, yeah, that's now a challenge, isn't it?
That's a problem because I'm not really going to know this neighbor address because it's way over there.
We're peering based on this information.
Oh, and this would be your next hop.
This would be your next hop.
Yeah, I never actually thought of that scenario.
I've never thought of that.
I'd actually have to sit down and map that up to figure out exactly what would happen.
Never actually had to do that that way.
Yeah, that would be slightly different.
I don't know how 11 would apply in that exact scenario.
It's a good question, though, and I don't have an answer for that one right now.
It's just based on the complicated nature of that architecture.
But that's what you were trying to get at, that type of scenario, right?
So I directly connected.
I would know the neighbor's in, but if I'm not, then that would be tough.
Yeah, that would be interesting.
Yeah, well, here's the deal, okay?
I would encourage you never to get this far in the process, first and foremost.
I would never, never.
Absolutely not.
So that's the thing.
In that type of scenario, you would never want to get this far anyways.
You would definitely want to control it and get to the point where you can have the decision
made earlier on when it's all said and done.
But wait a second.
Hang on, hang on, hang on.
Wait, now that I think about it, now that I think about it.
Okay, no, no.
No, it wouldn't matter.
Wait a second.
Go back to that.
Because, right, even if this happened, let's think about it this way instead.
If I'm peering with the loopback, how many peerings do we have, no matter what?
Okay, if we're peering with the loopback, I have a peering from here to here.
I only have one peering.
I only have one peering, even though I have multiple paths we can use.
So in the end, we win right here.
We don't even go beyond 10.
We won't even go beyond 10.
Because there's only one peering.
That's it.
There's just one peering.
Even though there's multiple paths, there's just one peering.
This would be no different than, like, inside of our organization, peering with our loopback
addresses and we have a bunch of different ways to go.
There's only one peering.
So yeah, no.
Prefer the path with the lowest router ID.
It doesn't matter.
Because there is only one path anyways.
We wouldn't even get this far.
Yeah.
You see that now?
Because we're peering with the loopbacks, there's only one neighborship.
I'm learning from you.
It doesn't matter the number of paths in this case.
So prefer the older path.
Well, there's only one path, me to you.
So it's based on neighborship, don't forget.
Based on neighborship.
So if we go back to that other example, the other example, so when I was saying router,
router, okay, router, router, two links, I'd be peering from here to here, here to here.
We're not using loopback in that scenario.
That means we have two peerings with each other.
Two peerings.
So in this case, I'm learning from you twice.
So prefer the path with the lower router ID.
Well, they're using the same router ID.
So now we break that tie with this.
But if we were using the loopbacks instead, if we were using the loopbacks, okay, take that out.
If we're using the loopbacks and we're peering from loopback to loopback, we'll never get beyond 10 anyways.
Right?
We're not going to get beyond 10.
We're done.
Because we only have one peering.
We don't have two peerings or more peerings.
Yes.
You see the difference there?
Yeah.
Good stuff.
All right.
Perfect.
All right.
So for the exam, that's a lot.
I know.
It's one of those things.
Okay.
If A is this and B is that, then C is this.
But wait, if D comes into play, then we're talking about E, F, and G.
So the key here for you to prepare for the exam is to make sure what?
You know what you're looking at when you look at this output.
Oops.
I'm trying to log into the router on the Internet and I'm, like, typing in all the wrong stuff here.
It's going to yell at me.
I accidentally tried to type in with a show IPBGP username.
Oops.
Let's type in the right one.
Our views.
There we go.
Show IPBGP now.
So when we look at this output here, if you were presented with something like this on the exam, be able to know what you're looking at.
So weight, local preference, originated, and then we've got AS path, and then we've got origin code, and then we've got met.
So those are the ones.
Where are they?
No, higher, lower, this and that.
You've got to memorize that chart.
You've got to memorize the first six.
You've got to know how to read this for the first six.
And then, more importantly, if you're ever asked, hey, how do you make this one?
How do you make this one the preferred path?
Well, based on everything else you see, I mean, I could increase weight, and that would accomplish the objective.
I could also just simply increase local preference, and that would accomplish the objective in this particular scenario.
How do you make this one the preferred path?
Again, I could change weight.
I could change local preference, and that would make that the preferred path.
So those are all things to keep in mind on the certification exam.
But pay attention to the details.
Pay attention to everything that's going on around that particular scenario to ultimately determine what is going on.
So if you don't memorize this list, then, I mean, there are a few BGP questions you probably won't get right on the certification exam.