Showing results for 
Search instead for 
Did you mean: 

How to continuously reboot a router until condition clears?

Alex Goldney


   We have an issue where certain carrier conditions appear to require a reboot (or a reset of the interface) to bring the device back online.

We have tested the following script and it works OK (we can also modify this to reset the interface, rather than the more drastic reboot, but the same problem will remain as explained later)

ip sla 1


frequency 10


ip sla schedule 1 life forever start-time after 00:10:00

track 100 ip sla 1 reachability

delay down 180


event manager applet Missed_3_pings

event track 100 state down

action 10 reload

So - ping an ip address every 10 seconds and if it remains un-pingable for 180s conecutively reload the router.

This works fine, except that after the router reboots, the fact that the tracked object was already down is remembered, and thus no new event is generated if the address is still un-pingable.

So my question is - is there any way to ignore the fact that that the object is already down and just restart the delay counter again once the scheduler starts?




Joe Clarke
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

Try adding:

default-state up

Under the track configuration.  This will force the object to be up by default, thus triggering a transition if it is then found to be down.

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: