- [Narrator] In this video,
we want to take a look at configuring
IP SLA using some more advanced options.
One of the helpful ways we might use IP SLA,
is if we have redundant WAN links
going out over separate ISPs.
I've worked with several hospitals in the past
to configure their network
with multiple ISPs in this manner,
so that they can minimize any downtime.
This is critical for most businesses,
but especially those maybe in the healthcare industry
who offer around the clock emergency care.
In this topology, you can see
we have a very stripped down basic example of this.
We have two routers interconnected to one another
using redundant connections.
One connection is using the 10.1.1.0/24 network,
the other using the 20.1.1.0/24 network.
So these are representing two connections
going out to two separate ISPs.
We are going to configure this WAN connection
to failover to the backup route
in the case that one of the ISP connections goes down.
So first thing, from router one
let's verify that we can ping the other side
at 10.1.1.2, that is the IP address
on the other side of this network.
That's good.
Let's also try to ping 20.1.1.2,
the redundant connection, and that's good as well.
Let's do a quick show IP route,
and from that output, we can see that the 10.1.1.0 network
is available over gig 0/1, see that here
and the 20.1.1.0 network is available over gig 0/2.
Additionally, you may have noticed that I have
a static route configured in there.
I'm sending all traffic over the 10.1.1.2 link.
We'll talk about that more in just a bit
and why that's in there
and we'll do some alterations to that.
So just as we did with the basic IP SLA configuration,
let's set up router one.
Let's go under global configuration mode,
and let's say IP SLA.
We need to follow that by the entry number.
In my case, I'm going to make that entry number two,
and I'm going to hit Enter.
That brings us under IPS LA configuration mode.
Now if we look at our contextual help options,
we see all of these here.
One of those is the TCP connect operation.
Remember that TCP is the
reliable connection oriented protocol
as opposed to the UDP protocol
that's used with ICMP for example.
So this is going to allow us to track
the response time taken
to perform a TCP connect function
between routers one and two in this topology.
So I'll say TCP-connect and contextual help
is going to indicate that we can specify either
the destination IP address or the host name.
In my case, I'll use the destination IP address
of 10.1.1.2, that's the destination
on the other end of gig 0/1 on router 2,
and help again indicates that
we can specify a port number,
and then you recommend that port number to be above 1023,
and that's going to get us outside the range
of many of those well-known port assignments.
So, in my case, I'm going to use port number 5,000.
If we look at help again, we have the control option.
So I want to use that,
and this is going to allow us to either enable or disable
the control option, with enable being the default.
The control protocol is going to be used by IP SLA
when we have a responder configured
on the other side of our connection,
which we will do in this example eventually.
We'll set up router two as a responder.
Now if you were tracking let's say a host computer,
or maybe a server,
you would want to disable this
in order to get the correct responses
because those type of devices
would not be configured as an IP SLA responder.
And just a reminder,
the reason that we would want to configure
IP SLA responders, is they're going to give us
much more accurate information.
They're going to give us added timestamps
and other metrics,
and those are going to increase
the accuracy of our IP SLA tracking.
So I'll say enable, and I'll hit Enter.
I'm also going to use the timeout option
and I'm going to set that to 10,000,
that value is in milliseconds
so that's going to be 10 seconds.
We can set all kinds of other metrics here as well
if we want, like the frequency and so on,
but I'm going to leave this as it is for now.
I'm going to exit there
and I'm going to say show IP SLA configuration two,
to take a look at all of that,
and we can see that this type of operation
is set to TCP connect,
we also see the target IP address listed as 10.1.1.2.
The source address is all zeros,
meaning that any reachable address on this router
can be used as a source.
We see the target port set to port number 5,000,
and we also see
that the next scheduled start time is pending,
it says pending trigger.
So we actually need to fire this up.
So let's go back under global configuration mode,
and then let's say IP SLA followed by schedule.
Just schedule a start time for this.
And the first thing we need to do
is give this an entry number.
It's easiest to give this the same entry number
as the IP SLA that you're referencing.
So I'm going to call that two in this case.
And I want to run that indefinitely,
so I'll use the life keyword followed by forever.
And finally we can say a start time
and of the options under there,
I want to set the start time to now,
I want that to start immediately.
I'll hit Enter to accept that, then I'm going to exit.
I'm going to say show IP SLA configuration two once again.
This time we'll see,
tells us the start time has already passed.
So this is up and going.
Now let's jump over to the other router,
to router two, and let's configure an IP SLA responder.
So under global configuration mode,
we can say IP SLA responder.
And if we look at those options,
we see our options here,
and we see that we can use the TCP connect option
which obviously we want to do,
because that's what we've configured,
and we can specify a port number for that.
We want to set that to port number 5,000
just as we did on the other side.
So we can hit Enter,
and then we can exit there
and we can run a quick verification command.
We can say show IP SLA responder,
and here we can see
that we have already received messages,
we see those listed from recent sources.
We see 10.1.1.1, which is of course router one.
So it looks like this is up
and functioning exactly as we would expect it to.
Let's go back over to router one now,
and now that we've defined our IP SLA operation,
let's set up tracking for this probe.
So we can do this under a global configuration mode,
with the option track,
we can use the track command,
and we want to follow that
with an entry number for this tracking instance.
Just to make everything uniform,
I'm going to make that number two,
and then we can use the IP keyword followed by SLA
and the number of our IP SLA,
which is of course entry number two.
We can also add the final keyword for reachability,
if we want to test the reachability
because that's exactly what we're tracking.
If this were an ISP connection,
we'd be checking for the reachability of that connection.
So I'll hit enter, I'll exit
and I'll say show track two,
and here we can see track two
testing for IP SLA two reachability.
Reachability is currently up,
and we see things like the last operation code
and the latest roundtrip time for that traffic.
And by the way, the return code
that we see here listed as okay,
that's measuring if the status
is over a threshold that we've set for IP SLA.
So that tells us that it's not.
Now one final step,
if we want to make this failover,
let's look at the static routes we have configured here.
I'll say show run on a pipe to include IP routes,
and that's going to get us directly to the
relevant section of our output.
You can see that I have
a couple of static routes configured here.
I have the primary connection of 10.1.1.2,
all the traffic going over that
as indicated by the all zeros address and mask.
I also have another static route,
for 20.1.1.2, that's also sending all my traffic there
but notice at the end,
I've given that a higher administrative distance
so that it's not preferred and it's not used.
I've given that an administrative distance of 10.
The default administrative distance
for a static route is going to be one.
So by setting this to 10,
I've made sure that this backup route
isn't actively in use.
So if we look at the output of show IP route again,
you'll notice that right at the top
we have that static routing entry
in our route table, the 10.1.1.2.
Let's create a failover connection now
by altering this IP route command slightly.
We'll say, go under global configuration mode,
and the first thing we'll want to do
is we'll want to remove the original entry,
we'll say no IP route,
all zeros to the 10.1.1.2.
So we'll take that out of there.
Now we're going to send all traffic over that again,
we going to use a similar command to that,
but at the end when we add that static route back in,
we're going to put a qualifier on the end
and we're going to say track two.
This is going to allow us to install a route
dependent upon whether the tracking status
is set to up or down.
So remember we've created a tracking instance
called tracking instance two.
This is going to either install or remove
this particular static route
from our route table based on the tracking status.
So let's hit Enter, and let's exit here.
Let's go over to router two,
and let's go under global configuration mode
and let's go under interface gig 0/1.
This is the interface that is currently configured
as our main static route.
Let's see what happens if we shut down that interface.
We'll shut that down,
and then we'll jump back over to router one.
We'll give that just a bit of time
for the IP SLA to recognize that the interface is down,
and what's going to happen
is that once the tracking object that we've set up,
once that goes down,
the static route that we have pointing to 10.1.1.2,
that should be pulled from the routing table,
that should no longer be in there.
So, let's do a quick show track two command.
We see that that still is listed as up,
so we'll give that a little more time.
Keep monitoring that to see when that track goes down.
There we go, took just a few seconds for that to happen
but now we see the output of the show track to command,
the reachability is listed as down.
The last operation return code says no connection.
So, that is exactly what we'd expect to see
when we shut down that interface.
Now let's take a look
at the output of the command show IP route.
Notice that our original static route
we had in our route table,
the route to 10.1.1.2, that's gone.
Now we see the 20.1.1.2 listed there.
So we've changed the default path
for our traffic to our backup interface
based on the tracking of our IPS LA probe.
If we go back over to router two,
and we say, no shut on that interface,
we bring that interface back up.
We go back to router one,
we'll ping the interface
just to make show everything is good there.
So yap, that's reachable again, that's good.
If we again say show track two,
again, we'll have to give that a moment
and let the status change back to up, and there we go.
We finally had that come back up.
We see now IPS LA to reachability that is listed as up,
the latest operation return code
is back to okay once again.
Let's again take a look at the
show IP route command, and now look at this,
we noticed that since the tracking
condition has come back up,
since our reachability is up,
it has placed the 10.1.1.2 route back into the route table
because the condition is once again reachable.
So this is a very common example
of how you might use IPS LA
in the case of redundant ISP links in the network.
Again, there are numerous ways
that we can enable IP SLA for our networks,
if we go under a global configuration mode
we can say IP SLA three,
and if we look under the contextual help options,
so many things we can do,
we can look at UDP jitter for example,
and we can point that to a specific host if we wanted to,
we can set that to a port number,
and then options that we can see under here,
we can specify specific codex that we want to use.
So if we want to monitor
European or US standards for voice or video,
lots and lots of ways we can use IP SLA
to ensure connectivity and proper traffic flow.
So that's a look at the more advanced options
that we can configure
using IP SLA for network monitoring.