cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1233
Views
0
Helpful
7
Replies

Failover between two link

Hamada Ahmed
Level 1
Level 1

Guys

I have one router with two links to two different ISPs LTE  ( one ISP use rip and second one use OSPF)

anyway I want to route traffic based on link quality ( RSSI strength)  not routing table .

how can achieve that ?

 

7 Replies 7

Hello,

 

you need an EEM script that compares the output of both interfaces and acts when one RSSI is higher than the other. Post the full configuration of your router so we can fill in the bits and pieces...

How EEM works her , if it found that G0/1 is higher RSSI , then what it will do ?

Hello,

 

you need a script such as the one below. The script runs every 30 seconds and compares the RSSI values of both interfaces. The interface with the higher RSSI will be made passive. The reason I need to see your full configuration is so that I can see how your routing is configured, and for testing.

 

Here is the generic script:

 

event manager applet LTE_FAILOVER_RSSI
event timer watchdog time 30 maxrun 31536000
action 1.0 cli command "enable"
action 2.0 cli command "show cellular 0/1/0 radio | inc RSSI"
action 3.0 set STC_SIGNAL "$_cli_result"
action 4.0 cli command "show cellular 0/2/0 radio | inc RSSI"
action 5.0 set ZAIN_SIGNAL "$_cli_result"
action 6.0 cli command "show ip route | inc Cellular 0/1/0"
action 7.0 regexp "(Cellular[0-9\/]+)" "$_cli_result" match ACTIVE_INTERFACE
action 8.0 if $_regexp_result eq "1"
action 9.0 regexp "RSSI = (-[0-9]+) dBm" "$STC_SIGNAL" match STC_SIGNAL
action 10.0 regexp "RSSI = (-[0-9]+) dBm" "$ZAIN_SIGNAL" match ZAIN_SIGNAL
action 11.0 if $STC_SIGNAL gt "$ZAIN_SIGNAL"
action 12.0 if $ACTIVE_INTERFACE eq "Cellular0/1/0"
action 13.0 cli command "config terminal"
action 14.0 cli command "router rip"
action 15.0 cli command "passive interface Cellular 0/1/0"
action 16.0 cli command "do clear ip nat tr *"
action 17.0 end
action 18.0 elseif $ZAIN_SIGNAL gt $STC_SIGNAL
action 19.0 if $currentinterface eq "Cellular0/2/0"
action 20.0 cli command "config terminal"
action 21.0 cli command "router ospf 1"
action 22.0 cli command "passive interface Cellular 0/2/0
action 23.0 cli command "do clear ip nat tr *"
action 24.0 end
action 25.0 end
action 26.0 end

This is nice Script , but how to make eem check also the link quality ( Jitter / Packet lose/ delay)

could you give me this script?

The script can be altered to check any value you want. You could also configure an IP SLA with icmp jitter.

 

Post the full running configuration of your router, that makes it easier to customize the script.

Thanks too much for your support , but it's prohibit to paste this router current configuration in public , if you can give a template for EEM to read ( jitter, delay, packet lost) it will be appreciated and kindness from you  

lucasfreitas83
Level 1
Level 1

Hello,

 

For me, the best way is to use IWAN or SD-WAN.

 

IWAN is embedded depend on your router.

 

SD-WAN needs an upgrade to Viptela and need other licenses.

 

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future.

Best regards,
Lucas Freitas