Community discussions

MikroTik App
 
rgrocery
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 50
Joined: Thu Oct 02, 2014 6:38 am

Failover via wifi cellular device

Fri Dec 12, 2014 1:57 am

Hello,
I want a mobile wifi hotspot to be my failover(my ISP backup)
How would I set this up? :D

What I have now is 1 Mikrotik Router RB951-G-2hnd and one Mifi 500 4g LTE Hotspot (this device can send out internet via usb, but I believe it is only supported by Windows) .

Currently the router is connected to an ISP via ethernet cable and serves 5 or more wifi devices, along with many ethernet devices.

Thanks and I would surely appreciate any help. Please no one liners though, since it just sends me on a wild goose chase.

- Josh C
 
brianlewis
Member Candidate
Member Candidate
Posts: 134
Joined: Tue Jul 20, 2004 10:54 am
Location: Irvine, CA

Re: Failover via wifi cellular device

Fri Jan 30, 2015 3:28 am

I'm looking to accomplish the same on a CRS125-24G-2HnD 6.25

I've got ETHER1 configured for the main DSL internet connection
I've got WAN1 configured as STATION and it logs into a T-Mobile HotSpot Wifi Device
I have IP/FIREWALL/NAT masquarade OUT Interface ether1
I have IP/FIREWALL/NAT masquarade OUT Interface wan1
I have 0.0.0.0/0 static route to DSL gateway distance 0
I have 0.0.0.0/0 static route to T-Mobile HotSpot WiFi distance 1

I believe that will work, anything else I might need? I see other writeups from people talking about adding other configurations that seem unnecessary.
 
noib
Member Candidate
Member Candidate
Posts: 291
Joined: Fri Jan 25, 2013 6:04 pm
Location: France
Contact:

Re: Failover via wifi cellular device

Fri Jan 30, 2015 11:11 am

Usually this is made by adding the two gateways in the default route.
I.E if your DSL gateway is 192.168.0.254 and your WLAN/Cellular gateway is 10.1.0.254, you will just add
/ip route add  dst=0.0.0.0/0 gateway=192.168.0.254,10.1.0.254
ROS should automatically switch to second gateway if the first one fails.
 
brianlewis
Member Candidate
Member Candidate
Posts: 134
Joined: Tue Jul 20, 2004 10:54 am
Location: Irvine, CA

Re: Failover via wifi cellular device

Fri Jan 30, 2015 4:22 pm

I'm going to give this script a try

http://wiki.mikrotik.com/wiki/Failover_Scripting
 
brianlewis
Member Candidate
Member Candidate
Posts: 134
Joined: Tue Jul 20, 2004 10:54 am
Location: Irvine, CA

Re: Failover via wifi cellular device

Fri Jan 30, 2015 11:46 pm

Under 6.25 the script running on a 15 second schedule interval does fail over to ISP2 but it then fails to reset the distance for ISP1 once its allowed to ping the checking ip (8.8.8.8 google dns in this case)

http://wiki.mikrotik.com/wiki/Failover_Scripting

I’ve tried FailOver Script but its not working correctly on 6.25. As you can see from the logs it does fail over to ISP2, but then when ISP1 is allowed to ping (8.8.8.8) it says ISP2 instead of ISP1 and the static route for ether1-gateway isn’t restored back to 1. Any ideas? I’m using a firewall drop rule to drop 8.8.8.8 out ether1-gateway to trigger the script to believe there is a failure. Original distance was 1 for ether1-gateway and it increases to 3 but the script somehow messes up and tries to change ISP2 distance back which 2-2 wouldn’t work and thus the value stays 2 for ISP2. Script was copied/pasted and only gateway values, interface names and ip to ping was adjusted.
bug1.gif
You do not have the required permissions to view the files attached to this post.
 
brianlewis
Member Candidate
Member Candidate
Posts: 134
Joined: Tue Jul 20, 2004 10:54 am
Location: Irvine, CA

Re: Failover via wifi cellular device

Mon Mar 02, 2015 4:56 am

Unfortunately after extensive testing I've been unable to make this script work properly to fail back over to ISP1. I've emailed the original creator of the script but haven't been able to get a response. If anyone has had success getting this script to work I'd appreciate some feedback/comment. This is under RouterOS v6.27. The script was originally written when 5.x was the latest. I'm using a CRS125-24G-1S-2HnD-IN unit with the wireless setup as the ISP2 client using a Mobile HotSpot. It can get it to fail over to ISP2, but can't get it to properly fail back when ISP1 is available again. I'm using firewall rules to block the dns query on ISP1 to trigger the failover.

Who is online

Users browsing this forum: trmns, UkRainUa and 17 guests