Posted: Wed Mar 09, 2011 4:21 Post subject: Steps to get 3g failover with DSL service
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.
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?
Posted: Sun Apr 14, 2013 10:33 Post subject: auto switch to 3G in case of failure to connect default WAN
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
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.
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
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 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