Tuesday, June 17, 2014

CCNA And CCNP In-Depth Lab:

Today: Advanced, real-world usage of the IP ROUTE command.


Like it?  Google +1 it. Got it?  Good!  : )  --  Chris B.

In an earlier CCNA and CCNP Command Discussion, we saw the fundamentals of the ip route command in action. Today, we'll see an often-overlooked option of this command that can serve you well in real-world networking...

... and it'll also reinforce an important Cisco routing concept or two. Let's get started!

In networking, we'll take as much redundancy as we can get. It's not enough to have one loop-free path from "A" to "B", we want a backup path in place so if the primary path goes down for any reason, the backup path can smoothly (we hope!) go into action.

(If you were waiting for the "but", it's on the way.)

But on occasion, networking can get just a bit complicated.  For example, today's network!



CCNA CCNP Floating Static Route Lab 1




Simple enough, right?  

Welll......

In real-world networking, not all connections are equal.  

I realize that's a Blinding Glimpse of the Obvious (BGO), but it's something books and other study guides tend to leave out.

Physically, R1 has three paths it can use to reach the 172.12.23.0 /24 network:

1.  Through the frame cloud and then through R2.

2.  Through the frame cloud and then through R3.

3.  Via the serial link S1 that leads to R3.

That's the good news.

However, the serial link that leads directly to R3 is so slow and/or unreliable that we can't run a routing protocol over it. It's so bad that the client is forbidding us from making this the primary path for R1 to reach 172.12.23.0 /24.  The slow path should only serve as the primary route in case the OSPF path is unavailable.

That's the bad news.

As a result, R1 has only the first two paths available to reach 172.12.23.0 /24....

R1#show ip route

< code table removed for clarity >

Gateway of last resort is not set

     172.12.0.0/24 is subnetted, 3 subnets
C       172.12.13.0 is directly connected, Serial1

O    172.12.23.0 [110/74] via 172.12.123.3, 17:13:51, Serial0

                  [110/74] via 172.12.123.2, 17:13:51, Serial0


C       172.12.123.0 is directly connected, Serial0

... and if something happens to Serial0, R1 then has NO paths to 172.12.23.0 /24.  

R1(config)#int s0
R1(config-if)#shut

1d00h: %OSPF-5-ADJCHG: Process 1, Nbr 172.12.123.3 on Serial0 from 2WAY to DOWN,
 Neighbor Down: Interface down or detached

1d00h: %OSPF-5-ADJCHG: Process 1, Nbr 172.12.123.2 on Serial0 from 2WAY to DOWN,
 Neighbor Down: Interface down or detached

1d00h: %LINK-5-CHANGED: Interface Serial0, changed state to administratively down

1d00h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down

R1#show ip route

Gateway of last resort is not set

     172.12.0.0/24 is subnetted, 1 subnets
C       172.12.13.0 is directly connected, Serial1


No worries, though.  We'll use the ip route command to create a static route to the 172.12.23.0 /24 network, we'll then have two routes in the routing table for R1 to use, and then all will be well.

Or... WILL it?

Let's find out!  I've reopened Serial0, and the original routes to 172.12.23.0 /24 are back in place:

     172.12.0.0/24 is subnetted, 3 subnets
C       172.12.13.0 is directly connected, Serial1
O       172.12.23.0 [110/74] via 172.12.123.3, 00:00:28, Serial0
                    [110/74] via 172.12.123.2, 00:00:28, Serial0

C       172.12.123.0 is directly connected, Serial0

Let's add our static route!

R1(config)#ip route 172.12.23.0 255.255.255.0 172.12.13.3

That should get our new route into the routing table...

R1#show ip route

Gateway of last resort is not set

     172.12.0.0/24 is subnetted, 3 subnets
C       172.12.13.0 is directly connected, Serial1
S       172.12.23.0 [1/0] via 172.12.13.3

C       172.12.123.0 is directly connected, Serial0

... and the new static route is in place.   That's the good news.

However, our OSPF routes to that same destination are gone.

And you know that's bad news.

What the heck happened here?

We'll figure that out right after this important message about your professional and personal future -- and how you can help the hungry while you build that future!

I know it's really, really easy to let your studies drop during the summer.   It's even easier to put off studying for a new certification.

Letting your studies come to a halt in the summer and losting your success momentum is the worst thing you can do.  

It's that much harder to get started again in September, because then it's really easy to say, "Well, I'll start in October", which becomes "Well, the holidays are here, so I'll start after the New Year...."

Before you know it, you've wasted six months of study time - and it wouldn't have taken you that long to get the certification in the first place!

You have two choices:

1.  Keep your studies going through the summer and get your certifications done.

2.  Quit studying, lose your momentum, and all of a sudden you're wondering where 2014 went.

To give you more incentive to keep your success momentum, I'm offering you the lowest prices EVER on my CCNA Video Boot Camp and CCNP All-In-One Video Boot Camp.

Right now, you can earn your CCNA with me for just $33.

My CCNP All-In-One course is only $77, and I guarantee it's the best investment you'll ever make in your CCNP studies.

Over 50,000 students are already in my courses on Udemy. Follow these links and join us today - and keep rolling on your way to exam and real-world success!


We're also donating 20 meals to the Central Virginia FoodBank for every CCNA and CCNA Security signup, and 100 meals for every CCNP signup!



Only $33 With This Link!






Join For Only $33 With This Exclusive Link!





Over 50 hours of world-class training for the ROUTE, TSHOOT, and SWITCH exams!




See you there! 

Let's get back to our lab, and answer that one burning question... WHERE DID OUR OSPF ROUTES GO?

Sorry for the yelling.  But we gotta figure this out -- and it goes back to a very important Cisco routing concept, administrative distance.

Right now, R1 is hearing about the exact same route (172.12.23.0 /24) from two different sources:

1.  A locally written IP ROUTE statement

2.  The dynamic routing protocol OSPF

R1 has to decide which source to pay attention to -- that is, which source is the most believable.  That's where admin distance (AD) comes in.  

AD is a measure of a route source's trustworthiness.  Both of these sources are trustworthy, but one has to be considered "more trustworthy", and that will be the source with the lowest AD.

OSPF routes have an AD of 110, as seen in an earlier routing table. The first number in the brackets seen in the routing table entries is always the AD, and the second is the metric for that route.

O       172.12.23.0 [110/74] via 172.12.123.3, 00:00:28, Serial0
                    [110/74] via 172.12.123.2, 00:00:28, Serial0


Static routes have a much lower AD, and if the static route is written as we wrote it here, it will always have a lower AD than any dynamic routing protocol.  That's why the static route took the place of the OSPF routes.

However, in this case, we didn't want that to happen.  The link the static route uses was described as "slow and/or unreliable", so we sure don't want that to be our primary link.

Also, the client told us to use the Serial1 link only as a backup.

One solution to this issue is to create a floating static route, and it's just about as easy as writing a regular static route.  Before we get started, let's remove the current static route.

R1(config)#no ip route 172.12.23.0 255.255.255.0 172.12.13.3

As a result, the OSPF routes reappear in the routing table.

     172.12.0.0/24 is subnetted, 3 subnets
C       172.12.13.0 is directly connected, Serial1
O       172.12.23.0 [110/74] via 172.12.123.3, 00:00:47, Serial0
                    [110/74] via 172.12.123.2, 00:00:47, Serial0

C       172.12.123.0 is directly connected, Serial0

Before we configure our floating static route, let's talk for a moment about what the heck a floating static route even is.  What's the "floating" bit?

A floating static route is odd -- you don't see it in the routing table, but it's in the config, and when you need it, it'll appear.

Sounds like some super-complicated CCIE-level deal, right?  Wrong!  You'll write a floating static route almost exactly as you'll write a regular static route. The only difference is at the very end of the command.

R1(config)#ip route 172.12.23.0 255.255.255.0 172.12.13.3 ?
  <1-255>    Distance metric for this route
  name       Specify name of the next hop
  permanent  permanent route
  tag        Set tag for this route
  <cr>

Success with floating static routes is all about the "distance metric for this route".  That's not the best description of administrative distance I've ever seen, but that's what this value is.  When you specify a value here, you're changing the AD of the static route.

To make the route "float", just set that AD to a value higher than that of the routing protocol(s) in use on this router.  Since OSPF's AD is 110, we'll just go one higher and set the AD of this static route to 111.

R1(config)#ip route 172.12.23.0 255.255.255.0 172.12.13.3 111

As a result of that little change, the static route will appear in the config...

ip route 172.12.23.0 255.255.255.0 172.12.13.3 111

... but the OSPF routes remain in the IP routing table.

     172.12.0.0/24 is subnetted, 3 subnets
C       172.12.13.0 is directly connected, Serial1
O       172.12.23.0 [110/74] via 172.12.123.3, 00:12:26, Serial0
                    [110/74] via 172.12.123.2, 00:12:26, Serial0
C       172.12.123.0 is directly connected, Serial0

The floating static route is ready to step in at a moment's notice!  Let's shut Serial0 down and then check the routing table.

R1(config)#int s0
R1(config-if)#shut

Gateway of last resort is not set

     172.12.0.0/24 is subnetted, 2 subnets
C       172.12.13.0 is directly connected, Serial1
S       172.12.23.0 [111/0] via 172.12.13.3
R1#
R1#
R1#ping 172.12.23.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.12.23.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/36/36 ms

Best of all, we have connectivity to the 172.12.23.0 /24 network!

When Serial0 comes back up and the OSPF adjacencies do the same, the router will make the AD decision again and put the OSPF routes back into the routing table and remove the static route at the same time.

1d01h: %OSPF-5-ADJCHG: Process 1, Nbr 172.12.123.3 on Serial0 from LOADING to FULL, Loading Done
1d01h: %OSPF-5-ADJCHG: Process 1, Nbr 172.12.123.2 on Serial0 from LOADING to FULL, Loading Done

Gateway of last resort is not set

     172.12.0.0/24 is subnetted, 3 subnets
C       172.12.13.0 is directly connected, Serial1
O       172.12.23.0 [110/74] via 172.12.123.3, 00:00:08, Serial0
                    [110/74] via 172.12.123.2, 00:00:08, Serial0
C       172.12.123.0 is directly connected, Serial0

That's all there is to a floating static route!

Thanks for reading today's tutorial, and for sharing it out - you're the only advertising The Bryant Advantage has!

Be sure to read these other tutorials, and sign up for these Video Boot Camps on Udemy!  They're all me and 100% free!




My Free Video Boot Camps on Udemy:

CCNA Video Boot Camp on OSPF (And More!)

CCNA Security Video Boot Camp

CCNP ROUTE and TSHOOT Video Boot Camp

See you there!

Chris B.

Blog Archive