03-06-2019 08:46 AM
I have EEM running in conjunction with a SLA. EEM and SLA works perfect after the SLA is in an up state. The logic of EEM and SLA is if the router can't ping 8.8.8.8 using the cellular interface change the tunnel to use the backup link which is an interface that is getting DHCP from the provider. If the cell connection is up it and then goes down it works exactly as expected.
The issue is if the track does come up once EEM is not kicking off. For example we moved the router to a new locaiton that doesnt have cellular. So, the router was powered off and moved. Router boots SLA goes into an unknown state but EEM never fires.
int gi 0
ip address dhcp
ip access-group INTERNET_IN in
ip access-group INTERNET_OUT out
ip nat outside
ip virtual-reassembly in
no cdp enable
ip route 0.0.0.0 0.0.0.0 Cellular0 track 1
ip route 8.8.8.8 255.255.255.255 Cellular0
ip route 0.0.0.0 0.0.0.0 dhcp 25
ip access-list extende INTERNET_IN
8 permit icmp host 8.8.8.8 any
track 1 ip sla 10 reachability
ip sla 10
icmp-echo 8.8.8.8 source-interface Cellular0
frequency 60
ip sla schedule 10 life forever start-time now
event manager applet Cellular-Down authorization bypass
event track 1 state down
action 1.0 syslog msg "Cellular Down#################"
action 1.1 cli command "enable"
action 1.2 cli command "config t"
action 1.3 cli command "int tun0"
action 1.4 cli command "tunnel source gi0"
event manager applet Cellular-UP authorization bypass
event track 1 state up
action 1.0 syslog msg "Cellular Up#############"
action 1.1 cli command "enable"
action 1.2 cli command "config t"
action 1.3 cli command "int tun0"
action 1.4 cli command "tunnel source cell0"
03-07-2019 01:38 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide