CCIE Topic: 1.4c OSPF Path Preference

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone charles judd here and in this video i'm looking at the 1.4c topic of ospf path preference ospf looks at both the type of route and a cost metric to determine the shortest path for any given destination first i want to explain what the preferred order is and then we'll take a look at this in action within a lab environment so first let's discuss our path preference order before ospf takes into account the cost metric the type of route is first examined so regardless of a route's metric or administrative distance ospf will first choose routes in the order seen here this is per rfc 3101 which describes the path selection order used by cisco in ios 15.1 and later so this may be different from some other texts that you've seen around or in older publications since this rfc has replaced the old rfc 1587 also depending on your ios version if you're running an older ios version you might experience a different order than we see here in the updated ios order in any event you can see that the preferred order is intra area first followed by inter area then nssa type 1 and external type 1 followed by nssa type 2 and finally external type 2. so path selection happens first based on the route type followed then by the cost so for example if we have a prefix learned as both intra area and inter area the intra area path is preferred even if the cost of the inter area path is lower let's look at this in a live lab now to demonstrate ospf path preference notice that in our topology every router is configured with a loopback address of all 11s this is going to allow us to easily see our path preference for this prefix that's shared from all of our routers so first on r1 let's say show run pipe to section router ospf and let's take a look at our configuration you'll see that we have a network statement for each of our neighbors r1 through r5 being in area 0 and we see r6 and r7 in area 1. also notice that we have area 1 configured as a not so stubby area we see that here in our configuration we did that so that we will be able to see nssa type 1 and type 2 routes later if we say show ip ospf neighbor we see that we have full adjacencies with all of our neighbors here everything's in the full state so that looks good so let's go ahead and copy our run statement let's go to r2 and let's paste that in here and take a look at the configuration from r2 so we see a simple configuration as indicated in our topology the loopback is advertised into area 0 here we see the all 11s network so we have an intra area prefix advertisement let's go to r3 we'll paste that in run the show command here as well a little different situation we have a loop back here being advertised into a different area it's advertised into area two so this is going to give us an intra area prefix advertisement let's jump to r4 and we'll be able to see that this is participating in area 0 as well and our loopback interface is not participating in ospf at all this is going to allow us to create an external prefix advertisement in order to do that let's redistribute this loopback into ospf so let's say router ospf 1 redistribute connected subnets and if we look at contextual help we want to use the metric hyphen type keyword that we see and if we look at help again you'll see we can redistribute this as an e1 an external type 1 or an e2 an external type 2. the difference in these is that with e1 routes the cost of the route is the external cost plus the internal cost used to reach that route if you configure an e2 route the cost is always going to be just the external cost there's no consideration made for the internal cost to get to that route and that's why we see type 2 preferred over type 1 for path selection so let's make r4 here a type 1 and hit enter let's go to r5 and we'll do our show command again we're going to see the same story we need to redistribute our loopback into ospf so let's go under router ospf 1 redistribute connected subnets we'll say metric hyphen type and this time we're going to create a type 2 and hit enter let's go to r6 we'll paste our run statement here as well and here we're going to see that we are configured we see that we're configured as a not so stubby area for area one we also still need to redistribute the connected subnets here but we're going to make this loopback an n1 advertisement and nssa type 1 advertisement so let's go under router ospf 1 redistribute connected subnets and we'll say metric hyphen type and we'll set that to type one so it's actually the same command you'll notice what makes these n1 routes instead of e1 routes is the fact that we are in a not so stubby ospf area n1 routes are similar to e1 routes while n2 routes are similar to e2 routes it's just all dependent on whether or not you're in a not so stubby area let's go to r7 and let's paste our run command here as well and we're going to see the same story we have a not so stubby area configured in area 1 we need to redistribute and we're going to set it to type 2 metrics in this case so let's say router ospf 1 redistribute connected subnets metric type 2. okay with all that in place let's go back to r1 now and let's again say show ip ospf neighbor just to verify that everything is good and we do see all of our router adjacencies so now we have all of our routers r2 through r7 all advertising the all 11's network back to r1 in various manners let's see what path we prefer at the moment let's say show iprout ospf and we have a single route listed for our all 11's network we see the status code o letting us know that this is learned via ospf and this is an intra area route and this is going over our link to r2 we see the 12.12.12 interface here listed which tells us this is going over to r2 so the loopback for r2 shares area 0 with us so that's exactly what we would expect to see as our first preferred path let's go to r2 and let's get rid of this loopback interface let's say interface loopback 0 and we'll shut down that interface we'll go back to r1 now and let's say show ipospf database and take a look in here we're going to see our type 1 lsa is at the top these are our type 2 lsas scroll down just a little bit more and we see a type 3 lsa advertised from router 3.3.3.3 which is of course router 3. if we complete our output we're also going to see some type 5 see those here and some type 7 lsas as well both advertising the same all 11's network but our type 3 lsa should get preference so let's arrow up and say show ip ospf route and we do see this network now listed with the oia code which tells us it was learned via ospf and that this is an inter area route our topology indicates that the loopback on r3 is in area 2 so that's exactly what we would expect to see let's go over to router 3 and let's also shut down this loopback interface go back to router 1. let's arrow up and again say show iprout ospf this time we see that our n1 route is preferred n1 being the ospf nssa external type 1 route and that's going through r6 in our topology we can see the interface 16.16.16.2 which is on router 6. this is a router from our not so stubby area if we say show ip ospf database near the bottom we're going to see our type 5 and type 7 lsas we see the all 11s network advertised here in both places per our updated rfc type 7 lsas are going to be preferred over type 5 in this case so in other words we prefer the n1 route over the e1 route so this is exactly what we would expect to see let's go over to r6 and let's go under our loopback interface we'll shut that down here as well we'll go back to r1 and we'll again say show iprout ospf and now we are down to our e1 route type our ospf external type 1 route and then you can see this is going over r4 at 14.14.14.2 if we say show ipospf database we're going to see this prefix as both a type 5 and a type 7 we know that r4 is an e1 route which will be preferred over the e2 type route from r5 and it'll also be preferred over the n2 type from r7 so let's go to r4 now we'll continue to narrow down our network we'll go under our loopback interface we'll shut down the loopback on r4 we'll go back to r1 and again say show iprout ospf and this time we're going to see that we have our n2 type route which is our ospf nssa external type 2. the ip address indicates that we are going over router 7. so let's say show ip ospf database and near the bottom of that output we're going to see our n2 route the type 7 lsa preferred over the type 5 lsa that's coming from router 5 which is our e2 route so needless to say if we take this n2 route out of the equation by going to r7 and shutting down our loopback interface we should see our final type which is e2 let's test that out say loopback zero shut that down jump over to r1 and one more time let's say show iprout ospf and we do see our final route type listed here e2 which is ospf external type 2. and this is of course going over r5 the only remaining router advertising that luback if we say show iprout ospf database this is going to confirm that the only place we're going to see this network advertised is as a type 5 lsa at the bottom here and it's being advertised from router 5. so that's a look at ospf path preference i hope you found this content useful and i want to thank you sincerely for watching
Info
Channel: Charles Judd
Views: 1,040
Rating: 5 out of 5
Keywords: cisco, ccie, cisco enarsi, ccie enterprise infrastructure, cisco enarsi 300-410, cisco encor 350-401, ccie lab, my ccie journey, ccie training, ccie blueprint, section 1.4, 1.4 ospf, LSA, 1.4c ospf path preference, inter-area route, intra-area route, external type 1, external type 2, nssa external type 1, nssa external type 2
Id: rMZMg0no-F4
Channel Id: undefined
Length: 11min 39sec (699 seconds)
Published: Mon Oct 19 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.