Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

IP SLA with EEM

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
Cisco Employee

IP SLA with EEM

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.

911
Views
0
Helpful
1
Replies
CreatePlease login to create content