Steps to get 3g failover with DSL service

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
swiftnets
DD-WRT Novice


Joined: 08 Mar 2011
Posts: 2

PostPosted: Wed Mar 09, 2011 4:21    Post subject: Steps to get 3g failover with DSL service Reply with quote
Hey all,

I have read the various twiki's on dual WAN and Failover WAN, but would like a little direction on how to modify them to use a USB 3g modem instead of an ethernet port.

I have reasonable Linux and networking knowledge (I work for my ISP) but VoIP is where I know my stuff.

I assume there is some way to modify the processes in http://www.dd-wrt.com/wiki/index.php/Dual_WAN_with_failover this process, however I don't know quite enough about what the system will be referring to the USB modem as and how to initialise it without selecting the 3g option in the web gui, removing the PPPoE connection.

Michael

edit: would this twiki be more useful in my situation http://www.dd-wrt.com/wiki/index.php/Dual_WAN_with_one_as_standby_backup??

edit: I should also mention I have DD-WRT build 14896 running on an Asus RT-N16 with the Optware stuff running through a USB HDD.
Sponsor
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17619
Location: Hesse/Germany

PostPosted: Wed Mar 09, 2011 13:25    Post subject: Reply with quote
use scripting to switch between wan and 3g in case of failure
_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
swiftnets
DD-WRT Novice


Joined: 08 Mar 2011
Posts: 2

PostPosted: Wed Mar 09, 2011 20:21    Post subject: Reply with quote
Thanks Sash

What would I refer to the USB modem connection as in the script?

Would it require all the VLAN stuff or is that more for adjusting for the change in use of the LAN port?

Thanks again.
asuavo
DD-WRT Novice


Joined: 01 Jun 2011
Posts: 2
Location: São Paulo, SP, Brazil

PostPosted: Wed Jun 01, 2011 4:37    Post subject: Reply with quote
swiftnets wrote:
Thanks Sash

What would I refer to the USB modem connection as in the script?

Would it require all the VLAN stuff or is that more for adjusting for the change in use of the LAN port?

Thanks again.


Have you discovered how to make failover connection with a 3g modem?

I am confused with scripts. I don't know how to refer USB modem connection too.

I have a TP-LINK TL-WR1043ND with a 3G modem working well.

I want to make a failover using WAN port as WAN1(DHCP) and USB 3G as WAN2.

Thanks
Blixten
DD-WRT Novice


Joined: 19 May 2011
Posts: 8

PostPosted: Fri Jun 03, 2011 9:22    Post subject: Reply with quote
I would also really appreciate if someone with Linux networking knowledge sheds some light on this subject.

I´m running DD-WRT v24-sp2 (08/12/10) mega - build 14929 on a Netgear WNR3500L and want to implement automatic failover between primary DSL connection(DHCP) and secondary USB 3G connection.

How do I assign the WAN port to 3G/UMTS in script?

Thanks in advance!
Blixten
DD-WRT Novice


Joined: 19 May 2011
Posts: 8

PostPosted: Tue Jun 14, 2011 11:03    Post subject: Reply with quote
I find it hard to belive that nobody has any input on this subject.
So please, if you have any thoughts on this, give us a hand here!

Thanks!
mnour.tamer
DD-WRT Novice


Joined: 18 May 2012
Posts: 45

PostPosted: Wed Jul 18, 2012 19:39    Post subject: Reply with quote
I just to to ask about wan connection failover using two 3G sticks .

I want to use Asus n-16 which has 2 usb stick to configure two 3G stick to work as failover connection to each other .

is that possible and how ??????
maximum2
DD-WRT Novice


Joined: 14 Apr 2013
Posts: 1

PostPosted: Sun Apr 14, 2013 10:33    Post subject: auto switch to 3G in case of failure to connect default WAN Reply with quote
Guys, I have the same issue.

I have Dlink DIR-825 with DD-WRT on board. Have default cable WAN connection and also have perfectly working 3g USB Modem Huawei 1550 connection. They both are working great with manual setting via web interface. However, I am wondering whether it is possible to set up scrip to automatically switch cable WAN to 3G modem in case of failure (e.g. no ping from the chosen server). I have a very limited experience in linux commands and will appreciate any help. Thanks in advance!
t
FaustoDT
DD-WRT Novice


Joined: 26 Nov 2013
Posts: 5

PostPosted: Tue Nov 26, 2013 13:33    Post subject: Reply with quote
Hello,

I have been a lurker in these forums for a very long time and have been happily running DD-WRT on my E3000 for going on 3 years now.

I have always wanted to have my router manage automatic 3G failover - I live in South Africa and suffer from frequent internet (ADSL) outages as a result of cable theft. I have searched the forums for a solution but none are available or are not catering for what I believe the requirement is. Essentially a failover to 3G when the primary WAN goes down and then a switch back to the primary WAN when it is available again (given the costs and speed of 3G connections)

I have been able to get this to work, not a very elegant solution but it does seem to work 95% of the time. Sure, the scripting can be tidied up, I'm an accountant incidentally so apologies for the code and "baby language" scripting.

I have where necessary taken ideas and code from the 4 dual WAN wiki entries.
Dual WAN with failover
Dual WAN with one as standby backup
Cellular Phone/USB Modem as WAN connection
Dual WAN with failover WITHOUT JFFS

The issue I found with the wiki entries is that none of them specifically attended to pppd connections to an ISP and DHCP assigned ip addresses together with gateway addresses that are not static or accept ping requests.

I am currently running a Linksys E3000 router (DD-WRT v24-sp2 (04/09/11) mega - build 16758M NEWD-2 K2.6 Eko) with primary WAN set us as pppoe to my ISP and a Huawei E220 USB modem plugged into a USB port on a USB hub. I have also installed optware the right way 2 on a USB drive also connected to the USB hub. JFFS also set up on approx 200kb running some startup scripts.

Step by step:
On startup the /jffs/etc/config/*.startup scripts are executed. Important one being the 3G.startup script - this essentially takes the existing dnsmasq.conf file in the routers /tmp directory and edits it to include a pointer to a different resolv-file (which will be used when the 3G connection is brought up - but you will see that later). The script also loads the required 3G modules and starts the important 3G.sh script (which is the failover script).
There are other startup scripts in the /jffs directory with the next important one being the firewall script fw.sh

The 3G.sh script monitors the primary WAN by pinging 4 defined DNS servers, when the WAN goes down the 3G connection is brought up on ppp99 using the options.pppoe file in the files directory. Furthermore, the relevant DNS servers (ISP assigned) are symbolically linked in the /tmp directory (to ensure DNS works) and the firewall script is run to ensure the correct interfaces are included in the iptables rules (hence the fixing of the 3G pppd interface number to ppp99)

Once the 3G connection is up, the script monitors the primary WAN connection to see if it comes back up. Once the primary WAN is back up the router terminates the 3G connection and restores the primary WAN connection - starting the loop again. I have included a flowchart of the failover script. Again like I said not very elegant but it does work.

I have included a script called ChangeWAN.sesbutton that allows you to switch the WAN using the SES EZSETUP button - still experimental. There are a lot of other files which you can edit for your own purposes i.e. emailing failover stats.

It has been a lot of fun putting this together and I look forward to watching the ingenious edits to my scripts and setup over the next coming weeks and months from the relevant forum members.

Cheers,
Fausto Di Trapani
FaustoDT
DD-WRT Novice


Joined: 26 Nov 2013
Posts: 5

PostPosted: Wed Nov 27, 2013 9:13    Post subject: Reply with quote
Updated scripts attached.
eriche
DD-WRT User


Joined: 02 Feb 2008
Posts: 69

PostPosted: Fri Nov 29, 2013 8:41    Post subject: Reply with quote
is this also possible without JFFS enabled Question
I just use my OPT with Optware the right way 1

GreeT`s Erich
FaustoDT
DD-WRT Novice


Joined: 26 Nov 2013
Posts: 5

PostPosted: Fri Nov 29, 2013 10:28    Post subject: Reply with quote
You should be able to extract the scripts in the zip file to the /opt directory as opposed to the /jffs directory.

You would need to edit all the links in the scripts that refer to the /jffs directory.

Cheers.
shdwkeeper
DD-WRT Novice


Joined: 10 Aug 2015
Posts: 12

PostPosted: Tue Aug 11, 2015 2:37    Post subject: Reply with quote
I'm using an R7000 router and I have a Franklin Wireless U600 3G USB modem and this isn't working, what do I need to change to get this working. I tried changing this "connect "COMGTDIAL='ATDT#777'" but it never dials out and connects. I also removed insmod sierra and insmod usbserial and added insmod cdc-acm.ko

I'm on the latest dd-wrt build 08/05/2015.
ant0nwax
DD-WRT Novice


Joined: 05 Feb 2018
Posts: 2

PostPosted: Tue Feb 06, 2018 7:35    Post subject: Reply with quote
@FaustoDT

Thanks for your contribution, I downloaded the updated Failover.zip package and will dive into this challange with my setup. I do not know nothing about DDWRT until today, just that my USB 3G Modem is working with the WEBGUI. My plan is a little bit different than yours, but the exercise to get this running on one router will help me to understand DDWRT. I will split the 3G and the cable connections to two different routers, that sync each other Smile my requirements are defined here: https://www.dd-wrt.com/phpBB2/viewtopic.php?t=313700, if you are curious, you may take a look and of course you may comment or vote Smile
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum