23 December, 2013

Configure IP SLA


#Create IP SLA 
R1#configure terminal
R1(config)#ip sla 100
R1(config-ip-sla)#icmp-echo 4.2.2.2
R1(config-ip-sla-echo)#frequency 5
R1(config-ip-sla-echo)#exit
R1(config)#ip sla schedule 100 start-time now life forever

*Chek if probe is working

R1(config)#do show ip sla sta
Round Trip Time (RTT) for       Index 100
        Latest RTT: 8 milliseconds
Latest operation start time: *23:05:21.375 UTC Mon Dec 23 2013
Latest operation return code: OK
Number of successes: 16
Number of failures: 2
Operation time to live: Forever

#Attach IP SLA to Track Object 
R1(config)#track 1 rtr 100 reachability
R1(config-track)#exit

#Configure Static Route Using Track
R1(config)#ip route 0.0.0.0 0.0.0.0 11.1.1.1 track 1

*Logs 
*Dec 23 23:12:47.535: %TRACKING-5-STATE: 1 rtr 100 reachability Up->Down
*Dec 23 23:13:42.535: %TRACKING-5-STATE: 1 rtr 100 reachability Down->Up

*Note: Some IOS this commands
R1(config)#ip sla monitor 100
R1(config-sla-monitor)#type echo protocol ipIcmpEcho 4.2.2.2