Answers, Config Museum: Fallback Static Route

Wendell Odom
By Wendell Odom December 19, 2014 09:05

Fallback static routes get little attention for #CCNA. Today’s post lets you check your answers versus that brief config museum lab that asked you to figure out what routes to add if we simply disabled OSPF on router R3. Today’s post shows the configuration, with a little more commentary than normal for this kind of post.

Here are some related config museum labs as well:

Key Mechanism: Administrative Distance

Cisco IOS considers each route to have an associated Administrative Distance (AD) value, based on the source of the routing information. However, IOS often ignores the AD. When choosing between two routes to the exact same subnet, IOS ignores the AD if both routes were learned from the same source of routing information. For example, when a router R1 learns two routes to subnet 172.16.8.0/22, both using OSPF, then R1 ignores the AD. IOS only uses the AD when the multiple routes to the same subnet were learned from different routing sources, choosing the route with the lower AD.

For example, when OSPF is still running on all three routers in our sample network, by default, IOS treats all those routes as having AD 110. So, R1 and R2 would each be able to calculate two routes to to subnet 172.16.8.0/22 using OSPF, and each router ignores the AD 110 setting for those routes. However, static routes default to AD 1. If you configured a static route on R1, to subnet 172.16.8.0/22, and ignored the AD setting in the ip route command, that static route would have an AD of 1. Now R1 would see routes to subnet 172.16.8.0/22, but from different sources, so R1 would choose the route based on the AD, choosing the static route instead of the OSPF-learned route.

A fallback static route is a static route that is used when the route learned through a routing protocol disappears. To make a static route act as a fallback static route, you just have to set the AD of the static route to a value higher than the AD of the normal routing source (110 in this lab, because we’re using OSPF).

By the way, here’s a copy of the network diagram for reference:

 

Figure 1: Network Used in this Lab

 

Fallback Static Route on R1 for Subnet 172.16.8.0/22

The lab asked you to think about routes to subnet 172.16.8.0/22 only. When you do the (contrived) exercise of disabling OSPF on R3, R3 quits advertising about that subnet, so both R1 and R2 no longer have routes to that subnet. So, what we need is a fallback static route for that subnet. Example 1 shows one example, with AD 160, but any AD higher than OSPF’s 110 would work:

Example 1: R1 Config, Fallback Static Route for 172.16.8.0/22

 

Figure 2: Fallback Static Route, R1, to Subnet 172.16.8.0/22

 

Fallback Static Route on R2 for Subnet 172.16.8.0/22

The same general logic applies for a fallback static route on router R2. Example 2 shows the configuration, again with AD 160 for the static route, and with a next-hop address of R3’s G0/1 interface address of 172.16.4.10:

Example 2: R1 Config, Fallback Static Route for 172.16.8.0/22

 

A Fallback Static Route for Your Fallback Static Route?

In Config Museum posts, I generally paint you into a corner, so there’s only one right answer, or at least one type of answer. For this lab, I created a little more freedom. For instance, you may have thought about whether you needed static routes for both possible paths from R1 to subnet 172.16.8.0/22: the short route directly to R3, and the longer route through R2, as shown in Figure 3:

Figure 3: R1, a Longer Fallback Static Route Added

You can add both fallback static routes, on both routers, and even give the longer route a worse AD. By doing so, each router uses the shorter path if it is up and working, and fails over to the longer path if the first path fails. Examples 3 and 4 show the configuration on both R1 and R2, this time with AD values 160 and 170 for the two routes.

Example 3: R1 Config, Two Fallback Static Routes

 

Example 3: R2 Config, Two Fallback Static Routes

 

Uhhh… Whoopsie, We Made a LaLaLoopsy

Hey, it’s Christmas, and the subject of LaLaLoopsy dolls came up at home… what a perfect name for a toy in the home of networkers! No loopsies in our networks, please! But we just made a routing loop, at least under the right conditions.

Now back to networking. Under the right conditions, the combination of the configuration in Examples 3 and 4 makes a routing loop – one of the big dangers when using static routes. Here’s the scoop:

  • The R1-R3 link fails, causing R1’s static route w/ AD 160 to fail, causing R1 to start using the AD 170 route that points to R2
  • The R2-R3 link also fails, causing R2 to stop using its static route w/ AD 160, and start using its AD 170 route that points to R1
  • Result: R1 sends packets for subnet 172.16.8.0/22 to R2, and R2 sends them right back to R1

So, you can see the danger as well!

Config VM: Fallback Static Routes
Series Kick-off - Career Development Planning for Networkers
Wendell Odom
By Wendell Odom December 19, 2014 09:05
Write a comment

2 Comments

  1. Robert January 10, 06:58

    Thanks for the theoretical session. But I got my concepts clear once o have done them on the provided lab.

    Reply to this comment
  2. certskills January 12, 09:18

    Yes, doing it really does clear out the cobwebs! Glad it worked for you.
    Wendell

    Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email

Subscribe

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Search

Categories