4 internet connections - no mwan3 - 2 lan

Hello,
I have 4 internet (1-2-3-4) connections and two LAN (1-2)
Internet connection 1-2 for LAN1 with manual or automatic failover
Internet connection 3-4 for LAN2 with manual or automatic failover.
**All internet connections have a DHCP to the carrier.
**Using MWAN3 is not an option.
Now I know the best way to do this is to use VRF with different network metrics... but apparently it's not available in OpenWRT.
** I do not want to do load-balancing. LAN1 uses only one internet connection at a time. Same goes for LAN2 (one internet connection at a time)
I don't mind scripting either. I just can't come up with a good Solution other than using VRFs.

why is mwan3 not an option?

mwan3 is designed to do exactly what you want. You don't have to load balance. I don't

1 Like

because I want the two lans to have independant failover.

MWAN is not an option because when it find that an interface looses internet access it disables it from being access by the lan. In our case, let's pretend its a cell modem and you change the SIM... you loose internet access until you change the APN. With MWAN3 disabling the routing to that network interface, I won't be able to logon the modem page to change the apn

I presume the modem has it's own private IP address for the management interface.

So create a new interface, add it to the WAN zone with a static ip addfress on the same network as the modem, make the physical interface an alias to the wan interface to which the modem is connected.

Don't add this interface to mwan3 - ie. unmanaged. Then if that internet link goes down, mwan3 won't try to route internet traffic out that link, but you'll still be able to access the modem configuration by way of the modem interface you've defined.

This is what I do for both my links so that I can always access the modem's configuration interface.

1 Like

Here is another constraint.

All internet link have to be in DHCP.
It's quite easy to do for technical people but super complicated for non-technical people thus making this solution almost impossible.

Hence the complication :slight_smile: and this post.

My wan links are both DHCP. This is not a constraint. mwan3 can do everything you want.

I'll admit that it's usage is not intuitive. There is a learning curve. You'll need to read the documentation multiple times.

1 Like

What mwan3 will do when an interface is down is not to send internet traffic over that link. Any routes, static or connected via that interface are still present in the custom routing table. Have you tried and failed or are you speculating it will work like this?

1 Like

I see I see.

I'm getting interested.

Let me see what I can do with mwan3

Actually I haven't tried personally. Apparently an MWan3 expert told me this. So I took it for granted.

If I've been indicated wrong then hmmmmm

My favourite quote about experts is: an ex is a has-been, and a spurt is a drip under pressure.

My perimeter router is an Ubiquiti Edgerouter, and it's connected to a pair of Internet links. One is PPPOE, and the other is DHCP into a cellular bridge (Netgear LB2120 in bridge mode).

Focusing on the DHCP link, if the cellular link is up, then that interface gets an IP address from the ISP. If that link is down, that interface gets a local address directly from the bridge itself and the bridge can still be reached and administered.

From the perspective of the router's routing table, if the cellular link is down then the bridge's IP address is still "directly connected" anyway, which means it should always be available under normal circumstances.

1 Like

Alright. Everyone.

I think we're getting off topic.

Let me dig deeper.

WAN 1-2-3-4

Each time WAN1 is active for LAN1 , WAN3 need to be active at the same time for LAN2.

Each time WAN2 is active for LAN1, WAN4 needs to be active for LAN2.
As you can see above the sate of Wan 3 and 4 depends on the status of their counterpart LAN 1 and 2 respectively.
In absolutely no circumstances should LAN1 and 2 communicate. They need to be completely isolated.

That's why I'm polling you guys.
If I was in the Cisco world a quick vrf with a ping script and boom problem solved. But apparently this is not possible in the Openwrt world.

Now I found this :https://forum.openwrt.org/t/mark-incoming-packets-to-use-a-secondary-routing-table/48948

But this is a bit out of my knowledge perimeter.
Is that the only of using a second routing table for a second LAN?

This might be a dim question, but why not use two routers and air-gap LAN 1 and LAN 2?

LAN 1 could be connected to one router, in turn connected to WAN 1 and WAN 2. LAN 2 could be connected to another router, in turn connected to WAN 3 and WAN 4.

Is there a hard requirement to achieve your result with a single piece of equipment?

Yes exactly! That's like THE only main requirement of the project Hahaha.

One router that does the automatic failover between the two pair of wans.

Discussing with a colleague,
We kind of agree to put 4 DHCP connections for the wans
Then a script that would take the dhcp default gateway and put it In a static route with the lan.
And then if there's a failure, the script would then recreate the 0.0.0.0 route using the second Wan.
So the route would look something like this in the script

Source LAN1 Target 0.0.0.0 via VariableWan1-2
Source LAN2 Target 0.0.0.0 via VariableWan3-4

I would it be better to use the suggestion I posted in the previous post with the other routing table?

This prerequisite is out of the ordinary and out of the box mwan3 won't satisfy.
Still you can manually trigger an event to bring down wan3 when wan1 is down. Then you'd have to keep it down till wan1 is up again.

It's possible.but how would the failover happen?

In Mwan3 I can put groups of Wan for different lans?

You can read in Notification tab for possible scripts you can create when one wan is disconnected.

Yes, you can.

1 Like