LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-02-2018, 05:46 AM   #1
silent001
LQ Newbie
 
Registered: May 2018
Posts: 3

Rep: Reputation: Disabled
Raspberry pi as wan failover with 3G


Good day everyone. So to start I just want to say I am really new with networking and linux so forgive me if my questions are rather simple but here goes.
I have a Asus RT-AC3200 router that links to my ONT to give me internet to the house. I have a raspberry pi 3 on Raspbian(port of debian 8) on the network monitoring my whole network and other things. I have a 3G usb dongle on my raspberry pi to sms me if there is a power outage at home (network is on a ups) and my router as a dual wan feature for any of my Ethernet ports or usb port for 3G modem usage as a failover if the network is down. Now what I am looking for is a solution that I can use to possible make my raspberry pi connect to the 3G modem and use that as a failover but only if the main internet is down. And disconnect when the main internet is back up but I need it to give internet to the network and also notify me once the main wan is down. How can I do this. I was thinking of catching the request from the router to the raspberry pi asking for internet the making the raspberry pi connect to the internet using the usb modem. Then when the router detects it has its main internet back it will switch back to that and then somehow it must stop asking the raspberry pi for internet thus making the raspberry pi disconnect from the 3G modem. I don't want the 3G network on all the time as this will cost more than the main internet. Any suggestions and simple explorations would help please. Also if you need more information please do ask.
 
Old 05-02-2018, 01:31 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,987

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
I've had a few Asus routers and every one of them had the ability to use a usb modem as failover. I ran one that way for a year with a tmobile usb attached hotspot till the battery died.

However it may be possible to configure the pi to act in this but it will be rather complex I'd think. Some sort of ping maybe or other means to monitor and then a watch script to disconnect and tc command maybe to limit.

Last edited by jefro; 05-02-2018 at 01:32 PM.
 
Old 05-02-2018, 02:06 PM   #3
silent001
LQ Newbie
 
Registered: May 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you jefro. I am aware that it works. But I need to notify myself that it has gone over to the 3G and no longer on the normal fixed line. We all know that 3G data if left unmanaged on a normal uncapped network will end with huge $$$$$$$ at the end of the month. I did notice that I can use the lan port as failover and have the option for PPP and was thinking of maybe using the pi as a PPP server somehow and only connected over the 3G when the PPP credentials are supplied and when there is no request to disconnect. Like I say I am still very new to the networking thing and I need backup internet as I am not always home to sort it out but I want somehow to sort it out from anywhere. I already can VPN in on my network to sort out some internal issues but a VPN won't work if there is no internet.
 
Old 05-02-2018, 02:34 PM   #4
silent001
LQ Newbie
 
Registered: May 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Here is my thought process so far using the two options available for dual wan with failover built into the RT-AC3200:

Rpi3G = Raspberry Pi 3 with 3G modem
Router = Asus RT-AC3200 router

Option 1 (prefered):
1. Router connected to main internet
1.a Rpi3G connect as guest on network
2. Router lose internet
3. Router ask Rpi3G over Ethernet for internet.
3.a Rpi3G detect request and send sms
3.b Rpi3G connect to internet over 3G SUB
3.c Rpi3G give internet to router
3.d Rpi3G act as guest on network to other devices
4. Router on 3G internet
5. Router detect main internet return
6. Router connect to main internet
6.a Rpi3G disconnect 3G

Option 2:
Connect usb to router and use 3G as failover directly.
Use pi to test somehow if the router has gone over to 3G and send me sms notification soon change to and from 3G
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Webserver failover (over WAN) lp449 Linux - Server 8 03-05-2013 10:49 AM
load balancing / wan failover fdelval Linux - Networking 4 07-23-2010 08:13 PM
Dual WAN failover kool_kid Linux - Networking 3 07-16-2010 08:26 AM
FreeS/Wan Vs. OpenS/Wan Vs. StrongS/Wan bkankur Linux - Security 1 03-01-2005 09:27 AM
WAN : unable to ping to WAN ckl Linux - Networking 0 11-18-2004 01:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration