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

EEM Script to reboot C819 if no internet connection

todd.devaul
Level 1
Level 1

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 1

Joe Clarke
Cisco Employee
Cisco Employee

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.