IP SLA

IP SLA is a mechanism of Cisco Routers that permits some dynamic behavior on static routes.
With IP SLA you can configure a ping, an HTML GET or other protocol to test the availability of a service, and if this service is offline erase the route from the routing table.

Configuration:


Deffining the ip sla with ICMP echo (ping)

r(config)#ip sla (ip_sla_number)
r(config-ip-sla)#icmp-echo (Destination_IP) source-ip (source_ip)
r(config-ip-sla-echo)#frequency (seconds)
r(config-ip-sla-echo)#timeout (milliseconds)
r(config-ip-sla-echo)#vrf (vrf_name)


Scheduling the ip sla

r(config)#ip sla schedule (ip_sla_number) start-time ( now | hh:mm:ss | after hh:mm:ss ) life ( time_in_seconds | forever ) 


Scheduling the ip sla

r(config)#ip sla schedule (ip_sla_number) start-time ( now | hh:mm:ss | after hh:mm:ss ) life ( time_in_seconds | forever ) 

Creating a track to trigger when the created ip sla changes the state from ok to down.

r(config)#track (sla_tracking number) ip sla (sla_number) state

Creating a route to be eliminated when the track is down.

ip route x.x.x.x y.y.y.y z.z.z.z  track (track_number)

Example:

r(config)#ip sla 1r(config-ip-sla)#icmp-echo 192.168.1.33 source-ip 192.168.1.1 
r(config-ip-sla-echo)#frequency 2 
r(config-ip-sla-echo)#timeout 8000

Make a ping to 192.168.1.33 with source 192.168.1.1, the frequency 2 seconds, with a timeout of 8s econds.

r(config)#ip sla schedule 1 start-time now life forever

The SLA is permanent.

r(config)#track 33 ip sla 1 state


The tracking is activated if the state change from OK to other state.

ip route 10.0.0.0 255.0.0.0 192.168.1.33 track 33
ip route 10.0.0.0 255.0.0.0 250 dialer 1 

We have a route using a dialer with a higher administrative distance using a dialer(ISDN).

If the ICMP don't reply to us the primary route is eliminated from the routing table, and the router start using the dialer route. When the ICMP works again we return to the primary route and the dialer goes down.


Related commands:

show ip route
show run | inc ip route
show ip sla
show ip sla statistics (sla_number)
debug track

Share this

Related Posts

Latest
Previous
Next Post »