Hey,
I’m setting up dual-WAN on an OpenWrt router using mwan3. The main WAN (wan) works fine, but when I unplug it, my second connection (wan2) doesn’t pass traffic even though it gets an IP and default route.
Here’s the setup:
I have two routers that are on the other sides of my house connected via a single trunk cable.
- Router 1 (10.0.0.1/16) is connected to ISP 1 (192.168.18.0/24)
- Router 2 (10.0.0.2/16) is connected to ISP 2 (192.168.19.0/24)
- Router 1 and Router 2 are connected to each other via lan ports
- Here is the vlan setup between the two routers, which shoud all be working no problem:
On router 1:
- wan: physical port, DHCP from ISP1
- wan2: VLAN 20 on br-lan (device br-lan.20), DHCP from ISP2
Symptoms
ping -I br-lan.20 8.8.8.8fails or drops first few packets, however DOES work after the 4th packet.curl --interface wan google.comworks.curl --interface br-lan.20 google.comfails to connect.curl --interface wan2 google.comreturns “Invalid argument”.ip routeandip rulelook correct; routes and metrics are in place.
Default Routes
default via 192.168.19.1 dev br-lan.20 proto static src 192.168.19.9 metric 10
default via 192.168.18.1 dev wan proto static src 192.168.18.93 metric 20
ip rule
1001: from all iif wan lookup 1
1003: from all iif br-lan.20 lookup 3
2001: from all fwmark 0x100/0x3f00 lookup 1
2003: from all fwmark 0x300/0x3f00 lookup 3
...
Everything appears properly configured, but packets sent via br-lan.20 never reach the Internet. arp and neigh tables show valid entries for the local gateway.
Firewall config
Here is the full firewall, plus maybe the relevant part below. My hunch is that maybe firewall is the source of problems here? I have absolutely no idea though.
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan2'
The biggest source of confusion to me is the fact that:
- I am able to ping 192.168.18.1 and 192.168.19.1 and use their interfaces (wan and
br-lan.20respectively) to ping e.g.1.1.1.1, BUT the first 4 packets when I usebr-lan.20always get dropped for some reason:
root@main-rt01:~# ping -c 5 -I wan 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: seq=0 ttl=57 time=3.004 ms
64 bytes from 1.1.1.1: seq=1 ttl=57 time=2.724 ms
64 bytes from 1.1.1.1: seq=2 ttl=57 time=2.674 ms
64 bytes from 1.1.1.1: seq=3 ttl=57 time=2.999 ms
64 bytes from 1.1.1.1: seq=4 ttl=57 time=2.778 ms
--- 1.1.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 2.674/2.835/3.004 ms
root@main-rt01:~# ping -I br-lan.20 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: seq=4 ttl=58 time=4.069 ms
64 bytes from 1.1.1.1: seq=5 ttl=58 time=3.589 ms
64 bytes from 1.1.1.1: seq=6 ttl=58 time=3.860 ms
64 bytes from 1.1.1.1: seq=7 ttl=58 time=3.784 ms
64 bytes from 1.1.1.1: seq=8 ttl=58 time=3.860 ms
64 bytes from 1.1.1.1: seq=9 ttl=58 time=3.734 ms
^C
--- 1.1.1.1 ping statistics ---
10 packets transmitted, 6 packets received, 40% packet loss
round-trip min/avg/max = 3.589/3.816/4.069 ms
root@main-rt01:~#
curldoesn't work at all onbr-lan.20:
root@main-rt01:~# curl --interface wan google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
root@main-rt01:~# curl --interface br-lan.20 google.com
curl: (7) Failed to connect to google.com port 80 after 3093 ms: Error
I feel like I'm very close to getting mwan up and running, but I don't know what's the last thing I need, I would appreciate all help, please let me know if you need any more information.
Thank you in advance!




