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

Alternate 4G backup on a Cisco C887VAG-4G-GA-K9

m.x
Level 1
Level 1

Hi all,

 

I'm currently using a C887VAG-4G-GA-K9 with the cellular as backup. To activate the cellular as back-up I use a script. This usually works just fine, but the router recently started flapping..

This activated the script over and over again.

This made both connections utterly useless. I am new to 4G back-up and scripts, so would like to ask if there is another way to make sure flapping doesn't make the script useless...

 

This is the script I'm using:

event manager applet Dialer0-UP
event syslog pattern "bound to profile Di0"
action 01 cli command "enable"
action 02 cli command "conf t"
action 03 cli command "no ip route 0.0.0.0 0.0.0.0 Cellular0 name BACKup"
action 04 cli command "ip route 0.0.0.0 0.0.0.0 dialer 0 name DEFAULT"
action 05 cli command "end"
action 06 syslog msg "Rerouting to primary link completed"
event manager applet Dialer0-down
event syslog pattern "unbound from profile Di0"
action 01 cli command "enable"
action 02 cli command "conf t"
action 03 cli command "no ip route 0.0.0.0 0.0.0.0 dialer 0"
action 04 cli command "ip route 0.0.0.0 0.0.0.0 Cellular0 name BACKup"
action 05 cli command "do ping 8.8.8.8 source vlan 1"
action 06 cli command "end"
action 07 syslog msg "Rerouting to secondary link completed"
!

This is a working solution, unless the line is flapping. Any addition to the script or other 'back-up activation method' would be highly appreciated.

 

Stay safe!

 

Greetings

Marnix

1 Accepted Solution

Accepted Solutions

Hello,

 

the 'traditional' way to achieve the failover is to use an IP SLA and tracking for the primary route. Below is what that looks like:

 

track 1 ip sla 1 reachability
!
ip sla 1
icmp-echo 8.8.8.8 source-interface Dialer0
timeout 1000
threshold 2
frequency 3
!
ip sla schedule 1 life forever start-time now
!
ip route 0.0.0.0 0.0.0.0 Dialer0 track 1
ip route 0.0.0.0 0.0.0.0 Cellular0 10
ip route 8.8.8.8 255.255.255.255 Dialer0
!
event manager applet CLEAR_NAT
event track 1 state any
action 1.0 cli command “enable”
action 2.0 cli command “clear ip nat translation *”
action 3.0 cli command "end"

View solution in original post

4 Replies 4

Hello,

 

the 'traditional' way to achieve the failover is to use an IP SLA and tracking for the primary route. Below is what that looks like:

 

track 1 ip sla 1 reachability
!
ip sla 1
icmp-echo 8.8.8.8 source-interface Dialer0
timeout 1000
threshold 2
frequency 3
!
ip sla schedule 1 life forever start-time now
!
ip route 0.0.0.0 0.0.0.0 Dialer0 track 1
ip route 0.0.0.0 0.0.0.0 Cellular0 10
ip route 8.8.8.8 255.255.255.255 Dialer0
!
event manager applet CLEAR_NAT
event track 1 state any
action 1.0 cli command “enable”
action 2.0 cli command “clear ip nat translation *”
action 3.0 cli command "end"

Thank you for your reaction. 

 

Could you explain to me why? And should this be added or instead off? 

 

Thanks in advance

 

Hello,

 

tracking in combination with an IP SLA is the standard way to configure backup connections. Your script essentially does the same thing. You can either configure a delay in your EEM sript, or change the frequency of the IP SLA in order to deal with the flapping.

Thank you very much for you reply! Sorry it took awile for me to respond, but I will look in to this when work is less busy! 

 

Thanks again!

Review Cisco Networking products for a $25 gift card