R7800 Dual WAN Failover with DHCP

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
looselyhuman
DD-WRT Novice


Joined: 19 Jun 2020
Posts: 17

PostPosted: Tue Jul 07, 2020 2:28    Post subject: R7800 Dual WAN Failover with DHCP Reply with quote
Hi awesome people.

I've got an R7800 running DD-WRT v3.0-r40559 std (08/06/19).

It's an internal gateway (not edge router) and OpenVPN client, serving a dedicated VPN subnet. It was pretty tricky to get it running near flawlessly. So, now I want to screw it up, obviously.

Xfinity was down for about an hour today. So, I pulled out my old GLI MT300N mini router, plugged my Samsung S9 into its USB port, and plugged my edge router's WAN port into its LAN port. Slow but functional. Two Netflix watchers barely noticed.

As a test case, I'd like to automate this to some extent, by having a dual WAN with failover -- but on the R7800 VPN router for now.

Ideally I would ditch the MT300N, but a few attempts at getting USB0 up and running in DD_WRT turned me off. For now I'm happy to focus on having two WAN ethernet ports and let the mini handle USB, which it does really well.

Tl;dr requirements:
- Maintain primary role as gateway and VPN client, including kill switch and some iptables and dnsmasq rules to handle local network traffic even when vpn is down.
- Allow failover to secondary WAN when primary is down.
- Have this not break the GUI (see my notes about the VLANs below).

Current port setup, pretty vanilla:
- Port 5 is WAN (DHCP client). Switch config shows vlan2.
- Ports 1-3 are LAN and unused, switch config shows vlan1.
- Port 4 is connected to the LAN port of the MT300N, this can be static or DHCP but I'd prefer DHCP. Switch config shows vlan1.
- vlan0 is empty, at least in the GUI

I've checked out the instructions here: https://wiki.dd-wrt.com/wiki/index.php/Dual_WAN_with_failover. But without a DHCP example I lose the plot pretty quickly. I am also a little confused by the disconnect between the VLAN GUI and what's reported by nvram - this is actually what freaked me out when I was trying the instructions - I ended up with 3 VLANs reported by nvram and nothing matched the GUI..

GUI:

nvram:
Code:
nvram show | grep vlan.*ports | sort
size: 33252 bytes (97820 left)
vlan0ports=1 2 3 5*
vlan1ports=0 5
vlan2ports=0 5


So, if anyone is bored enough to walk me through this, let me know! Smile

EDIT: pics
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Tue Jul 07, 2020 3:07    Post subject: Reply with quote
Upgrade to 43516 or 43652. See my signature for details on where to download firmware images.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
looselyhuman
DD-WRT Novice


Joined: 19 Jun 2020
Posts: 17

PostPosted: Tue Jul 07, 2020 3:31    Post subject: Reply with quote
kernel-panic69 wrote:
Upgrade to 43516 or 43652. See my signature for details on where to download firmware images.

Ok I'll go to 652. Anything to watch out for?
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Tue Jul 07, 2020 6:12    Post subject: Reply with quote
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=325640

Reason for telling you to upgrade is because 40559 is not an ideal build to be running unless you want to run into issues.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Per Yngve Berg
DD-WRT Guru


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

PostPosted: Tue Jul 07, 2020 18:02    Post subject: Re: R7800 Dual WAN Failover with DHCP Reply with quote
looselyhuman wrote:
nvram show | grep vlan.*ports | sort
size: 33252 bytes (97820 left)
vlan0ports=1 2 3 5*
vlan1ports=0 5
vlan2ports=0 5


These nvram variables is for Broadcom routers. On Atheros, the swconfig utility is used.

swconfig dev switch0 show.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Tue Jul 07, 2020 18:29    Post subject: Reply with quote
R7800 and VLANS

Totally forgot to link that thread earlier. May be of some help Smile

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
looselyhuman
DD-WRT Novice


Joined: 19 Jun 2020
Posts: 17

PostPosted: Wed Jul 08, 2020 22:34    Post subject: Reply with quote
kernel-panic69 wrote:
R7800 and VLANS

Totally forgot to link that thread earlier. May be of some help Smile

Got it - a shitload of good info - thanks panic.

For now, I landed on just physically swapping the WAN port ethernet whenever I want to use mobile data.

Android issues actually cooled me off me on the whole idea. It's almost impossible to get an S9 to (consistently) turn on tethering, without manual intervention.

Maybe I could do a wireless bridge (phone hotspot) for failover, but, that would probably be an even bigger config nightmare. Plus, no reason to think the hotspot will be more reliable than the USB tether.

Oh well. Xfinity is back up. Smile
looselyhuman
DD-WRT Novice


Joined: 19 Jun 2020
Posts: 17

PostPosted: Wed Jul 08, 2020 22:36    Post subject: Re: R7800 Dual WAN Failover with DHCP Reply with quote
Per Yngve Berg wrote:
looselyhuman wrote:
nvram show | grep vlan.*ports | sort
size: 33252 bytes (97820 left)
vlan0ports=1 2 3 5*
vlan1ports=0 5
vlan2ports=0 5


These nvram variables is for Broadcom routers. On Atheros, the swconfig utility is used.

swconfig dev switch0 show.

Per - thanks you for this. It's exacty what I needed to know. The world makes so much more sense now.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware 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