Dual WAN Configuration

Report wireless and/or network connectivity problems in this forum.

Moderator: Moderators

Post Reply
stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

Dual WAN Configuration

Post by stuartbh »

Gargoylers,

Can anyone tell me if such functionality is currently available and how to configure it.

I wish to have a Wired WAN connection and a Wireless WAN connection simultaneously one router. Then, I'd want to give some clients one gateway whilst giving other clients the other gateway (could be based on IP address or MAC address).

If the above entitled configuration is not possible, what about this idea?

I am also open to using a 2nd router (also with Gargoyle on it) and then setting up spanning tree protocol between them. Is there any reason to think this would not work?

Thus, a client could connect to "WiFi 1" and get the wired WAN port, connect to "WiFi 2" and the wireless WAN port, and clients could talk to each other between the routers. I'd even imagine if one of the connections went out the other router would route traffic to it's WAN, no?

Any comments would be most welcome...
Very Respectfully,

Stuart, N3GWG
Computer Scientist

RomanHK
Posts: 794
Joined: Sat May 04, 2013 4:18 pm
Location: Czech Republik

Re: Dual WAN Configuration

Post by RomanHK »

What you want in OpenWrt is called Multiwan: https://openwrt.org/docs/guide-user/net ... iwan/mwan3 . But I've never done a configuration. But it depends on the kernel of the system and therefore it will not work in Gargoyle. You can compile your own or use OpenWrt.

I do not recommend using the STP protocol, it should be used only as a protection and not for network communication - that would be too simple and would not require a Multiwan package.
Turris Omnia with OpenWrt 21.02 - Tested
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0

http://gargoyle.romanhk.cz custom builds by gargoyle users

stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

Re: Dual WAN Configuration

Post by stuartbh »

Roman,

Well it seems like multiwan would be a good solution if I wanted to use one router to have both WAN connections (which I did consider), however, it not being part of Gargoyle upgrades would be a huge pain so I am forgoing using multiwan for now.

Why do you think using STP is a problem? I was confused about your comment stating it was too simple, that made no sense.

I am curious to understand how I might accomplish allowing flow of LAN traffic between two Gargoyle routers, each with its own WAN connection but allowing LAN traffic to flow freely between them.

Router 1:
LAN: 192.168.70.0/24
WAN: DHCP from internet provider
WiFi SSD: router1

Router 2:
LAN 192.168.71.0/24
WAN: DHCP from internet provider
WiFi SSID: router2

I am not sure it would be best to have one DHCP server or two (I presume it'd be simpler to maintain just one DHCP server). But, I'd like a client that gets a 192.168.70.0/24 IP address to go to router1's WAN, a client that gets a 192.168.71.0/24 IP to go to router2's WAN, and for clients on 192.168.70.0/24 LAN to be able to talk to clients on 192.168.71.0/24 LAN and vice versa. I am also open to setting things up with just one subnet of say 192.168.70.0/24 for both routers if that might be easier. What say you?

I am indifferent to if I have one or two DHCP servers. I'd just like the 192.168.70.0/24 LAN segment on router 1 to be able to speak freely with the 192.168.71.0/24 LAN segment on router 2 and vice versa. However, the default gateway for 192.168.70.0/24 clients would be its router1's WAN port and the default gateway for 192.168.71.0/24 clients would be router2's WAN port.
Very Respectfully,

Stuart, N3GWG
Computer Scientist

RomanHK
Posts: 794
Joined: Sat May 04, 2013 4:18 pm
Location: Czech Republik

Re: Dual WAN Configuration

Post by RomanHK »

stuartbh wrote: Why do you think using STP is a problem? I was confused about your comment stating it was too simple, that made no sense.
The STP protocol (wiki) is used as a loop security - I can't imagine how you force PC1 to use Gargoyle1 and PC2 to use Gargoyle2 or vice versa.

What you actually want can be achieved with two routers with one DHCP server and switching gateways between them - this will meet all your requirements. DHCP server configuration only manual and if possible avoid using Gargoyle GUI for configuration override. Personally, I see one subnet as the best solution.

:idea: Ex.
PC1:
MAC: 00:19:db:f7:f8:7d
It should use the Gargoyle router nr.1

PC2:
MAC: 00:19:db:f7:f8:7e
It should use the Gargoyle router nr.2

Gargoyle router (secondary) nr.2: IP: 192.168.70.2, DHCP off

Gargoyle router (main) nr.1: IP: 192.168.70.1, DHCP on (eg pool 192.168.70.10-192.168.70.254) and edit the /etc/config/dhcp.conf file and add these lines:

Code: Select all

config host
	option name 'PC1'
	option dns '1'
	option mac '00:19:db:f7:f8:7d'
	option ip '192.168.70.10'
	option tag 'router1'

config host
	option name 'PC2'
	option dns '1'
	option mac '00:19:db:f7:f8:7e'
	option ip '192.168.70.11'
	option tag 'router2'

config tag 'router1'
	list dhcp_option '1,255.255.255.0'
	list dhcp_option '3,192.168.70.1'
	list dhcp_option '6,192.168.70.1'

config tag 'router2'
	list dhcp_option '1,255.255.255.0'
	list dhcp_option '3,192.168.70.2'
	list dhcp_option '6,192.168.70.2'
Then restart the DHCP server:

Code: Select all

/etc/init.d/dnsmasq restart
and it should all work.
Turris Omnia with OpenWrt 21.02 - Tested
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0

http://gargoyle.romanhk.cz custom builds by gargoyle users

stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

Re: Dual WAN Configuration

Post by stuartbh »

One point of reference: 1. I am running Gargoyle version 1.12 on both routers.
RomanHK wrote:
Fri Feb 28, 2020 8:43 pm
What you actually want can be achieved with two routers with one DHCP server and switching gateways between them - this will meet all your requirements. DHCP server configuration only manual and if possible avoid using Gargoyle GUI for configuration override. Personally, I see one subnet as the best solution.
I want to keep my DHCP assignments managed by the GUI and to be able to see them all there. Will assigning DHCP this way remove them from being visible in the GUI? If so, this solution seems not so good for me. However, I do like the idea of having just one DHCP server.
RomanHK wrote:
Fri Feb 28, 2020 8:43 pm
:idea: Ex.
PC1:
MAC: 00:19:db:f7:f8:7d
It should use the Gargoyle router nr.1

PC2:
MAC: 00:19:db:f7:f8:7e
It should use the Gargoyle router nr.2

Gargoyle router (secondary) nr.2: IP: 192.168.70.2, DHCP off

Gargoyle router (main) nr.1: IP: 192.168.70.1, DHCP on (eg pool 192.168.70.10-192.168.70.254) and edit the /etc/config/dhcp.conf file and add these lines:

Code: Select all

config host
	option name 'PC1'
	option dns '1'
	option mac '00:19:db:f7:f8:7d'
	option ip '192.168.70.10'
	option tag 'router1'

config host
	option name 'PC2'
	option dns '1'
	option mac '00:19:db:f7:f8:7e'
	option ip '192.168.70.11'
	option tag 'router2'

config tag 'router1'
	list dhcp_option '1,255.255.255.0'
	list dhcp_option '3,192.168.70.1'
	list dhcp_option '6,192.168.70.1'

config tag 'router2'
	list dhcp_option '1,255.255.255.0'
	list dhcp_option '3,192.168.70.2'
	list dhcp_option '6,192.168.70.2'
Then restart the DHCP server:

Code: Select all

/etc/init.d/dnsmasq restart
and it should all work.
I could not locate the /etc/config/dhcp.conf file, the only file I could find that was even close was /etc/config/dhcp. Is that the file you mean to have me modify?

This seems like a very cuircutious solution. I would think that if I assigned the MAC address (via DHCP) a different IP range (192.168.70.x vs 192.168.71.x) that there would be some way in the router to force it to know which gateway to use based on the range of the IP address. Does not RIP or RIPv2 do something like this? In fact, I thought that using a routing protocol like RIP also means if the 71.x router goes offline then the traffic would get automatically routed to the 70.x gateway. Your solution seems to avoid this kind of routing and I am thinking that Gargoyle is just not capable of using routing protocls which is odd, since OpenWRT (it's 'mother') is perfectly capable of doing that, no?
Very Respectfully,

Stuart, N3GWG
Computer Scientist

RomanHK
Posts: 794
Joined: Sat May 04, 2013 4:18 pm
Location: Czech Republik

Re: Dual WAN Configuration

Post by RomanHK »

stuartbh wrote: I want to keep my DHCP assignments managed by the GUI and to be able to see them all there. Will assigning DHCP this way remove them from being visible in the GUI?
Work and visibility via the GUI is not possible in this case because it is a custom user interface that you have to program yourself. In addition, Gargoyle doesn't even work with this command and uses /etc/host and /etc/ethers files to assign clients.

stuartbh wrote: I could not locate the /etc/config/dhcp.conf file, the only file I could find that was even close was /etc/config/dhcp. Is that the file you mean to have me modify?
Yes, right, I'm sorry. This is the /etc/config/dhcp file.

What I have further understood is probably a backup solution for dropping WAN1 (router1) to take over the communication WAN2 (router2) and after re-launching WAN1 the situation came back - the so-called "backup WAN".

So I won't help you, that's a very specific solution. I don't know RIP, I can't do static routing.
Turris Omnia with OpenWrt 21.02 - Tested
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0

http://gargoyle.romanhk.cz custom builds by gargoyle users

Post Reply