Cisco - CCENT/CCNA R&S (100-105) - Path Selection (Routing table, AD, Metric) .33

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] he says Jamie right and in this next section we're going to continue with the rooting element of the icnd1 or CCENT and we're going to focus on path selection now we understand about dynamic routing static routing and the differences and why we need it we're going to jump into how the route is making the decision on a pro-rata basis in order to reach this destination for those who don't know you can come to me here on youtube on LinkedIn or Twitter so one of the most important elements of routing is to understand why a path is being chosen as our networks grow and as you move on in your studies there are a lot more variables to take into consideration when we think about routing we need to understand why a Rooter prefers a particular path over another or why that path has been selected and the reason it's important to know that is because until we know why a path is being used we can't modify that path because if we see something like an ERP path being preferred over rip and we change the rip metric that won't help us in that situation so we need to know the order of operations when it comes to path selection so first of all we need to understand the first decision that the route earth makes in order to find the best path and that is what we call the longest match or most specific route and the reason this is the first decision is because the router will always prefer the longest match almost specific regardless of the administrative distance and regardless of the metric the reason this is important to understand is because we know that rip has an ad of 120 and we know that e itrp has an ad of 90 therefore e are GRP routes are always going to be preferred over rip routes however if from the right route we learn a longer match or a small specific match then regardless of the ad the RIP route will be installed into the routing table and that cannot be changed the router will always first install the longest match regardless of how it learnt it and regardless of the metric within that particular protocol so what I mean by longest match well let's say we have a routing table and inside that routing table we had an entry of 1 9 to 0 0 0 8 / 8 tells us that the 8 bits are turned on with the first 8 bits which means that long as it starts with 1 9 2 the last three are tetes we don't care about and therefore we would send it out that way so let's say this network was learned out fastethernet 0/0 if we had 1 9 2 X X X come in so this could be literally anything so if it was 10 20 30 or 40 105 long as it starts with 192 this path is valid and fastethernet 0/0 would be the outgoing interface or egress interface let's now say we've installed the 192 168 0 0 / 16 into the routing table well 16 is longer than 8 so if it was 192 168 xxxx it would go out of passive net let's say passing than 0 1 because this is a longer match however if it was 192 170 xxxx where it doesn't match this hash / 16 so it falls back to the / 8 and it would take fastethernet 0/0 and now let's say we have the 192 168 0 10 or it does match the 8 here but it also matches the 16 and it also matches the 24 and because 24 is more specific than 16 and 8 it would choose this as the best path to reach the destination so long as match will always be the first thing that the Rooter will prefer over anything else if a path is lost let's say we're still trying to get to the 192 168 0 10 but this slash 24 path is no longer in our routing table then we would obviously use the next longest match which is slash 16 we can also use the longest match as a method to change the way we route traffic so to give you an example of that let's say we have a route up here and this route has two links downstream to two different rooters and both these route is connected to let's say the same switch and they're advertising the same slash 24 upstream let's say via rip or via a dynamic routing protocol fire nigp to this particular route at the top so now this Rooter looks it's two options and decides to either choose one over the other or do something called ecmp equal cost multi path which is link we'll get into a later date but for now what we need to understand is the top Ritter has two paths to wash the destination what we can do is we can use the longest match rule as a tool to change the path selection and the way we do that is at the moment both paths are a slash 24 so it would move on to the next criteria to find out which path to use if not both however what we can do is we can let's say cut this slash 24 into 2/25 which obviously slash 25 is 128 IPS sat 24s 256 so two of these fits into 256 and now what's happening is we've got the same network being advertised out of both links but over here we have it split up into two / 25 being advertised as opposed of a singular slash 24 will go on back to what we learned so far about path selection we know that those two 25s are more specific then this last 24 the path to which the route of would use in order to reach the final destination will be via the slash 25 and not via the slash 24 because the / 25 path is more specific however if the slash 25 path were to go down let's save this link here sales then it will fall back to the slash 24 and routing will go the other way to reach the destination so moving on in our path selection order we've talked about long as match up next we have something called the administrative distance so the administrative distance sometimes just referred to as the ad represents a number of how preferred a particular protocol is or sometimes how believable it will be so if it's connected then it's going to be more believable and preferred in some accuser and Fire er GRP now these numbers like connected being 0 static being 1 OSPF be 110 this is something that you need to remember for the cset and icnd1 it's also something you need to remember that it would be the second pass selection rule first it looks at the longest match and if the longest match is the same it will be then refer to the ad so what I mean by that is if we have a 192 0 0 0 8 learnt by connected and we have let's say a 192 168 0 0 / 16 learned via rip and we're trying to get towards 192 168 0 0 then it wouldn't ever consider the ad because it's already preferred the longest match only if we had a case where we learned two routes style the same ie 192 168 0 du / 24 would we then compare the source of where we learned that information and then decide which one would be the best now the ad is a numeric number that's been assigned to each individual protocol on Cisco platforms so Cisco says that if it's a connected we'd give it zero if it's static we'll give it one as OSPF we'll give it 110 and by default every router is configured that way the ad is something you can change and there are reasons why you would change that and later date in your in your studies you'll see why that is useful in things like redistribution and more complex path selection but for now we just need to understand what the AV represents and the ad says that if it's lower it's better so again if I receive a slash 24 from static and rip then I'm always going to be fir the static and remember in our static video we talked about how we can raise the ad to something above let's say rip and allow the rip route to be preferred so I'm going to show you this since it's something that you need to know is the second variable in path selection providing that the first variable matches meaning then there's two of the same entry so what if then we have the same slash 24 the slash 24 is being learned two ways via OSPF within OSPF we need and something else to help us calculate that decision and this is where metric comes into play the metric will change depending on which protocol is selected so rip would use hop count OSPF use costs ERG RP uses distance again this is something you might want to remember for the C cent and I see anyone and once it's gone through a three-step process then eventually is able to find its way to the final destination so again the first decision is regarding the longest match almost specific if we were trying to get to the 192 168 0 10 then it would look at our routing table and let's say we have these three entries and first of all the slash a is valid because it matches but it only matches on the first eight bits the slash 16 1 9 2 1 6 8 also matches but it matches on 16 and then the 192 168 0 slash 24 matches on 24 bits because 24 is longer than the other two matches this one is deferred for a godless of how we learn it if we learn that slash 24 from two different locations then we prefer the one with the lowest admin distance so we'd prefer a static route if it was the slash 24 versus this rip route if it was the slash 24 let's say for example we learned to slash 24 fire it then the first match the second match and then it needs a third to actually decide on the final path then within RIP goes towards the metric and finds the lowest metric and then ultimately it will have its final path to take depending on the routing protocol and whether it supports it if it has multiple paths the same cost ie the same hop count then it may install both paths or more than two paths and do ecmp equal cost multi path that means it will utilize more than one path to the same destination now with the metric in all protocols it will always be the lower is better so two hops is better than four hops and in OSPF the cost of ten is better than the cost of 100 so this path selection process is to make you need to remember you need to know when the longest match ad or metric is making that decision to a particular path and the reason for that is because if we know why the decision is being made we can modify the output so let's go over a routing table that I pulled together to kind of go over an example of why some routes will being preferred over the others but for now let's just have a quick talk about what we're looking at so we've seen it in the last couple of videos this is the show IP route output this is essentially what we call the routing table and the routing table is a collection of different routing protocols and technologies which are all up here shown in this legend where it lists what all the codes actually mean and you can see just down the left-hand side here a list of all the codes that we're currently using so these codes obviously relate to routing types so we've got c4 connected we've got l4 local we got our for rip and we've got o for OSPF so this tells us that this particular route was installed via an OSPF and it has certain attributes like it has the ad of 110 versus rip of 120 and it has a cost of 2 versus a hop count of 1 for rip it tells us our net hop so if I want to get to the 192 168 0 0 slash 24 this is our prefix I would go towards the next hop off the 20 20 21 and that 20 20 20 one has a recurse and it recursive to the interface of gig zero-one the route same again one nine two one six eight zero zero notice that the prefix length is different the next hop is different is 10 10 10 1 and it's also recurring to a different interface so all I want to do is talk about why some of these routes are preferred and how and what we need to do in order to change the routing selection so let's go over then why a particular path may be being preferred over another let's give ourselves a destination of 192 168 0 10 and then let's have a think if we were the Rueter what path would we take and why well first of all obviously you're a Rooter and you would receive a frame a layer 2 frame destined for your MAC address on the ingress interface you would look at the MAC address inside notice it's for your interface and you would decap slate look inside and have a look at the destination IP and then run that through your routing table in order to find the correct egress interface well the process of actually looking at the path is kind of what we're trying to discuss here by looking at the shell of your route and what we want to know is which paths are valid for the 192 168 0 10 and in those valid paths which ones would we actually use obviously the route would do it extremely fast because this is normally done in hardware with something called SEF Cisco express folding in this case let's go for it manually and try to understand what would happen well first things first it will try to find the first match which I said previously is the longest match so we try to find the most bits in common with our destination so just quickly looking at the routes that we have available to us we can see that the 192 168 0 0 / 24 contains the 192 168 0 10 destination and inside that stash 24 we have three networks that stick inside it we have an entire slash 24 which is learned by OSPF we have a slash 25 which is learned by RIT and we have a slash 30 which is learned by RIT or going on the longest match which means more bits in common at least three actually only two matches we have a slash 24 that matches and as slash 25 because the slash 30 is of course for IPS and since it starts at the 192 up to 196 that's not part of the IP destination that we're trying to reach however the slash 24 and slash 25 are both valid looking at the routing code we can see that they learnt by two different region protocols but the question is why would we prefer the slash 25 over the slash 24 or in this case why we prefer the RIP loop over the OSPF root even though the OSPF root has a lower ad then the RIP group and that's because it goes in order of operations which is the longest match the slash 25 matches 25 bits where the slash 24 only matches 24 bits so what I mean by that is we know a stash 25 is half of a slash 24 which means it's 128 IPS versus 256 IPs - - of course then we know that the slash 25 is more specific or longer match and therefore that path would be preferred it wouldn't consider whether it's learnt by rip or OSPF or static routing because the decision is already stopped on the longest match so if we were to change this we would have to change the actual longest match we wouldn't change where the protocol or the cold or the technology that we learn that route from so for example if I add a static root for the 192 168 0 0 / 24 it wouldn't matter it would still prefer the longer match I would need to create a dedicated or smaller match let's say for example I could do the 192 168 0 0 / let's say 28 and that would match and that'd be more specific so maybe I'll create a static route and that will be preferred over the RIP so that's why it's important we need to know why the pass being chosen if we had let's say this path here learn as a slash 25 is that / / 24 then of course because they match we would have to go to the next variable which is the ad and this time the OSPF route will be preferred and not the RIP route now we're in a case where both routes were / 25 both routes will have the same ad of 110 because they will learn both via OSPF then we would consider the metric here and we would pick the one with the lowest metric in this case 1 if the metric is also the same then it may decide whether it would do some sort of key CMP equal cost multi path which means both paths be utilized or if it's the case of e IG RP it may use some sort of unequal cross lobe and zinc depending on the metric but for now we just need to understand the three methods or the order of operations with those three decisions the longest match if the longest match is the same prefer the ad low ad wins and if the ad is the same within that protocol prefer the lowest metric and we need to understand what decision the Rooter is making to install it inside its routing table in order to influence the correct element of that path okay so that's all we've got time for in this lesson just to kind of go over what we've learnt so far so we primarily talked about path selection we said now we know about routing dynamic routing static routing and what it's needed we need to understand why a particular path may be chosen over another we went through the three-step process of first of all understanding the longest match and what that means the ad the administrative distance and within a particular protocol the metric type so that so SPF is cost if it's rip its hop count you can make sure that you remember these steps and you're able to look at a routing table and identify why a OSPF path is being installed versus a rip path and vice versa and then need to be able to remember the ABS so rip 120 OSPF 110 and so forth and the different metrics they use rip cost I'm sorry rip hop count OSPF cost and so forth make sure you have a play with this get on packet tracer create some networks put some static routing in see if you can influence the routing table and look at the outcome of that routing table as a network engineer you need to better look at a routing table and within a few seconds identify why a particular path is being chosen I hope this videos been informative I'd like to thank you for viewing and if it has been please do like and subscribe
Info
Channel: Ryan Beney
Views: 13,054
Rating: undefined out of 5
Keywords: routing protocols and concepts, routing table, routing table tutorial, routing table explained, path selection ccna, ccna routing table, ccna full course, ccent full course, administrative distance concepts in routing, longest match routing rule, routing table in computer networks, ccent routing protocols, ccna routing and switching, ccna 200-125, ccent exam, ccna exam, cisco routing table, routing table basics
Id: f105rLxckfA
Channel Id: undefined
Length: 23min 32sec (1412 seconds)
Published: Thu May 11 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.