2 Replies Latest reply: Dec 14, 2011 9:24 AM by Claire Loesel RSS

Triggering EEM applet after reload/powerup

toshi-esumi

We use EEM applets to shut down/no shut one of FastEth interface on c877/871(12.4(24)T1) by tracking IP SLA reachability over the main WAN circuit(ADSL or FE4 Ethernet) to let the another box (FortiGate 50B) know the main circuit is down and let it dial-out to the backup modem. This works fine when the circuit goes down and come back up while the c87x is in normal operation. However, when we or the cutomer on-site power-cycle the route while the circuit is down, the tracking object stays in "DOWN" state and doesn't change "UP"->"DOWN", it doesn't trigger the DOWN-applet to let the FG50B dial out.

As a temporary measure, we configured the interface to be "SHUT" and save the config so that every time it got booted up it start with the "DOWN" condition and when the circuit comes up the UP-applet gets triggered by "DOWN"->"UP" state change. A problem with this measure is if someone, likely one of our techs, needs to change the config in the router for whatever the reason, that person needs to remember that he/she need to shut down the monitoring interface down before saving it and reload the router to get back into a normal operation mode.

 

My question is if there is any way to trigger the applet a little after it boots up based on the state of a tracking object, not by a change of the state.

 

The key config for this arrangement in an 877 is below.

 

Thanks,

 

 

Toshi

############

track 1 ip sla 1 reachability

delay down 30 up 60

!

ip sla 1

icmp-echo <GW-IP> source-ip <Interface IP on ATM0.1>

frequency 30

ip sla schedule 1 life forever start-time now

!

event manager environment ShutdownHB FastEthernet2

event manager applet ShutdownInterface

event track 1 state down

action 0 cli command "enable"

action 1 cli command "config t"

action 2 cli command "interface $ShutdownHB"

action 3 cli command "shutdown"

action 4 cli command "end"

event manager applet EnableInterface

event track 1 state up

action 0 cli command "enable"

action 1 cli command "config t"

action 2 cli command "interface $ShutdownHB"

action 3 cli command "no shutdown"

action 4 cli command "end"

!