cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2230
Views
0
Helpful
5
Replies

4G Failover using ip sla and track - How to fail back

DON BROWN
Level 1
Level 1

I am using Cisco C819G router with 4G for the failover.

I have configured an ip sla to verify the primary connection is up.

I have configured a track to reroute traffic via the Cellular interface if the primary connection fails.

This seems to be working.

But I want the Cellular interface to be disconnected if the primary comes back on line

So looking at the snippet of the config below if the status of sla 1 is down the first route will be removed and all traffic will be routed via the cellular interface - all good.  Now if the Gi0 interface comes back up and therefore the sla 1 is now up the the first route is reinstated - good.  But how can I force the cellular interface down ?

I am also looking for a way to be notified repeatedly if the 4G interface is being used. I have looked at the

event manager environment _ifDown_rcpt ...

configuration but this seems to be a once off process, is there a way to repeatedly send an email on a specific interval ?

track 1 ip sla 1 reachability
 delay down 12

ip route 0.0.0.0 0.0.0.0 111.111.111.11 track 1
ip route 0.0.0.0 0.0.0.0 Cellular0 20

ip sla 1
 icmp-echo 222.222.222.22 source-interface GigabitEthernet0
 timeout 10000
 frequency 15

Thanks for any suggestions

Don

5 Replies 5

Don,

certain higher end devices have EEM (Embedded Event Manager) built in, which allows you to shut down or activate interfaces when certain conditions are met. The 819 unfortunately does not support that.

http://www.cisco.com/c/en/us/products/collateral/ios-nx-os-software/ios-embedded-event-manager-eem/datasheet_c78-692254.html

To achieve what you want, my guess is you could use SNMP, with a tool such as SolarWinds...

Hello,

Thank you for your response ..

Looking at the data sheet for the c819g-4g-ga-k9 it says it does support EEM

http://www.cisco.com/c/en/us/products/collateral/routers/819-integrated-services-router-isr/datasheet_c78-732558.html

Do you have any examples of using EEM to do what I was after ?

Thanks

Hello Don,

I have come up with the below. The idea is that Cellular0 is shut when the primary connection is up, and unshut when the primary connection is down. An email will be sent every 90 seconds when the interface reset counter of Cellular0 increases, which happens when the event is triggered. This last thing I am not sure about, but you can specify various parameters to be polled. The polled parameter should be something that changes when Cellular0 is up, such as receive rate or transmit rate.

You can pretty much define any action you want with the 'action' command.

Unfortunately I cannot test this in a real environment, but give it a try. I have also attached the EEM command reference.

ip sla 1
icmp-echo 222.222.222.22 source-interface GigabitEthernet0
timeout 10000
frequency 15
ip sla schedule 1 life forever start-time-now

track 1 ip sla 1 reachability
delay down 12 up 15

event manager applet SHUT_NO_SHUT_CELLULAR0
event interface name Cellular0 parameter interface_resets
entry-op ge entry-val 1 entry-val-is-increment true poll-interval 90


event track 1 state down

action 1.0 cli "enable"
action 2.0 cli "conf t"
action 3.0 cli "int Cellular0"
action 4.0 cli "no shut"
action 5.0 cli "end"
action 6.0 syslog msg "4G in use"
action 6.1 mail server yourmailserver.yourdomain.com to yourmail@yourdomain.com
from ciscorouter@yourdomain.com cc yourcolleague@yourdomain.com
subject "4G is in use, interface Cellular0 is up"

event track 1 state up

action 1.0 cli "enable"
action 2.0 cli "conf t"
action 3.0 cli "int Cellular0"
action 4.0 cli "shut"
action 5.0 cli "end"

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/eem/command/eem-cr-book.html

Hello,

after doing some testing, I have made a small change to the previously posted configuration, and added action 4.1. and 4.2. The interface reset counter does not increase with a 'no shut', it does only with a 'shut'.

The parameter 'interface resets' might not be the best to poll, but I am not sure if, when you poll e.g. transmits or receives, even with a shut cellular interface, those counters might increase, due to some backplane or control traffic.

By the way, the poll interval is the interval at which you should receive the email. You can change that to whatever you want.

ip sla 1
icmp-echo 222.222.222.22 source-interface GigabitEthernet0
timeout 10000
frequency 15
ip sla schedule 1 life forever start-time-now

track 1 ip sla 1 reachability
delay down 12 up 15

event manager applet SHUT_NO_SHUT_CELLULAR0
event interface name Cellular0 parameter interface_resets
entry-op ge entry-val 1 entry-val-is-increment true poll-interval 90
event track 1 state down

action 1.0 cli "enable"
action 2.0 cli "conf t"
action 3.0 cli "int Cellular0"
action 4.0 cli "no shut"
action 4.1 cli "shut"
action 4.2 cli "no shut
action 5.0 cli "end"
action 6.0 syslog msg "4G in use"
action 6.1 mail server yourmailserver.yourdomain.com to yourmail@yourdomain.com
from ciscorouter@yourdomain.com cc yourcolleague@yourdomain.com
subject "4G is in use, interface Cellular0 is up"

event track 1 state up

action 1.0 cli "enable"
action 2.0 cli "conf t"
action 3.0 cli "int Cellular0"
action 4.0 cli "shut"
action 5.0 cli "end"

Hello,

Thank you for the responses.  I will try this configuration and see how we go.

Really appreciate your assistance

Thanks

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco