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. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

EEM Script to reboot C819 if no internet connection

Any help with the below would be appreciated ... I need some help verifing the below, as I am not famaliar with ip sla and eem scripting. I am trying to force the router to reboot if it has not seen an internet connection for over 15 minutes:

                  

config t
ip sla 1
icmp-echo 8.8.8.8 source-interface Cellular0
!
ip sla schedule 1 life forever start-time now
track 1 ip sla 1 reachability
!
event manager applet track-down
event track 1 state down
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "event manager applet countdown"
action 3.1 cli command "event timer countdown time 900"
action 3.2 cli command "action 1.0 reload"
action 4.0 cli command "end"
!
event manager applet track-up
event track 1 state up
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "no event manager applet countdown"
action 4.0 cli command "end"

1 REPLY
Cisco Employee

EEM Script to reboot C819 if no internet connection

This solution looks fine as is.  If you're using AAA, you will either need to configure "event manager session cli username USER" or add "authorization bypass" to each applet line.

519
Views
0
Helpful
1
Replies