Basic support for multiple WANs (netifd & default gateway)
Stefan Kalscheuer
stefan at stklcode.de
Sat Sep 3 04:53:32 PDT 2022
Hi Rafał,
I'm using a similar setup for quite some time with 2 WAN interfaces on
OpenWrt 22.03 SNAPSHOT:
* "wan" - statically routed, native dual stack fiber uplink
* "wwan" - uqmi 4G upstream with dynamically assigned dual stack (DHCP)
Configured both interfaces with "use default gateway" and gateway metric
("metric") of 0 and 2000 respectively.
Results in default routing like this::
default via 172.16.100.1 dev eth2 proto static
default via 10.142.198.233 dev wwan0 proto static src 10.142.198.234
metric 2000
default via 2001:****:... dev eth2 proto static metric 1024 pref medium
default via 2a02:****:... dev wwan0 proto static metric 2000 pref medium
Works for me without additional changes. Traffic is routed over "wan" as
long as it's up and automatically switches to "wwan" when I disable the
interface or pull the cable.
I decided against mwan3 for now, because I don't need advanced features
either and I do have some scenarios, where I must route certain traffic
over a specific uplink, so I got a hand full of static routes and
scripts anyway.
There are some downsides, if the interface is not actually "down", but
simply fails forwarding traffic or just one protocol (v4/v6) goes down.
Also both interfaces have to stay up permanently, unless you add some
trigger scripts.
Cheers,
Stefan
More information about the openwrt-devel
mailing list