Wednesday, November 2, 2011

Cisco IOS Static Routing with Object Tracking

We will configure Cisco IOS Static Routing with Object Tracking feature in this example.

Here is the topology for this configuration example:



ip sla 1
 icmp-echo 10.10.12.2
 frequency 5
ip sla schedule 1 life forever start-time now

ip route 10.10.10.3 255.255.255.255 10.10.12.2 track 1

R1#show ip sla statistics
Round Trip Time (RTT) for       Index 1
        Latest RTT: 64 milliseconds
Latest operation start time: *03:37:26.803 UTC Fri Nov 1 2011
Latest operation return code: OK
Number of successes: 20
Number of failures: 0
Operation time to live: Forever

R1#show track 1          
Track 1
  Response Time Reporter 1 state
  State is Up
    6 changes, last change 00:02:02
  Latest operation return code: OK
  Latest RTT (millisecs) 32
  Tracked by:
    STATIC-IP-ROUTING 0

R1#show ip route 10.10.10.3
Routing entry for 10.10.10.3/32
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
  * 10.10.12.2
      Route metric is 0, traffic share count is 1

If our next-hop will be unreachable, the static route will not be valid and it will be deleted from the routing table.

Lets remove the IP address of F0/0 of R2

R2(config)#int f0/0
R2(config-if)#no ip address

Then on R1;
*Nov  1 03:39:58.267: %TRACKING-5-STATE: 1 rtr 1 state Up->Down
R1#show ip sla statistics 
Round Trip Time (RTT) for       Index 1
        Latest RTT: NoConnection/Busy/Timeout
Latest operation start time: *03:40:01.803 UTC Fri Nov 1 2011
Latest operation return code: Timeout
Number of successes: 48
Number of failures: 2
Operation time to live: Forever

R1#show track 1           
Track 1
  Response Time Reporter 1 state
  State is Down
    7 changes, last change 00:00:18
  Latest operation return code: Timeout
  Tracked by:
    STATIC-IP-ROUTING 0

R1#show ip route 10.10.10.3
% Subnet not in table

No comments:

Post a Comment