CCIE Topic: 1.2c Static Routing

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone i'm charles judd and in this video we're going to look at the 1.2c topic of static routing now i've briefly looked at using static routes in my video covering administrative distance specifically how we can use floating static routes to create backup routes in our network so here i want to just round out that topic a bit and fill in a few of the gaps starting with the different types of static routes we can group static routes into three main classifications we have directly connected static routes recursive static routes and fully specified static routes a directly connected or directly attached static route is fairly self-explanatory this is a static route that uses only the outbound next hop interface in order to get to a destination network the router assumes that the destination network is directly connected to the outbound interface that you specify we commonly see this used with point-to-point interfaces especially point-to-point serial interfaces these types of connections don't have to worry about address resolution or any adjacency tables so we can use a static route to direct traffic in that kind of situation in this topology you can see we have a couple of routers interconnected over the 172.16.10.0 30 network r1 is connected to the 10.1.1.0 24 network and r2 is connected to the 20.1.1.0 24 network we can use a directly attached static route entry in order to point r1 toward the 20.1.1.0 network and to point r2 toward the 10.1.1.0 network here we're connected to r1 and this is really simple to do let's see if we can ping r2 at 172.16.10.2 that is successful so we can of course reach our attached 10.1.1.0 network as well but let's try to ping over to the 20.1.1.0 network that is attached to r2 and that of course is going to timeout and fail we can use a directly attached static route pointing to the 20.1.1.0 24 network to solve this so let's do that let's go under global configuration mode and let's say iprout followed by the network we're trying to reach which is 20.1.1.0 with a 24-bit subnet mask and at the end we're going to specify in this case our outbound next hop interface which is gig zero slash zero in the case of my lab if we enter that and we break out now let's again try to ping the 20.1.1.1 ip address of r2 and yes we are able to do that if we say show ip route we can see this network available in our routing table here we see that 20.1.1.0 network notice we're told that it is directly connected to gig 0-0 which is of course what we would expect and at the beginning we see the s code letting us know that this is a directly connected static route if we check our code table at the top s indicates that this is a static route if we jump to r2 and let's try to ping 10.1.1.1 which is the remote interface by the way on r1 if you look in our topology and we're not successful in this direction so we also need a directly connected static route configured here so let's do that under global configuration mode let's say iprout 10.1.1.0 our 24-bit subnet mask and we want to say gig 0-0 that is our connected interface we break out and now ping 10.1.1.1 we're going to be able to do that this time so we do see that is successful let's also take a look at the output of a show iprout command to look at our routing table and we're going to see a similar story here we have a directly connected static route on gig 0 0 pointing over to the 10.1.1.0 network the next classification of static routes that we want to look at are recursive static routes you may be familiar with the term recursive or recursion from computer science theory or from programming recursion is a programming technique involving the use of a subroutine or a sub function or an algorithm where there can be multiple repetitions processed until a specific condition is met when we're talking about recursive static routes very simply these are routes that point to a different route within our routing table rather than pointing to a directly connected link so if we're looking at our same topology with a recursive static route rather than using the outbound interface we're using a next hop ip address our router let's say we're on r1 and instead of using gig zero slash zero we're going to use the next hop ip address of 172.16.10.2 our router is going to query its local routing information base or its rib to locate a route towards that next hop ip address that we configure and then it's going to find the associated interface to use now this does require that the next hop address that you're specifying of course exists in the routing table that is necessary the difference in using a recursive static route versus a directly connected static route really comes down to whether you're indicating an outgoing interface or a next hop ip address and which one you choose really depends on your specific needs so if we're using a point-to-point interface as we see here or if we're using serial point-to-point interfaces then it really doesn't matter which one you use if you're using a multi-point interface where multiple devices can be connected to a single interface then it's preferable to use a next hop ip address for the static route or in other words it's preferable to use a recursive static route with multi-point connections in a multi-point or broadcast network using the outbound interface is not considered to be a scalable solution and the next hop address is preferred another advantage for using that is that if there are multiple interfaces providing a path to the same destination using recursive static routing may allow the static route to remain installed into the routing table even if that link fails and requires a different outbound interface to be used so just for completion i want to show you how that works at the command line here on router one let's go under global configuration mode and let's remove our current configured directly connected static route so i'm gonna arrow up i'm just gonna prepend the no keyword in front of that to remove that static route i'm going to jump over to r2 i'm going to do the exact same thing i'm just going to take those directly connected static routes out of there and we'll start fresh so i'm going back to router 1. actually let's try to ping from router 1. let's try to ping 20.1.1.1 which was previously successful but after removing those static routes that of course is going to fail so let's configure this as a recursive static route let's go back under global configuration mode and let's say iprout and we want to go to 20.1.1.0 that's the network that we're targeting with of course our 24-bit subnet mask and instead of saying interface gig zero slash zero we're going to use our next hop ip address which is 172.16.10.2 you can see in our topology that is the next hop ip address that's on router 2. so let's hit enter there let's go to r2 now and we're going to do something very similar and i'm just going to arrow up to our original iprout command that we see rather than the interface i'm going to use the next hop ip address 172.16.10.1 we'll hit enter and let's break out of here now and let's try to ping from router to 10.1.1.1 of course that is successful we'll just verify the other side as well try to ping 20.1.1.1 from router 1 and that is also successful the final classification to look at for static routes are fully specified static routes which combines both of the techniques that we've already looked at a fully specified static route is going to be configured with both an outbound interface and a next hop ip address with our modern devices which use ceph cisco express forwarding fully specified static routes really aren't necessary any longer and we would again fall back to the recommendation of using our recursive static routes of using a next hop address rather than an outgoing interface so fully specified static routes those were most commonly used in older ios versions prior to ceph the configuration command is essentially the same as we've already looked at except we indicate both the outgoing interface and the next hop ip address we add both of those to the end of the ip route command one final topic i want to look at with static routing is the concept of a static null route these can be used as a way to drop network traffic in order to prevent routing loops these are normal static routes that point to a null interface which is a special type of virtual interface found within ios let's talk about a case where we might see this used if you look at our topology we have an isp router connected to r1 the isp is providing a block of networks to this customer which is the 20.1.0.0.20 network so this customer has a really large range of potential addresses however you can see that only a few of those networks are currently in use we see the 20.1.1.0 network the 20.1.2.0 network and the 20.1.3.0 network if we connect here to our isp router let's say show run i want to pipe to include ip route and you're going to be able to see the currently configured routes on this router we have a static route on our isp router and that's using the outbound interface gig zero slash one and the next hop ip address 172.16.10.2 which is of course r1 or the customer site and also by the way since we didn't configure a fully specified static route in the command line interface that's why i put one of those routes in this isp router just so you could have a look at what that looks like so just as we see here it's the interface id followed by the ip address so it's really simple to implement so let's say from our isp router that we have a packet that's maybe originating from the public internet and it's trying to reach the 20.1.5.0 24 network that is a valid network within this customer's allocated address block but it's not one that we have in use at the moment so let's simulate this with a traceroute command from our isp router let's say traceroute 20.1.5.1 and when we do that you'll notice that of course this trace route will eventually time out and we see this packet is bouncing between 172.16.10.1 and 172.16.10.2. we can see that's just bouncing back and forth over and over and over for all of these trace route outputs if you look at our topology of course those addresses are our isp router and router one so what's happening here well the isp router is sending the packet to r1 because of our static route that we just looked at let's jump over to r1 and from here let's say show run pipe 2 include iprout so we're going to run the same command just to see what we have configured and we're going to see a static default route pointing to our isp as well we see that here indicated by the all zeros network and subnet mask so this is our default static route and that's a very common configuration pointing out to the isp so we're saying that if we don't have an exact route in our routing table for a network then go out to the public internet instead what we call our gateway of last resort if we say show iprout we of course won't see a specific route for the 20.1.5.0 network that we performed the trace route on we haven't allocated that network yet so r1 is going to look for the best match and what r1 is going to see in the routing table is the default route that we see here at the top our default static route over 172.16.10 so that's going to point back to our isp router of course this is looping and continuing in the network and that's what we see from our traceroute output on the isp router we see that trace route just bouncing back and forth between the isp and router 1 creating a routing loop so we can use a static null route to guard against this very easily so let's go actually let's go back to r1 and let's go under global configuration mode let's say i p route our network block is 20.1.0.0 with a slash 20 mask so 255.255.240.0 and if we look at contextual help we have a lot of options here in the output but we want to use the keyword that we see here which is null this is going to create a null virtual interface in ios and you can see that if we look at contextual help after that we just simply need to give that an interface number and we need to give that interface number zero now once we've done that let's go back to the isp router and let's again try that traceroute command and what we're going to notice this time is that our trace route stops at r1 and it lets us know that this host is unreachable we're still able to reach our valid networks so if we try to ping a valid network let's say 20.1.3.1 that is still successful and of course 20.1.2.1 is successful as well let's jump back to router 1 briefly and look at the routing table and talk about why this corrects our issue if we say show iprout we can see our static null route configured here so now when we have traffic coming into one of our unallocated networks instead of using our gateway of last resort this null route is going to be seen as the best match and it's going to direct those packets to that virtual interface and it's going to drop that traffic now of course there are other ways this can be done easily with access control lists but i did want to make you aware of the concept of a static null route and how we can use that for routing loop prevention so that's a look at configuring some different options for static routing i hope you found this content useful i want to thank you sincerely for watching
Info
Channel: Charles Judd
Views: 1,117
Rating: undefined 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.2, routing concepts, 1.2 routing concepts, cisco routing, routing table, 1.2c static routing, fully specified static route, recursive static route, directly connected static route, directly attached static route
Id: E21iviWvpqc
Channel Id: undefined
Length: 16min 14sec (974 seconds)
Published: Wed Aug 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.