Auto-reconnect on 3G without reboot?

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


Joined: 25 Mar 2017
Posts: 15

PostPosted: Thu Sep 14, 2017 17:20    Post subject: Auto-reconnect on 3G without reboot? Reply with quote
Is it possible to set up a router so that it automatically detects failing internet-connectivity and automatically reconnects by 3G-dialup?

Any confirmation, positive or negative, is appreciated.
Sponsor
sploit
DD-WRT User


Joined: 16 Apr 2016
Posts: 307
Location: California

PostPosted: Fri Sep 15, 2017 7:51    Post subject: Custom Watchdog Reply with quote
Yes, you would need to use a custom watchdog script like one I just created for the openvpn tunnels.

Except this one would monitor the WAN interface and simply WAN down then WAN up I believe.
In certain cases possibly power on/off the usb as well could be an option.

(Maybe more than that depending on the setup)

I could program this is I was able to see it and get the data.

_________________
My Karma ran over your Dogma
SploitWorks Custom Flashed Routers
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6868
Location: Romerike, Norway

PostPosted: Fri Sep 15, 2017 9:38    Post subject: Reply with quote
See the "Dual WAN" tutorials in the Wiki.
sabroe
DD-WRT Novice


Joined: 25 Mar 2017
Posts: 15

PostPosted: Fri Sep 15, 2017 20:18    Post subject: Reply with quote
Very good, it is possible. Good news, thank you both!

Now, if I got my router up to a newer r33345, got SSH-access, enabled JFFS2 to allow for some startup script like e.g. a variant of "failover.startup" found on the https://www.dd-wrt.com/wiki/index.php/Dual_WAN_with_failover page, what are the actual commands to bring the WAN down and up again by dialup as already set in the web-ui?

Is it a "ifconfig" command involving my "eth0" like what I see in "wan2up.startup" or is it a more elaborate script? What are the commands?

The second diode on my router reflects WAN-connectivity. Normally blue, but when the 3G-connection to the internet is lost, it goes orange (Linksys 1200ACv2). As things are out of the box, the diode appears to be a reliable indication of the state of internet-connectivity. Will reconnecting continue to be reflected in this diode as in "turn it back to blue once re-connected"?

From the below command, I suspect that the network interface for my WAN is "eth0".

Code:

root@enterprise:~# nvram show | grep wan | grep ifname
size: 27848 bytes (37688 left)
wan_ifname=
wan_ifname2=eth0
wan_ifnames=
sabroe
DD-WRT Novice


Joined: 25 Mar 2017
Posts: 15

PostPosted: Mon Sep 25, 2017 20:03    Post subject: stopservice wan, startservice wan Reply with quote
Okay, it does very much appear as if the commands I seek to do "up" and "down" on the WAN of mine might be these:

Code:

root@enterprise:/# stopservice wan
No such device
No such device


Code:

root@enterprise:/# startservice wan
cat: can't open '/proc/net/ip_conntrack_flush': No such file or directory
0
No such device
D-Link DWM-157 B1 detected
stty: standard input: cannot perform all requested operations
stty: standard input: cannot perform all requested operations


The commands do produce some not-too-sound looking output, but the "stopservice" command does disconnect the router from the internet and the "startservice" command does connect the router again. Right now, I have testet it with some live streaming and I am happy to see the LED for WAN-connectivity go to the disconnected orange color on stopservice and turn back on to the connected blue color on startservice. I also note that the startservice command by output appears to look at and use my 3G dongle (D-Link DWM-157 rev. B).

Some further experimentation is necessary.
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