Switch Between WAN/LTE on schedule

animehero

Expert Member
Joined
Jan 16, 2015
Messages
1,202
Greetings

Hopefully I'm asking in the right place.
I've seen this discussed before,and now that i think about it,I might have thought of an additional cost hardware solution.

I have very poor ADSL connectivity,thinking of getting the rain LTE and dropping the ADSL service to 2mbps or 4mbps(whichever is available/cheapest).

Scenario : Use Rain LTE Uncapped add on for regular internet browsing until 17:55,then switch over to ADSL Automatically until the following day at 8am,whereby ADSL becomes the primary connection.

I have an ASUS N14U and a Gargoyle router.
My idea was to use this guide - https://itbusters.wordpress.com/2013/02/07/sample-script-for-internet-connection-failover-between-wan-and-3g-on-tp-link-wr1043nd/

And get a timer for the plug the modem goes into.Kill the modems power between 8am-5:54pm and have it auto switch over.Looking for a software solution so I dont have to buy the timer though.

Any ideas?
 

RoganDawes

Expert Member
Joined
Apr 18, 2007
Messages
1,201
Asus N14U runs AsusWRT, which is basically a custom fork of OpenWRT, I believe. That said, the root filesystem is read only, and 100% full, so I'm not 100% sure how one goes about configuring additional apps or cron jobs on it.

Regardless, the N14U DOES support configuration of an ethernet port as a WAN uplink, which you could use for the RAIN modem. I'd look at scheduling a job that simply switches the default route between the two options at a particular time. Or possibly keeps both default routes, and simply updates the metric of the preferred route may be better.
 

animehero

Expert Member
Joined
Jan 16, 2015
Messages
1,202
Asus N14U runs AsusWRT, which is basically a custom fork of OpenWRT, I believe. That said, the root filesystem is read only, and 100% full, so I'm not 100% sure how one goes about configuring additional apps or cron jobs on it.

Regardless, the N14U DOES support configuration of an ethernet port as a WAN uplink, which you could use for the RAIN modem. I'd look at scheduling a job that simply switches the default route between the two options at a particular time. Or possibly keeps both default routes, and simply updates the metric of the preferred route may be better.
Thanks for getting back to me.
Looks like it might be more complicated than expected.

My new plan is get this Plug for the ADSL modem (scheduled off/on),then setup the Gargoyle Router to auto failover to the 3G connection when the WAN link goes down
 

RoganDawes

Expert Member
Joined
Apr 18, 2007
Messages
1,201
It really shouldn't be that complicated, I'd certainly give it a try first before running out and spending extra cash on wifi-connected devices to turn OFF the wifi access point! :)
 

under_sky

Expert Member
Joined
Dec 26, 2013
Messages
1,039
Did you manage to get this method working ? I would have tried doing it with a mikrotik switch but no idea if you can add time management to a port etc to turn on or off at times
 

stepper

Expert Member
Joined
Dec 6, 2004
Messages
1,763
If you can run OpenWrt or Gargoyle on your Asus router then you can enable multi-wan and have ADSL on wan 1 and LTE(through a LTE router LAN) on wan 2.
Enable Cron and schedule your wan switch accordingly
 

netstrider

Senior Member
Joined
Nov 1, 2006
Messages
636
Why don't you try writing a batch script that changes your gateway (and IP if necessary) and add it to Windows task scheduler?
 

SoulSeeker

Well-Known Member
Joined
Jun 10, 2006
Messages
157
Why don't you try writing a batch script that changes your gateway (and IP if necessary) and add it to Windows task scheduler?
This actually worked for me but limits you to just your windows devices.

What animehero is looking for is to have dual WAN connections for his whole network to switch between....
In fact, I found this post because I've been searching to try and do the exact same thing...
 

Sn@p

Member
Joined
Mar 25, 2010
Messages
13
I have a super awesome setup using a Mikrotik RouterBoard that switches between my 2 rain and Telkom LTE routers on schedule. Works like a charm.

I'll document my setup and post it here sometime over the weekend.
 

adidas

Well-Known Member
Joined
Sep 4, 2012
Messages
460
yeah, I've also got my mikrotik to switch between LTE (Rain) and Ethernet (WAN -WISP) at certain time schedules.

Thought it would be a mission, but got it working pretty quickly.
 

MidnightWizard

Expert Member
Joined
Nov 14, 2007
Messages
4,550
I have a super awesome setup using a Mikrotik RouterBoard that switches between my 2 rain and Telkom LTE routers on schedule. Works like a charm.
I'll document my setup and post it here sometime over the weekend.
Subscribed
I do have an old Mikrotik but could never get it to work properly
Keen to see how a working setup is configured ...........
 

Sn@p

Member
Joined
Mar 25, 2010
Messages
13
OK so this is what I have done:

My devices are, 2 LTE routers connected via ethernet, Microtik RB433 from the good old days when WUG was a thing.

The two LTE routers have the following IP configured:
RAIN Router - 172.16.2.1
Telkom Router - 172.16.3.1

I have disabled DHCP on both the LTE routers.

Step 1:
Assign static addresses to the interfaces.
Go to the menu IP>Addresses and configure 3 interfaces, I used:
Int 1 -> 172.16.1.1 - Internal network
Int 2 -> 172.16.2.2 - Network to RAIN Router
Int 3 -> 172.16.3.2 - Network to Telkom Router

Step 2:
Add the default routes.
Go to the menu IP>Routes and add 2 static routes

routes.PNG

It's important to add the comments to each route as the scheduler uses this to disable the routes.

Step 3:
Configure NAT
Go to the menu IP>Firewall and select the NAT tab.
Check the "enable" checkbox.
Add Src. Address 172.16.1.0/24
Change Action to Masquerade

Step 4:
Configure the sceduler
Go to the menu System>Scheduler
Add a schedule to disable the "RAIN" route
Name: Disable RAIN
Start Time: 17:50:00
Interval : 1d 00:00:00
On Even: ip route disable [find comment=RAIN]
Leave all the policy checkboxes checked

Add a second schedule to Enable the "RAIN" route
Name: Enable RAIN
Start Time: 23:10:00
Interval : 1d 00:00:00
On Even: ip route enable [find comment=RAIN]
Leave all the policy checkboxes checked

Step 5:
Configure DHCP
Go to the menu IP>DHCP Server
Select "DHCP Setup" and follow the prompts, interface ether1 is where the DHCP server should listen for DHCP requests
Configure with the following ranges:
Address: 172.16.1.0/24
Gateway: 172.16.1.1
DNS Servers: 172.16.1.1

Step 6:
Configure DNS
Go to the menu IP>DNS
Add the following:
Servers 8.8.8.8 or any DNS server(s) you prefer.

And thats it, the RouterBoard should now disable the static route to the "RAIN" router and traffic should go to the "Telkom" Router during 17h50 and 23H10 daily.
 
Last edited:
Top