350-501 SPCOR Cisco CCNP Service Provider – Weight & Local Preference part 1

  1. Path Manipulation – Weight Attribute – PART 1

In this video we will learn how to use your BGP weight attribute. So we are going to continue with our previous videos like if you remember in our previous videos we’ll learn the weight and local preference attributes which are majorly used to decide which path it should prefer to exit the autonomous system number. Now the only difference between the weight and the local preference is weight is local go to the router whereas local preference is going to advise all the routers inside the Ae. So now we’ll verify weight attribute in this lab here. So we’re going to implement one lab where we’ll see how the weight attributes works at the same time we’ll see how to configure weight attribute. Now the first step I’m going to do here, I’m going to configure router A, router one, you can see it’s in as 500 and then I’m going to use router two and router three in as 600 and then router seven is going to be in as 607 hundred here.

Okay, so I’m going to do the basic IPGP and EPGP configurations as per my diagram using directly connect interfaces and then wherever required I’ll change the next stop behavior, I’ll change the next top self. So this is something what I will do. This is a basic pre requirement for our lab before we verify. So I got my topology in my GNS, all the four routers as per our default topology already they are started and I already have the console screens ready and if I go to my router one I don’t have a single protocol running so I just have the basic IProcess as per my diagram. So I’m going to do everything from the scratch router BGP 500 and the router one is going to configure the neighbor ship with router two with the neighbor command one, one two and the remote as will be 600 and then this router four is four four one and remote as will be 700.

So router one is forming the neighborship with only two routers, router two and router four in different areas and then giving no auto summary, no synchronization. Advertising the LAN interface, ten dot network, which is my LAN interface, and advertising the van interfaces. Also the same thing I’m going to do on the router two as well. Going to do some basic configuration, router BGP 600, router two, no auto summary, no synchronization. Router two is forming the neighborship with router one in different areas one one remote as will be 500 and then router two also forming the neighborship with router three and router three addresses two two remote as is 600 same as and then as in my land interfaces 20 dot network, two dot network and one dot network.

So one dot network is my two N, one is my LAN and one interfaces and 20 dot network is my LAN interfaces so one interfaces and LAN interface. So done, you can see the neighbor ship comes up between router one and router two. Once you see, once you configure everything properly your neighborship will come up. Let me quickly finish up the things on router three as well. Router three forming neighborship with raptor two which is two two one and the remote S will be 600 and then enable three three two which is my route of four in 700 as number so using no auto summary, no synchronization and then advertising the LAN interface and advertising our van interfaces done. So let me configure the same thing on the router four, router BGP 700, no auto summary, no synchronization neighbor router four is forming neighborhood with four two which is my router one with as 500 and then neighbor three three one remote as is 600, that is my router three.

So router four is forming the neighborhood with auto one and router three in two different areas and then advertising my own interfaces 40 dot network in the LAN and four dot network and three dot network in the van interfaces done. So the first step, I configured all my IBGP and EBGP peerings and also advertise all my networks, whatever you can see in my diagram, and I’m not using any loop backs here. And if I verify the first thing show IP BGP summary on the router one. Router one should form neighborship with router two and router four. And you can see the neighborship is up. And I’m just seeing some multiple routes here. And if I verify show IP BGP, I can see all the routes coming into my BGP table.

All the routes will be coming with the next stop information and then metric by default zero and as path information as well. So verify this BGP table one more time but let us quickly verify on all the routers whether all the routers are forming the neighborship or not and I’m getting the routes on one. So now router one is forming the neighborship with two and three, two and four. And router three is also forming the neighborship at two and four, which means your neighborship is up. And the next thing we’ll quickly do is we’ll try to change the next stop behavior. The next stop, if you remember, we already did that by default when you receive any route from EBGP. Now the stand or network is getting advertised from router two will receive from router one with the next operator stand or network.

And the next stop address will be one one, which is router one. And when router two advertises the same thing to router three, it is going to advertise the Tendon network without changing the next stop. And the next stop will be still the same. Because when internal PGP sends an update to another internal PGP neighbor, it is not going to change the next stop. It will be same. So what I’m going to do is I’m going to router two. Let us verify this first for verification, you can go to router Three. First I’ll try to verify on the router two show IP BGP you can specifically write any one network, ten dot network. The next operators is one one, that is router One. And if I go and check the same thing on the router show IP show IP BGP and the same tendon network, I’m going to learn and it’s going to be learned from both the sides. I’m receiving from three two.

Let me just check this table. Show Ipbcp I can see ten door network. The next top address is 30 two, which is router Four. And also I’m learning from the alternate route. This one one you can see the next stop will not change because of the default next stop behavior. So I’m going to change that. I’ll go to router two and I’ll simply go and configure neighbor internal libraries. Two dot, two dot, two dot, two next Option so these things we already did in our previous videos, why we use next stops of commands. Now, the same case applies here also like here also from router three, router four rises route, but router three, when it sends to router two, it will not change the next stop. So to change it, we can use next observe.

Let me quickly configure the same and router three as well, pointing to router two neighbor two one next observe. So now if I verify shuippan router two now shaw IP BCP the 40 dot network, the next top address will be my next router address. So this is recommended to change anyway here in this lab, it will not affect because I have already advertised my van de phases. So it’s not going to affect, but still good to change the next stop address, it’s always recommended to have a next route routers. So once we do this, you can verify in the routing table all routes will be reachable. If you want, you can verify on the router to IP route BGP. All the routes are learned from BGP. Here on the router two, you can see the 40 dot network.

The next stop router is the next router address. Instead of three three two, it is two two two because of next stop self command. So this is something a basic configuration which is required for most of the attributes lab in our next labs. Also, I’ll be using the same topology with the same configurations. I can say this default configs are standardized for all my remaining labs. So this is something what I’m not going to do in my next labs. But after this only we’ll try to implement and verify the attributes. Now, once we did our basic IBGP and EBGP peerings, the next step will be and also we have changed a next stop behavior as well, using a next stop self commands wherever required. Now we’ll try to implement and verify the weight attribute. Now, before we implement and verify the weight attribute we need to take any one network.

Let’s say I’ll try to follow my workbook here the same similar ones. So now the task here is configure the router one to prefer exit path via router four to reach all the networks okay? So let us see to reach all the networks which path it is using 20 dot network 30 dot network let us see so you can consider any one of the network like in my scenario I’m going to consider this 20 dot network. Now this 20 dot network is advised via this site. And by default this 20 dot network where it is advertising it is having only one as hop which is 600 when the same 20 dot network is getting rid. Of from the other end. If it is coming from this site now, the as Path information will be the same 20 dot network or three dot network. It’s coming from as 600. I can say.

It’s coming from as. 600 and then reaching the as 700 and then advertise through IGP origin code. It will be I because we have advertised this route in our BGP advertisements. Let’s verify on the route of one. I’ll try to verify 20. Dot network. Or you can verify with this network shows Shuip BGP. I’ll prefer to go with Shyp BGP. Like here you can see 20 dot network. This output here this 20 dot network is learned from two neighbors that is one is four four one on the router one, which is nothing but router four. And also it is learned from one one two, which is our router two. Now when it is coming from router four it is having the as hop information as 700 600 exact as per hour diagram now when it is learning from one two the ashop will be just 600 the same thing what I wrote here on the screen.

Now by default it is going to use now you can see both the roots are displayed as asterisks means these are valid routes and which out of these two routes any one will be the best now the best route will have this greater than symbol, this one the greater than symbol. So when you see the greater than symbol here, it means out of these two routes, this route, which one? The one with is a pest root. The default best route we can say. Now, this route is considered as a default best root. And the reason is this route is having just one as hops, whereas this route is having two as hops. And by default, BGP will decide the best route based on the autonomous system hops. Now, whichever the root is having the least number of autonomous systems, that route will be considered as the best route.

So if you want to verify, you can even verify with Shuip route command. Show IP route 20 dot network. Or simply you can just say show IP route PCP. You can see, this 20 dot network is installing the route from one one two, which is from router two. And it’s not going to install the second route because routing table will only have the best routes. Now in our scenario, only one best route which is via router two and if you only can even try trace so you can see it’s going via one one two. So these are just a verifications which we can from this we can confirm that router one is receiving the 20 dot net network from multiple sites and it is going to prefer wire router two rather than preferring wire router four because router two is having less autonomous system hops.

  1. Path Manipulation – Weight Attribute – PART 2

Now the next thing we’ll see is we’ll try to create one condition. So the condition here is the task. We can say the task here is we need to configure router one such a way that it should prefer via router four to reach any routes. So here we are not specifically going with any specific routes. So our best part path should be wire router four rather than wire router two. And it should not be from wire router two. We can say, okay, that is our requirement, that is our task. The similar task I added in my workbook here, configure the router one to exit path, wire router four to reach all the networks. And by default, router one is going to prefer wire router two because it is having the least number of autonomous system hops. These are all the verifications which I did just now.

To make that possible, what we need to do, we need to just add the weight. So in our scenario here, we are using weight. So my requirement is to ensure that this route should be my best route and I have to change it on the router one. So what I can do is I can simply go to router one and I can simply configure the weight towards router four and I will increase the weight and the default weight, any weight is zero, zero, anything more than zero will be okay. So I’m going to apply some 4000, 40,000, 2200, any number you can use. So in my lab, I’m going to use 40,000. Okay, so there is a point in taking 40,000, so you will come to know, but you can use any number. So it’s just any number more than zero works in our scenario. So let’s try to configure how to configure. It’s very simple.

Again, you just need to go to router one to apply weight. Now the first thing we need to go to router mode. In my router one, I’m going to run as 500. And then you need to decide which neighbor to which neighbor you want to apply the weight. So I want to apply the weight towards router four, because router four weight we need to increase towards out of four. So the outer four address will be four, four one. And then you can simply use cushion mark. You can apply a lot of values here. So I’m going to apply weight and any weight you can apply in between 60 to 65,535. So I’m going to just apply something around 40,000, 4000. Done, that’s it. So now any routes receiving from router four will have higher weight. And that is something what you’ll see in the BGP.

But whenever you make any manipulations to attribute, whenever you do any changes to attribute information, you have to ensure that you always clear the process BGP process. Either you can reset the process by using a command called clear IP BGP star. When you use this command, it is going to clear the complete BGP process. So it will discount the neighbors. Or simply if you want to converge the neighbors without converge the network, the BGP information without discounting the neighbors, you can use Soft command. So it’s up to you, you can try any one of these options. So I recommend to use clear IP BGP Star Soft. Now when you say Soft, it will not disconnect the neighbor. So if I use without Soft, if I simply say Clear Ipbgp without any Soft command, you can see it’s going to reset your neighborship where your neighborship will be going down and coming back again.

So it’s a complete reconverse. So it’s not recommended to use Clear Ipbgp without Soft command. So now if I verify, the neighborship will be up so the routes not hit Exchange, so it will take some time for Exchange. And if I give show ipbgp. So now on the right side you can see the weight column. So all the routes receiving from four one will be automatically applied a weight of 40,000 or whatever you have applied, you can see. And also it applies for 20 dot network. And if you see out of these two, you have a credit on symbol assigned to votes four dot, four dot one because of the weight. So now weight is more preferred than a sparse. So if I verify my routing table routing table BGP you can see everyone is to reach every network it is going via four four one.

And if I try to trace 21 one, you can see instead of going via router two directly, it is going to raptor four, which is four four one, and then going to router three and then finally reaching router two. So using weight we can do some path manipulations and generally it will apply for all the routes we can see here. So this weight is applied for each and every route. Whichever is learned from this neighbor will be automatically applied a weight of 40,000 to that. Okay, so there’s a good thing about the weight now, but the problem is weight is local, local to the router. It’s not going to rose like that. So we’ll see more in detail about the local preference, those values as well. Now this lab will give a basic demonstration of how to use weight.

But again, one thing we need to keep in mind, weight is local to the router. It’s not going to advertise more preferable when you have two exit paths from the same router and then it is a Cisco proprietary attribute and whatever we have implemented, it’s going to apply for all the routes whatever learned from router four. So if you want to apply for more specific routes, then we can even combine this weight by using some route maps where we can manually select some specific routes and we can apply weight only to select routes instead of for all the routes. So that is something what we’ll see in our next video. So this video will give you a very basic understanding of how to configure a weight attribute and how we can use weight attribute and how it can affect the path manipulation here.

img