350-501 SPCOR Cisco CCNP Service Provider – BGP Attributes part 1
In this video we will learn the BGP path selection process. Now, if you remember what we have learned in our previous videos, we have learned lot of BGP and IBGP configurations and then we have seen how to verify and troubleshoot the BGP pairings. Now, the pre requirement before you get into these attributes or before you understand the BGP path selection process is you need to have a very good understanding of IBGP and EBGP peering and configuration and verifying and troubleshooting the things. Now, what exactly we learn is in that BGP path selection process. The first step, we need to understand attributes, we call them as PGP attributes. Now what these attributes exactly they do? Now, just like we have different kind of protocols which we used in our IGP, we have seen the different protocols. Like eagrp. We got OSPF and we got Rip.
Now these protocols, they all are internal gateway protocols, like indigenous gateway protocols within the same autonomous system member. And every protocol has its own path manipulation. Let’s say EHRP is going to consider bandwidth delay, load, MDU and reliable. These are the five values which it uses when it decides the best route. Similar way, OSPF uses only bandwidth with a formula of ten to the power of eight divided by bandwidth. And it’s going to see only the bandwidth when it decides the best route. And when you talk about Rip, it only decides the best route based on the Hopkins. Whichever the route is having the least number of hops, that route will be considered as the best route. Now, that is something leading to IGP.
But in BGP, the best path selection process is not based on the bandwidth, it’s not based on the delay values, it’s not based on the hub counts like we do in IGP, but it’s majorly based on the attributes. So these attributes will play a major role in selecting the best route. The best route will be decided based on the policy steps and that policy whatever the attributes which are considered in the policy in a step by step order. Now, before we decide how exactly BGP is going to calculate the best route, the first step for that is understanding the attributes. That is something what we are going to do it in this video. So let’s get started. Here the first thing, attributes like I just know I said BGP chooses the best route based on the attribute of its path, which means BGP attributes will decide which is going to be the best route.
Unlike IGP, it is not going to use any of the bandwidth delay or the Hopkins values. Instead, it uses something called attributes. Now, these attributes are divided into four categories well known, well known mandatory and well known discretionary, optional trans tube, and optional non transfer. Like we got a lot of attributes in BGP which can affect the best path manipulation. The best path can be decided based on these attributes. But the first thing we’ll see the categories here like the BGP attributes, mainly classified into two categories. The first one is your well known attribute and optional attributes. Now, when you say well known, the name itself says well known means recognized by every PGP peer, which means every router which is running BGP.
It’s going to understand this type of attributes. When we say optional, it may be present. The name itself says it may be present in the BGP update, it may not be present. Again, these two categories are again classified. Further into well known is again classified as well known mandatory attributes and we call it as well known discretionary attributes. Now this is the first category, well known mandatory is the first category of attribute and well known discretionary is the second category of the attribute. And then we got a third category, optional trans tube, and then we got optional non trans tube attributes. And these are the attributes which we’ll be discussing individually. These are all the individual attributes.
But first we’ll try to understand the category and then probably in the next video we’ll see each and every attribute one by one. Like we’ll start with as path next top origin attributes initially, and then we’ll try to understand the local preference attribute, how it works, and then also we’ll see some weight attribute and some other attributes. So let’s get started with well known category. As I said, well known is the first category of the attributes well known mandatory. Now mandatory, the name itself says it must be present in the BGP routing update means whenever a BGP is going to advertise any specific network, it’s not only going to advertise this network, it’s also going to advertise some extra information and that information will be your attribute information.
Like it can be as path information which will see more in detail as path origin information and next stop information, what is the next top address. So that’s what we call as mandatory. Now, when you say mandatory, it has to be present in the BGP routing update, which means when a BGP dies, it’s going to rise the network along with this attribute information. And when we say well known, it is something recognized by every BGP running router. And then we have well known discretionary. So the discretionary means it may be may not be present. So it’s going to be recognized by all the BGP routers because it is also a well known attribute and it is passed on to other BGP routers. But it’s not mandatory to be present in the BGP object.
Just like quite opposite to mandatory, it may be present or may not be present. Like local preference, there is one attribute called local preference. Sometimes this local preference will be advertised to only internal Bgpps, but it is not going to advertise to external BGPP. So we’ll see more in detail about these attributes in our next videos. So I’m just giving you the basic idea of the categories. The next thing we have optional attribute. So optional means the name itself says it may be present in the routing update, may not be present. So now if you configure, it will be present. So when we say optional, it might may not be recognized. So the BGP router may recognize or may not recognize just quite opposite to well known.
And when we say Transte, when we say Transte, you can see it might or might not be recognized by the BGP router, but even though it is not going to be recognized, but still it is going to pass on to the other BGP neighbors. Like, let’s say there is one router, it’s going to pass on the information to another router and it is advertising some network, let’s say tend or network. And it is going on to add some information. Let’s say aggregator attribute. There is an aggregator attribute similar to first summarization it’s used. So this aggregate attribute will be passed on to this router. And when this router uses this network, it’s going to receive that network.
And if this router is not able to understand this attribute information, even though it is still going to pass on to the other router so that’s what a transdou attribute. Whereas in case of non transtu, if this router is advertising Tendon Network. And if the other router is not going to understand that attribute information, it will simply remove that information and it will not pass on to that information. Like mid originator, ID, these attributes, if the BGB process do not recognize the attribute, then it will ignore the update and it will not go into other peaks means it’s not going to address to other people. So that’s the basic difference between these two.
When we say optional, it is a little bit opposite to your well known attribute. It may be, it might be present, it might not be present. But when you say transport, it will be still advertised, even though if it doesn’t understand that attribute information is going to mark it as a partial and then pass on to the next. But whereas in non transit it will not be advertised. So that’s the basic difference between these two things. So this is the summary of the attributes. So BGP attributes, let me quickly summarize before we finish off this video BGP attributes. We got well known attribute recognized by all the vendors. BGP understands this attribute, okay.
Whereas when we have optional, it may be present, may not be present in that we have well known mandatory attribute and well known discretionary attribute. Mandatory, it has to be present in the routing update. When we say discretionary, it may or may not be present. So it depending upon the types of enables, depends upon the types of the configurations. When we say optional, we have two types of attributes, optional trans tube and optional non transfer attributes. When we say trans tube, it’s going to pass on this information to the neighbor along with that information. If the neighbor router do not understand this attribute information, it still pass on to the neighbor, whereas Nontransu will simply do not auto dies.
In our previous video we have seen some of the basic introduction to the BGP attributes categories. Like we got majorly four categories of attributes. We have well known mandatory, well known discretionary attributes and then we have optional transtu and optional non transfer attributes. Now, here in this video we will try to understand the three attributes. We’ll try to understand this well known mandatory the attributes. And those three attributes are as Path, autonomous system path and then next top attribute and origin attribute. We call these three attributes are well known and mandatory attributes.
And the reason is whenever a BGP is going to advertise any network, it is also going to advertise the as path information along with the BGP update and also it is going to advertise the next stop information and also it is going to advertise the origin information and that’s the reason we call them as well known and mandatory attributes. Let us try to understand one by one what is as path attribute and how we can verify that. So, well known attribute here is a well known mandatory attribute. Now, it is going to list of as numbers through which the update is transfers, which means the list of update. Like, take an example here, I got ten dot network and 1111 dot network and twelve dot network which belong to as 2007.
It’s going from one of the router here and then react to the border router. And this border router is advising to another external router that is going to another autonomous system and these routing information is carried along with that update. At the same time it is also carrying the as Path information from where it is coming and then it is passed on to the as 200 routers, all the routers inside that as 200. And then the border router is going to pass on this information to another ethermosystem number, that is as 2003. So when this border route is advertising, it is going to advertise that eleven dot network along with as Path information. Here you can see it is advertising. These networks are coming from 2007 and then coming from 2000 like that, 200 like that. So let’s take an example here.
So take an example. In my network I got this one as. Let’s give some name as A, as 500 and then I got one more autonomous system number, a S 600 and then we got some as 700 and then autonomous system 800. So just a rough numbers I’m going to use. I got four different autonomous system number and each and every autonomous system number is having some set of routers and then they are connected to another router here and then it is having some set of routers and then connecting to as. So this is a default way like when you’re connecting to internet or when you’re connecting between different autonomous system numbers, your network will be connecting to multiple autonomous system numbers or multiple ISPs like this.
Now let’s take an example this router, this route is going to ordinary the ten dot network. Now, when this router is going to advise, ten dot network, it’s going to die to this route, this side and both the sides. When it’s going to die, the ten dot network, it is going to advise with its own autonomous system number information, which means 500 and all the routers inside this will receive the update with ten dot network with the a number of 500 and this routers will automatically rise to another as and when it is going to address to other areas. It is going to address with Ten dot network with as 500 because initially it is starting from as 500 and then reaching 600 which means now these routers inside the as 700 will receive the update from this side with a ten dot network with the as path of 506 hundred.
Or we can say it’s coming from 500 initially. Before that it was coming from 600 and then before that it was coming from 500. So similarly these routers, these routers again they will receive the same information from this head also. So let’s take an example, I got one network, let’s say there is a ten dollar network so this network is arise from this side and when it is advertising it is going to be only one as 500 and the same update will be coming from this side also the other end. And when it is coming from the other end it is coming from the same network, ten dot network is advertised and the as path will be 701st because it is receiving from 700 and before that it was coming from 800 which is this as number here and then it is coming from 500.
So now the routers inside the as 600 is receiving the same route from multiple paths and every time when it is receiving the route it is going to receive the ten dot network along with the as path information. Now, whenever a router receives the same network from multiple paths and it is going to decide the best route by default, BGP is going to decide the best route based on the autonomous system path information. Now, as path information and whichever the root is having the less as hops that route will be considered as the best route. Now, in our scenario I’m receiving the route from this side with only one as hop whereas I’m receiving from here with three as hops.
So this as hops is similar to your Rip metric whereas in Rip we consider a metric in terms of number of hop counts. But here the hops will be number of as hops, number of autonomous system numbers and it doesn’t make difference how many routers you have inside that as but when we receive the route from here it is only one as. When I’m receiving from the other end it is three as. Now, by default our router will decide the best route to reach that network. This will becomes as the best route because it is just having one as hop. So anyway, best path manipulation will see more in detail in our Next videos.
But by default, whenever any router, any route which is going to be reduced to any other routers, it is going to rise with autonomous system path information and how many autonomous system members it is crossing. Based on this, this as path will be incremented automatically as it moves on between different autonomous system members. Now, it is a wellknown and mandatory attribute because whenever a Pgpass is any network, it’s going to pass on that information of multiple whatever the autonomous system path it has been moving. So that’s what as path and by default, whichever the route is having the least number of as paths, that route will be considered as the best route in general, unless you do some other use some other attributes like weight or local preference.
So we’re not getting into complete BGP passelation process. We are just trying to understand here what is as path attribute and how we can verify that. To verify this, we can use show IP BGP command. I will show you in the lab here. The next attribute we’ll see is the next stop attribute. Now, next stop attribute is there’s nothing much to discuss because we already discussed much in detail about the next top behavior in our previous videos. If you remember, we have used next stop self commands because by default when an IBGP sends an update to another IBGP, it is not going to change the next stop. The next stop remains the same. And when any update is sent to EBGP, when it is sending any update to EBGP, it is going to change the next stop or add the next top address.
Like if you remember, we have seen that in a separate video, the next stop behavior. But I’ll quickly give you some idea on it. So let’s take an example. Router A is advertising some network 170 216 dot network is getting advertised to B and B is going to receive this 172 160 network and it is going to write the next top address as a address, which means whatever the IP address. Now, when router AB is going to address the same update to its internal BGP neighbors, it is going to address with the same network ID. But the next stop address remains the same because when an update sent within the same as it’s not going to change the next stop, the next stop remains the same. And to change its behavior, we can write a command called Next stop cells.
So that is something we have already seen in our previous videos. The next stop is not your next router. The next stop is nothing but your next IP to reach the next autonomous system number. And when BGP is carrying the BGP update it is also carrying this network information also along with update. Which means now when BGP is going to advertise when BGP advertises any network it is going to advertise the network along with as path information from where it is coming in our scenario it is as 464520 this one. And then it is also going to pass on the next stop information also. So now these two attributes, as path and next stop are well known and mandatory attributes in the BGP, which means they will be carried along with BGP update.
So next attribute, next well known and mandatory attribute we need to understand is your origin attribute. Now, these three attributes is path origin and next top are well known and mandatory attributes. Now, origin defines from where the route is actually got introduced into your BGP routing table or PGB table. Like there are three types of outputs you’ll find when you use show IP BGP command. You will see I’ll show you this in short. Now when we verify the outputs here, basically you got three types of outputs. You got something called I, which is nothing but IGP. Now, whenever you advertise, let’s say my router is receiving some network, let’s say ten dot network and it is receiving something like this.
So it is receiving ten dot network is received, it’s coming from as 500 and then reaching to my 600. So now this is your as path information and then at the end you will find some code, either it will be I or it can be a question mark. Now, when you see I here, it represents that this route is advertised in BGP, which means some router somewhere, somewhere, any one of the routers has advertised that network in your BGP. Like here in our example here, this tendon network is coming from as 500, 800, 700, and then you’ll see something called I in the end. When you see I in the end of Aspas information, we need to understand that some router which means in our scenario this as 500 is advertising this tendor network in BGP using BGP network command, which means it’s a route originated by BGP.
And when you see question mark here instead of I, if you see question mark incomplete, generally we call them as, it means that this route is learned from. So the first thing you’ll see I, when you see I, this network is advertised in BGP network command somewhere. And then when you see question mark, you have to understand that it’s not advertised in BGP, but it’s advertised in some other protocol, other routing protocol other than BGP. Maybe your Rip or EHRP, it can be OSPO, it can be static, any other routing, but it got redistributed into the PGP, which means, so these outputs are similar to if you compare with your IGP, this is more like your OSPF routes and this is more like your external routes. If you compare with OSPF, so this is what it says.
So when you see question mark, you have to understand that how the route is originated, it’s originated through redistribution into BGP. It’s not Aldi in BGP advertised by some other protocol or it can be a connected interface, but it got redistributed into BGP and you’ll see something called E. One more code, the third code. Whenever you see E, you have to understand if you receive any routes from older version of BGP, like the older version of BGP was called as EGP extra gateway protocol, which is no more. So when you see a code of E, which means you are learning the BGP route from an older version of BGP. Now these are the three different codes which you will find when you are using BGP. When you verify with Shaw IP BGP command, I can show you that output here.
If you try to see this output here. Now here I got an output which is going to show you. Whenever we are implementing BGP, normally we use a command called Show IP BGP Summary or Show IP BGP neighbors to verify the neighbor information. If you want to verify BGP table, we need to use a command called Shuip BGP. Now here you can see this I represent. These routes are origin code and these routes are Learn and Rhodes in BGP. And these belong to the same autonomous system number because you don’t see any of the as number mentioned here, which means all these routes are originated from the same autonomous system number. And then you’ll see the next stop information. And when you see next stop you have to understand it is your directly connected interface. So for every directly connected interface, my own network we have a next stop will be always zero, which means it is a directly connected interface. And then you’ll see this origination here, these routes belong to the same as. And then if you see here, this is also I, I means routes learned through BGP, but it is coming from a 64997 and then going to 64998 and then finally reaching to my autonomous system number. And then some of the routes you can see some of the routes you can see some question mark here now, which going to represent that it is coming from six, four, nine and eight as number, but that as is actually redistributing that route, those routes into BGP.
Which means these routes are not autodized in BCP, they are actually redistributed into BCP, the origin code mostly as path information you’ll find here and also origin information you’ll find in here and the next stop information you’ll find here. The next stop behavior on next stops you can see here. Apart from that you will also find some other attributes like metric. We call it as MVD. I’ll give you some introduction in our next videos local Preference which will again see in our next videos weight that also will see in our next videos. Again, these three attributes are there also attributes which can also be used which can also affect the best path manipulation.
And whenever you see something called I like here you can see this I it represent that this route is learned from within the same autonomous system number. And when you see when you see here you can see some Asterisk. Now Asterisk represents that it’s a valid route. Here you can see a code is valid. And when you see best result symbol it represents the best. Like here if you try to observe this output. Now in this output the same network is learned from two different hops like this ten dot 97, 97, 97 is going is all is learned from 172 31 one, three and also learning from these four. But out of these two, this route is considered as the best route because of whatever the metric like wills.
As of now, this path is same but the best path will be indicated with greater than simba. Now this again I’ll give you more in detail information in our next attributes next videos. But practically just information and route ready. You can see route ready process is same like OSPF, it automatically takes the highest type of the loop back. If there is no loop back highest type of the active physical interface. Now this is a sample BGP show IP BGP output where you will find as path information, origin information and then next stop information here, apart from that, you also see some of the or attributes.
Popular posts
Recent Posts