cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2015
Views
0
Helpful
1
Replies

IP SLA with EEM

rennerg
Level 1
Level 1

Hello,

I have a router running IOS version 15.3(3)M2 with the below configuration.  The intent is for the router to shut down it's WAN interface in the event that it is unable to successfully ping the internal IP 192.168.1.1.  Is there a way I can have it do further testing upon having a single timeout (via ICMP) such as triggering it to monitor at a greater frequency (ping every 3 seconds for 15 seconds straight) and if packet loss is greater than a certain percentage (20%) have it shut down the interface at that point?

track 1 ip sla 1 reachability

delay down 45 up 45

!

ip sla auto discovery

ip sla 1

icmp-echo 192.168.1.1

frequency 15

ip sla schedule 1 life forever start-time now

!

event manager session cli username "USERNAME"

event manager applet IPSLA_Down

event track 1 state down maxrun 40

action 1 cli command "enable"

action 2 cli command "config t"

action 3 cli command "int s2/0"

action 4 cli command "shutdown"

event manager applet IPSLA_Up

event track 1 state up maxrun 40

action 1 cli command "enable"

action 2 cli command "config t"

action 3 cli command "int s2/0"

action 4 cli command "no shutdown"

Thanks!

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

You can use the IPSLA event detector instead of track, and use an IPSLA reaction-configuration to only react on consecutive failures or X out of Y failed attempts.  If you wanted more control than that, you might consider rewriting this as a timer policy where you run an extended ping and process the results to count the number of '!' characters.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: