cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5893
Views
4
Helpful
4
Replies

Using IP SLA and EEM to provide 3G backup to ADSL connection on CISCO887VAG+7-K9 router

mitchen
Level 2
Level 2

On a Cisco887VAG+7-K9 router, I want to be able to use IP SLA and EEM to track connectivity to an external address via my ADSL line, if connectivity is UP then I want the 3G interface to be admin shutdown.  If connectivity is down, then I want the 3G interface to be activated and connectivity to resume via 3G.

I have configured this and it works apart from one problem.  If the config on the router is written to startup memory while the 3G interface is admin shutdown, we subsequently have a problem with the ADSL line and the router is then rebooted, then the EEM does not seem to re-activate the 3G interface so all connectivity is lost until the ADSL is returned to service.   i.e. it seems to be the case that if the IP SLA starts off as "Down" then the EEM doesn't take any action.  The IP SLA has to have gone into the "up" state before it starts working?  Does that make sense and, if so, is there any way round it?

For info, here is my IP SLA and EEM config:

!

ip sla 1

icmp-echo 8.8.8.8 source-interface dialer2

timeout 60000

ip sla schedule 1 life forever start-time now

!

track 1 ip sla 1 reachability

!

ip route 0.0.0.0 0.0.0.0 Dialer2 track 1

ip route 0.0.0.0 0.0.0.0 Dialer1 20

!

event manager applet 3G-ACTIVATE

event track 1 state down

action 10 cli command "enable"

action 20 cli command "configure terminal"

action 30 cli command "interface Cellular0"

action 40 cli command "no shutdown"

action 50 cli command "end"

event manager applet 3G-DEACTIVATE

event track 1 state up

action 10 cli command "enable"

action 20 cli command "configure terminal"

action 30 cli command "interface Cellular0"

action 40 cli command "shutdown"

action 50 cli command "end"

!

Any assistance/advice on getting this to work effectively would be appreciated!

Thanks.

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

If I understand correctly, the problem is when the cell interface is shutdown, config is saved, router reloads, but he ADSL line does not come up?  In that case there is no Up->Down transition on the tracked object, and the router remains disconnected.

If I read this right, then depending on your code, you may be able to set the default state of the tracked object to Up (under the track config).  If you don't have that command, then maybe you could do:

event manager applet bump-track

event timer cron cron-entry @reboot

action 1.0 track set 1 state up

That should force a transition.

Yes, basically, when the tracked object is not reachable on initial router boot, the router doesn’t detect a transition of the tracking object from up to down and therefore does not execute the associated EEM script. 

So, in my case, if I have an ADSL fault and the 3G interface has taken over, if the router is subsequently rebooted, all connectivity will be lost because the startup config of the router has the 3G interface as admin down and the EEM script to activate it does not kick in.

I've tried using "default-state up" under the track config but this didn't seem to have any effect - the reachability of my IP SLA was still down after a router reboot with no ADSL connection.

I also tried your script but this gave the errors:

%HA_EM-3-FMPD_ACTION_NOTRACK: bump-track: unable to set state for tracking object number 1; object does not exist or is not a stub-object.

Mar 19 10:23:00.005: %HA_EM-3-FMPD_ERROR: Error executing applet bump-track statement 1.0 %HA_EM-3-FMPD_ACTION_NOTRACK: bump-track: unable to set state for tracking object number 1; object does not exist or is not a stub-object.
Mar 19 10:23:00.005: %HA_EM-3-FMPD_ERROR: Error executing applet bump-track statement 1.0

I'm not sure how to resolve that?

Any further advice would be welcome!  Thanks.

Hmmm, perhaps what would work is to change the @reboot applet to bounce the dialer interface:

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "int Dialer2"

action 4.0 cli command "shut"

action 5.0 wait 3

action 6.0 cli command "no shut"

Hi Joseph,

I've implemented this slightly differently from your suggestion (though you certainly put me on the right track!) and I think I have now got it operating successfully.

What I have done is use the @reboot applet to activate the cellular interface following a router reboot.   So, if the router is rebooted while the ADSL is down, then the 3G interface is activated by the reboot applet and connectivity can resume via 3G.   When the ADSL is eventually fixed, the tracking state changes to Up and the 3G is deactivated by the corresponding EEM applet.  

From testing, this all seems to work nicely!  (Although if you see any fatal flaws in this which I have overlooked, please let me know!

Thanks for your help. (I may well have more questions to follow, partticularly in automating a means to alert me to when a 3G failover has taken place)

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: