OpenWrt Forum Archive

Topic: mwan3; multi-wan policy routing (general topic)

The content of this topic has been archived between 22 May 2013 and 6 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Adze

Would you have any idea why sqm-scripts seems to somehow disable and replace the mwan3 rules? 

If you want, I can do some testing for you. 

Now I need to disable SQM so that I can setup and test the mwan3 rules.  And then I can activate SQM again.

Is there a way to test what traffic goes to what wan interface?  It would simplify my troubleshooting. 

I've heard of wireshark but I am not sure how to set it up to examine the router.

(Last edited by bobptz on 29 Dec 2015, 21:04)

bobptz wrote:

Is there a way to test what traffic goes to what wan interface?  It would simplify my troubleshooting.

Install tcpdump package on your router.

arfett wrote:
bobptz wrote:

Is there a way to test what traffic goes to what wan interface?  It would simplify my troubleshooting.

Install tcpdump package on your router.

Thank you.  And then I can examine the output through wireshark on my pc.  Already made a guide how to set this up:
http://bbb-solutions.blogspot.gr/2015/1 … shark.html

Hi

Here's troubleshooting data as requested on github, with masked mac and ip addresses:

Software versions : 

OpenWrt - OpenWrt Designated Driver r47929
LuCI - git-15.351.05963-967bb1f

mwan3 - 2.0-0
mwan3-luci - 1.4-4

Output of "cat /etc/config/mwan3" : 

config interface 'l2tp'
    option enabled '1'
    option reliability '1'
    option count '1'
    option timeout '2'
    option interval '5'
    option down '3'
    option up '3'

config interface 'l2tp2'
    option enabled '1'
    option reliability '1'
    option count '1'
    option timeout '2'
    option interval '5'
    option down '3'
    option up '3'

config interface 'wwan'
    option enabled '1'
    option reliability '1'
    option count '1'
    option timeout '2'
    option interval '5'
    option down '3'
    option up '3'

config member 'l2tp_member'
    option interface 'l2tp'

config member 'l2tp2_member'
    option interface 'l2tp2'

config member 'wwan_member'
    option interface 'wwan'

config policy 'l2tp_only'
    list use_member 'l2tp_member'
    option last_resort 'blackhole'

config policy 'l2tp2_only'
    list use_member 'l2tp2_member'
    option last_resort 'blackhole'

config policy 'wwan_only'
    list use_member 'wwan_member'
    option last_resort 'blackhole'

config rule 'lan'
    option src_ip '192.168.4.0/24'
    option proto 'all'
    option sticky '0'
    option use_policy 'l2tp_only'

config rule 'wlan0_1'
    option src_ip '192.168.5.0/24'
    option proto 'all'
    option sticky '0'
    option use_policy 'l2tp_only'

config rule 'wlan0_2'
    option src_ip '192.168.6.0/24'
    option proto 'all'
    option sticky '0'
    option use_policy 'wwan_only'

config rule 'wlan0_3'
    option src_ip '192.168.7.0/24'
    option proto 'all'
    option sticky '0'
    option use_policy 'l2tp2_only'

config rule 'wlan0_4'
    option src_ip '192.168.8.0/24'
    option proto 'all'
    option sticky '0'
    option use_policy 'l2tp2_only'

config rule 'wlan1_1'
    option proto 'all'
    option sticky '0'
    option src_ip '192.168.10.0/24'
    option use_policy 'l2tp_only'

config rule 'wlan1_2'
    option proto 'all'
    option sticky '0'
    option use_policy 'wwan_only'
    option src_ip '192.168.11.0/24'

config rule 'wlan1_3'
    option proto 'all'
    option sticky '0'
    option use_policy 'l2tp2_only'
    option src_ip '192.168.12.0/24'

config rule 'wlan1_4'
    option proto 'all'
    option sticky '0'
    option use_policy 'l2tp2_only'
    option src_ip '192.168.13.0/24'

config rule 'wlan2_1'
    option proto 'all'
    option sticky '0'
    option src_ip '192.168.14.0/24'
    option use_policy 'l2tp2_only'

Output of "cat /etc/config/network" : 

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config interface 'lan'
    option force_link '1'
    option macaddr 'xx:xx:xx:xx:xx:xx'
    option proto 'static'
    option ipaddr '192.168.4.1'
    option netmask '255.255.255.0'
    option _orig_ifname 'eth0.1 wlan1 radio2.network1'
    option _orig_bridge 'true'
    option ifname 'eth0.1'
    option delegate '0'
    option auto '0'

config interface 'wan'
    option ifname 'eth0.2'
    option force_link '1'
    option macaddr 'xx:xx:xx:xx:xx:xx'
    option proto 'dhcp'
    option delegate '0'
    option auto '0'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option vid '1'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option vid '2'

config interface 'wwan'
    option _orig_ifname 'wlan2'
    option _orig_bridge 'false'
    option proto 'static'
    option delegate '0'
    option netmask '255.255.254.0'
    option broadcast '192.168.1.255'
    option ipaddr '192.168.0.42'
    option dns '208.67.222.222'
    option gateway '192.168.0.1'
    option metric '30'

config interface 'l2tp'
    option proto 'l2tp'
    USERNAME HIDDEN
    PASSWORD HIDDEN
    option delegate '0'
    option metric '10'
    option server '1.2.3.4'

config interface 'wlan0_1'
    option proto 'static'
    option ipaddr '192.168.5.1'
    option netmask '255.255.255.0'
    option delegate '0'

config interface 'wlan0_2'
    option proto 'static'
    option netmask '255.255.255.0'
    option delegate '0'
    option ipaddr '192.168.6.1'

config interface 'wlan0_3'
    option proto 'static'
    option ipaddr '192.168.7.1'
    option netmask '255.255.255.0'
    option delegate '0'

config interface 'wlan0_4'
    option proto 'static'
    option ipaddr '192.168.8.1'
    option netmask '255.255.255.0'
    option delegate '0'

config interface 'wlan1_1'
    option proto 'static'
    option delegate '0'
    option netmask '255.255.255.0'
    option ipaddr '192.168.10.1'

config interface 'wlan1_2'
    option proto 'static'
    option delegate '0'
    option netmask '255.255.255.0'
    option ipaddr '192.168.11.1'

config interface 'wlan1_3'
    option proto 'static'
    option delegate '0'
    option netmask '255.255.255.0'
    option ipaddr '192.168.12.1'

config interface 'wlan1_4'
    option proto 'static'
    option delegate '0'
    option netmask '255.255.255.0'
    option ipaddr '192.168.13.1'

config interface 'wlan2_1'
    option _orig_ifname 'radio2.network2'
    option _orig_bridge 'false'
    option proto 'static'
    option ipaddr '192.168.15.1'
    option netmask '255.255.255.0'
    option delegate '0'

config interface 'l2tp2'
    option proto 'l2tp'
    option delegate '0'
    option server '1.2.2.3'
    USERNAME HIDDEN
    PASSWORD HIDDEN
    option metric '20'

Output of "ifconfig" : 

l2tp-l2tp Link encap:Point-to-Point Protocol  
          inet addr:10.10.1.6  P-t-P:10.10.1.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1410  Metric:1
          RX packets:6469 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4564 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:4453331 (4.2 MiB)  TX bytes:599197 (585.1 KiB)

l2tp-l2tp2 Link encap:Point-to-Point Protocol  
          inet addr:10.10.1.5  P-t-P:10.10.1.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1410  Metric:1
          RX packets:2680 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2290 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:1835687 (1.7 MiB)  TX bytes:251427 (245.5 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:125763 errors:0 dropped:0 overruns:0 frame:0
          TX packets:125763 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:22327239 (21.2 MiB)  TX bytes:22327239 (21.2 MiB)

wlan0     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.5.1  Bcast:192.168.5.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7691676 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9482142 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3825797018 (3.5 GiB)  TX bytes:10778142900 (10.0 GiB)

wlan0-1   Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.6.1  Bcast:192.168.6.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:535966 errors:0 dropped:0 overruns:0 frame:0
          TX packets:506971 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:508378679 (484.8 MiB)  TX bytes:485259856 (462.7 MiB)

wlan0-2   Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.7.1  Bcast:192.168.7.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10436546 errors:0 dropped:18201 overruns:0 frame:0
          TX packets:12551953 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4896928661 (4.5 GiB)  TX bytes:12320509137 (11.4 GiB)

wlan0-3   Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.8.1  Bcast:192.168.8.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:30922 errors:0 dropped:131 overruns:0 frame:0
          TX packets:45767 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2925733 (2.7 MiB)  TX bytes:54461816 (51.9 MiB)

wlan1     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.10.1  Bcast:192.168.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:360 (360.0 B)

wlan1-1   Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.11.1  Bcast:192.168.11.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan1-2   Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.12.1  Bcast:192.168.12.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:337 errors:0 dropped:70 overruns:0 frame:0
          TX packets:215 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:28997 (28.3 KiB)  TX bytes:26085 (25.4 KiB)

wlan1-3   Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.13.1  Bcast:192.168.13.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:360 (360.0 B)

wlan2     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.0.42  Bcast:192.168.1.255  Mask:255.255.254.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6873 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4655 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4827165 (4.6 MiB)  TX bytes:926514 (904.7 KiB)

Output of "route -n" : 

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.10.1.1       0.0.0.0         UG    10     0        0 l2tp-l2tp
0.0.0.0         10.10.1.1       0.0.0.0         UG    20     0        0 l2tp-l2tp2
0.0.0.0         192.168.0.1     0.0.0.0         UG    30     0        0 wlan2
10.10.1.1       0.0.0.0         255.255.255.255 UH    0      0        0 l2tp-l2tp
10.10.1.1       0.0.0.0         255.255.255.255 UH    0      0        0 l2tp-l2tp2
1.2.3.4         10.10.1.1       255.255.255.255 UGH   10     0        0 l2tp-l2tp
1.2.3.4         192.168.0.1     255.255.255.255 UGH   30     0        0 wlan2
1.2.2.3         192.168.0.1     255.255.255.255 UGH   30     0        0 wlan2
192.168.0.0     0.0.0.0         255.255.254.0   U     30     0        0 wlan2
192.168.5.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
192.168.6.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0-1
192.168.7.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0-2
192.168.8.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0-3
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 wlan1
192.168.11.0    0.0.0.0         255.255.255.0   U     0      0        0 wlan1-1
192.168.12.0    0.0.0.0         255.255.255.0   U     0      0        0 wlan1-2
192.168.13.0    0.0.0.0         255.255.255.0   U     0      0        0 wlan1-3

Output of "ip rule show" : 

0:    from all lookup 128 
1:    from all lookup local 
1001:    from all iif l2tp-l2tp lookup main 
1002:    from all iif l2tp-l2tp2 lookup main 
1003:    from all iif wlan2 lookup main 
2001:    from all fwmark 0x100/0xff00 lookup 1 
2002:    from all fwmark 0x200/0xff00 lookup 2 
2003:    from all fwmark 0x300/0xff00 lookup 3 
2253:    from all fwmark 0xfd00/0xff00 blackhole
2254:    from all fwmark 0xfe00/0xff00 unreachable
32766:    from all lookup main 
32767:    from all lookup default

Output of "ip route list table 1-250" : 

1
default via 10.10.1.1 dev l2tp-l2tp 
2
default via 10.10.1.1 dev l2tp-l2tp2 
3
default via 192.168.0.1 dev wlan2

Firewall default output policy (must be ACCEPT) : 

ACCEPT

Output of "iptables -L -t mangle -v -n" : 

Chain PREROUTING (policy ACCEPT 12610 packets, 6277K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 106M   92G mwan3_hook  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
12610 6277K fwmark     all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain INPUT (policy ACCEPT 7567 packets, 4184K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 5030 packets, 2092K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 5030 2092K mssfix     all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain OUTPUT (policy ACCEPT 5562 packets, 1109K bytes)
 pkts bytes target     prot opt in     out     source               destination         
  31M   16G mwan3_hook  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain POSTROUTING (policy ACCEPT 10556 packets, 3199K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain fwmark (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain mssfix (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 TCPMSS     tcp  --  *      eth0.2  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan (mtu_fix) */ TCPMSS clamp to PMTU
   20   880 TCPMSS     tcp  --  *      wlan2   0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan (mtu_fix) */ TCPMSS clamp to PMTU
   18   792 TCPMSS     tcp  --  *      l2tp-l2tp  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* l2tp (mtu_fix) */ TCPMSS clamp to PMTU
  249 12488 TCPMSS     tcp  --  *      l2tp-l2tp2  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* l2tp2 (mtu_fix) */ TCPMSS clamp to PMTU

Chain mwan3_connected (2 references)
 pkts bytes target     prot opt in     out     source               destination         
 105M   92G MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected dst MARK or 0xff00

Chain mwan3_hook (2 references)
 pkts bytes target     prot opt in     out     source               destination         
 137M  108G CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0            CONNMARK restore mask 0xff00
 754K   76M mwan3_ifaces_in  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
 703K   62M mwan3_ifaces_out  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
 699K   60M mwan3_connected  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
 469K   44M mwan3_rules  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
 137M  108G CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0            CONNMARK save mask 0xff00
 134M  107G mwan3_connected  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match ! 0xff00/0xff00

Chain mwan3_iface_in_l2tp (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  l2tp-l2tp *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
   30  2850 MARK       all  --  l2tp-l2tp *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* l2tp */ MARK xset 0x100/0xff00

Chain mwan3_iface_in_l2tp2 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  l2tp-l2tp2 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
    0     0 MARK       all  --  l2tp-l2tp2 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* l2tp2 */ MARK xset 0x200/0xff00

Chain mwan3_iface_in_wwan (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    7   941 MARK       all  --  wlan2  *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
    4   144 MARK       all  --  wlan2  *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wwan */ MARK xset 0x300/0xff00

Chain mwan3_iface_out_l2tp (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    2   672 MARK       all  --  *      *       10.10.1.6            0.0.0.0/0            mark match 0x0/0xff00 /* l2tp */ MARK xset 0x100/0xff00

Chain mwan3_iface_out_l2tp2 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  *      *       10.10.1.5            0.0.0.0/0            mark match 0x0/0xff00 /* l2tp2 */ MARK xset 0x200/0xff00

Chain mwan3_iface_out_wwan (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    2   264 MARK       all  --  *      *       192.168.0.42         0.0.0.0/0            mark match 0x0/0xff00 /* wwan */ MARK xset 0x300/0xff00

Chain mwan3_ifaces_in (1 references)
 pkts bytes target     prot opt in     out     source               destination         
 5427  314K mwan3_iface_in_wwan  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
 5387  310K mwan3_iface_in_l2tp  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
 3354  185K mwan3_iface_in_l2tp2  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00

Chain mwan3_ifaces_out (1 references)
 pkts bytes target     prot opt in     out     source               destination         
 5386  310K mwan3_iface_out_wwan  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
 5357  307K mwan3_iface_out_l2tp  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
 3354  185K mwan3_iface_out_l2tp2  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00

Chain mwan3_policy_l2tp2_only (5 references)
 pkts bytes target     prot opt in     out     source               destination         
 2739  144K MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* l2tp2 1 1 */ MARK xset 0x200/0xff00

Chain mwan3_policy_l2tp_only (3 references)
 pkts bytes target     prot opt in     out     source               destination         
   48  2112 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* l2tp 1 1 */ MARK xset 0x100/0xff00

Chain mwan3_policy_wwan_only (2 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wwan 1 1 */ MARK xset 0x300/0xff00

Chain mwan3_rules (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 mwan3_policy_l2tp_only  all  --  *      *       192.168.4.0/24       0.0.0.0/0            mark match 0x0/0xff00 /* lan */
   48  2112 mwan3_policy_l2tp_only  all  --  *      *       192.168.5.0/24       0.0.0.0/0            mark match 0x0/0xff00 /* wlan0_1 */
    0     0 mwan3_policy_wwan_only  all  --  *      *       192.168.6.0/24       0.0.0.0/0            mark match 0x0/0xff00 /* wlan0_2 */
 2709  142K mwan3_policy_l2tp2_only  all  --  *      *       192.168.7.0/24       0.0.0.0/0            mark match 0x0/0xff00 /* wlan0_3 */
   30  1320 mwan3_policy_l2tp2_only  all  --  *      *       192.168.8.0/24       0.0.0.0/0            mark match 0x0/0xff00 /* wlan0_4 */
    0     0 mwan3_policy_l2tp_only  all  --  *      *       192.168.10.0/24      0.0.0.0/0            mark match 0x0/0xff00 /* wlan1_1 */
    0     0 mwan3_policy_wwan_only  all  --  *      *       192.168.11.0/24      0.0.0.0/0            mark match 0x0/0xff00 /* wlan1_2 */
    0     0 mwan3_policy_l2tp2_only  all  --  *      *       192.168.12.0/24      0.0.0.0/0            mark match 0x0/0xff00 /* wlan1_3 */
    0     0 mwan3_policy_l2tp2_only  all  --  *      *       192.168.13.0/24      0.0.0.0/0            mark match 0x0/0xff00 /* wlan1_4 */
    0     0 mwan3_policy_l2tp2_only  all  --  *      *       192.168.14.0/24      0.0.0.0/0            mark match 0x0/0xff00 /* wlan2_1 */

Hi anarchy99,


I looked at the data and looks ok to me. But to be sure please upgrade to version 2.0-2, because the 2.0-0 version you are using contains a bug which might affect you

Also: (from the wiki)

On routers with just one wan interface (and one default route), there is no issue on which source address to use for new initiated sessions. But with two or more wan interfaces you may wish to have control over this. Up until version 2.0, mwan3 did not respect the already set source address of router originated packets. Packets were load-balanced regardless of source address, based on configured user rules.

As of version 2.0 mwan3 does respect the already set source address. The advantage of this is that an applications can have control over which wan interface to use. The downside of this is that when an application does not specify which source address to use (most of the time) the kernel will pick a source address based on the routing table. In practice this means the default route with the lowest metric is used to determine which source address to use. So if you don't configure a routable loopback address with corresponding more preferred default route, all traffic originating from the router itself will leave the primary wan with the source address of that wan interface, regardless of configured user mwan3 rules.

More info: https://wiki.openwrt.org/doc/howto/mwan … pback_self

this part is an issue:

1.2.3.4         10.10.1.1       255.255.255.255 UGH   10     0        0 l2tp-l2tp
1.2.3.4         192.168.0.1     255.255.255.255 UGH   30     0        0 wlan2
1.2.2.3         192.168.0.1     255.255.255.255 UGH   30     0        0 wlan2

should only have:

1.2.3.4         192.168.0.1     255.255.255.255 UGH   30     0        0 wlan2
1.2.2.3         192.168.0.1     255.255.255.255 UGH   30     0        0 wlan2

tried setting the metric of main wan interface to lowest and then ppp sessions are established through main wan interface regardless of the ppp interfaces reconnections, however routing table still shows:

1.2.3.4         10.10.1.1       255.255.255.255 UGH   10     0        0 l2tp-l2tp
1.2.3.4         192.168.0.1     255.255.255.255 UGH   30     0        0 wlan2
1.2.2.3         192.168.0.1     255.255.255.255 UGH   30     0        0 wlan2

with disadvantage if one ppp connection is stopped, another one breaks too and reconnects. i haven't got chance yet to update mwan3 to 2.0-2 because i'm currently testing router stability but i'll update here once i do.

btw do you think this could be fixed with adding static routes in case there's something wrong with netifd?

arfett wrote:
bobptz wrote:

Is there a way to test what traffic goes to what wan interface?  It would simplify my troubleshooting.

Install tcpdump package on your router.

Would you know where I can find the network interface in wireshark?

The main column fields do not show the network interface.  After I expand the FRAME field, the first line that appears reads:  INTERFACE ID.  Is this what I am looking for? 

If this is the one, then how would I interpret "Interface Id: 0"?  Would this be wan or wan2 ?

(Last edited by bobptz on 4 Jan 2016, 17:44)

Hi, Adze, mwan3 could work with Shadowsocks here, if I did not add any new ipset (this should be the reason of the issue). Some people here may improve in this thread. However currently I am happy with the status.

(Last edited by muronghan on 5 Jan 2016, 15:08)

Hi People,

i am totally unexperienced with source routing and the sort so i'll explain my goal and wish to ask if, and how, this is possible to achieve with mwan3.

I have a cable modem which connects to a TP-Link wr1043nd v1.2 as the router, running OpenWRT Chaos Calmer Stable 15.05.

Behind that "gateway" setup is a GBit switch and connected to that is the rest of my devices, i.e. an Archer C5 running stock Firmware handling wifi and a NAS which is my media server, but also runs transmission BT client. I'd like to have the NAS available on the local network, but redirect all outgoing traffic through a permanent VPN connection. The VPN Connection is set-up correctly on the 1043nd. if i start the device, it correctly creates a tun0 device and establishes the VPN connection. The routing table looks like this:

default         10.114.0.1      128.0.0.0       UG    0      0        0 tun0
default         100.74.191.254  0.0.0.0         UG    10     0        0 eth0.2
10.114.0.0      *               255.255.0.0     U     0      0        0 tun0
46.165.228.118  100.74.191.254  255.255.255.255 UGH   0      0        0 eth0.2
100.74.128.0    *               255.255.192.0   U     10     0        0 eth0.2
100.74.191.254  *               255.255.255.255 UH    10     0        0 eth0.2
128.0.0.0       10.114.0.1      128.0.0.0       UG    0      0        0 tun0
192.168.1.0     *               255.255.255.0   U     0      0        0 br-lan
 

The first problem i am trying to solve (maybe already the solution to the bigger problem) is the missing metric for the VPN connection. It is not pushed by the VPN provider and i cannot figure out if i can add a metric for tun0 via LuCi or if i manually have to edit the VPN config? The trick seems to be adding a "metric" parameter to the openVPN setup but there doesnt seem to be this setting in the OpenVPN LuCi Config, so do i have to add it manually to the config or how can i set a metric for tun0?

hello,
I'm using mwan3 for a few months now with 3 wan connections.
When I firstly used mwan3 I had an issue with the 3 wan connections which, after many configuration tests, I fixed it. But now I'm having the same issue when I tried to add a 4th wan.

The issue is on the balanced policy, at first, if the wan2 and the wan3 members had the same weight value, the traffic wasn't balancing between those two interfaces.
All the traffic was balancing between wan and, randomly chosen, wan2 or wan3. I  never had balanced traffic between wan2 and wan3.
After many tests I realized that using different weight values on wan2 and wan3 members the balancing was working great.
There is no problem if wan2 or wan3 have the same weight with wan. The wan2 must not have the same weight with wan3.

Some days ago I decided  to add a 4th wan connection, wan4.
Now I'm having the same issue with wan4 and wan2 and I can't  fix it. I have used different weight values on all interfaces members for balanced policy, but the traffic is not balancing between wan2 and wan4.
All the balanced traffic goes through wan-wan3-wan2 or wan-wan3-wan4

Any ideas how to fix this now?

Hi dionisis,

Could you paste your config please and also the output of "mwan3 status"?

Adze wrote:

Hi dionisis,

Could you paste your config please and also the output of "mwan3 status"?


Software versions : 

OpenWrt - OpenWrt Chaos Calmer 15.05
LuCI - git-15.248.30277-3836b45

mwan3 - 1.6-2
mwan3-luci - 1.4-3

Output of "cat /etc/config/mwan3" : 

config member 'wan_m1_w3'
    option interface 'wan'
    option metric '1'
    option weight '10'

config member 'wan2_m1_w2'
    option interface 'wan2'
    option metric '1'
    option weight '11'

config member 'wan3_m1_w4'
    option interface 'wan3'
    option metric '1'
    option weight '9'

config member 'wan4_m1_w8'
    option interface 'wan4'
    option metric '1'
    option weight '7'

config member 'wan_m2_w3'
    option interface 'wan'
    option metric '2'
    option weight '3'

config member 'wan2_m2_w2'
    option interface 'wan2'
    option metric '2'
    option weight '3'

config member 'wan3_m2_w4'
    option interface 'wan3'
    option metric '2'
    option weight '3'

config member 'wan4_m2_w8'
    option interface 'wan4'
    option metric '2'
    option weight '8'

config rule 'sticky_even'
    option src_ip '0.0.0.0/0.0.0.1'
    option dest_port '443'
    option proto 'tcp'
    option use_policy 'balanced'

config rule 'sticky_odd'
    option src_ip '0.0.0.1/0.0.0.1'
    option dest_port '443'
    option proto 'tcp'
    option use_policy 'balanced'

config rule 'forthnetproxy'
    option src_ip '192.168.1.0/24'
    option dest_ip 'proxy.forthnet.gr'
    option proto 'all'
    option use_policy 'wan_only'

config rule 'greekespresso'
    option proto 'all'
    option use_policy 'wan_wan2'
    option dest_ip 'www.greekespresso.gr'

config rule 'easybytez'
    option dest_ip 'www.easybytez.com'
    option proto 'all'
    option use_policy 'wan_wan2'

config rule 'default_rule'
    option dest_ip '0.0.0.0/0'
    option use_policy 'balanced'

config policy 'balanced'
    option last_resort 'unreachable'
    list use_member 'wan_m1_w3'
    list use_member 'wan2_m1_w2'
    list use_member 'wan3_m1_w4'
    list use_member 'wan4_m1_w8'

config policy 'wan_only'
    list use_member 'wan_m1_w3'

config policy 'wan2_only'
    list use_member 'wan2_m1_w2'

config policy 'wan3_only'
    list use_member 'wan3_m1_w4'
    option last_resort 'unreachable'

config policy 'wan_wan2'
    list use_member 'wan_m1_w3'
    list use_member 'wan2_m2_w2'

config policy 'wan2_wan'
    list use_member 'wan_m2_w3'
    list use_member 'wan2_m1_w2'

config interface 'wan'
    option enabled '1'
    option count '1'
    option timeout '2'
    option interval '5'
    option down '3'
    list track_ip '193.92.3.11'
    list track_ip '194.177.210.10'
    list track_ip '193.92.150.2'
    list track_ip '194.177.210.211'
    option up '1'
    option reliability '1'

config interface 'wan2'
    option reliability '1'
    option count '1'
    option timeout '2'
    option interval '5'
    option down '3'
    option enabled '1'
    list track_ip '194.177.210.10'
    list track_ip '194.177.210.211'
    list track_ip '8.8.8.8'
    option up '1'

config interface 'wan3'
    option reliability '1'
    option count '1'
    option timeout '2'
    option interval '5'
    option down '3'
    option enabled '1'
    list track_ip '194.30.220.117'
    list track_ip '194.177.210.10'
    list track_ip '8.8.8.8'
    option up '1'

config interface 'wan4'
    option reliability '1'
    option count '1'
    option timeout '2'
    option interval '5'
    option down '3'
    option up '1'
    option enabled '1'
    list track_ip '8.8.8.8'
    list track_ip '194.177.210.211'
    list track_ip '194.177.210.10'

config policy 'wan4_only'
    list use_member 'wan4_m1_w8'
    option last_resort 'unreachable'

Output of "cat /etc/config/network" : 

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fdfd:762b:5ca4::/48'

config interface 'lan'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option netmask '255.255.255.0'
    option ip6assign '60'
    option ipaddr '192.168.1.5'
    option broadcast '255.255.255.255'
    option _orig_ifname 'eth1 wlan0-1'
    option _orig_bridge 'true'
    option ifname 'eth1'

config interface 'wan'
    option _orig_ifname 'eth0'
    option _orig_bridge 'true'
    option proto 'static'
    option netmask '255.255.255.0'
    option ipaddr '10.0.0.2'
    option ip6assign '64'
    option ifname 'eth0.2'
    option gateway '10.0.0.138'
    option metric '10'
    option dns '194.177.210.10 194.177.210.211'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option vid '1'
    option ports '0 4'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option vid '2'
    option ports '5 6t'

config switch_vlan
    option device 'switch0'
    option vlan '3'
    option vid '3'
    option ports '1 6t'

config interface 'wan2'
    option proto 'static'
    option ifname 'eth0.3'
    option ipaddr '192.168.10.88'
    option netmask '255.255.255.0'
    option gateway '192.168.10.254'
    option metric '20'
    option dns '194.177.210.10 194.177.210.211'

config switch_vlan
    option device 'switch0'
    option vlan '4'
    option vid '4'
    option ports '2 6t'

config interface 'wan3'
    option proto 'static'
    option ifname 'eth0.4'
    option ipaddr '192.168.2.99'
    option netmask '255.255.255.0'
    option gateway '192.168.2.1'
    option metric '30'
    option dns '194.177.210.10 194.177.210.211'

config switch_vlan
    option device 'switch0'
    option vlan '5'
    option vid '5'
    option ports '3 6t'

config interface 'wan4'
    option proto 'static'
    option ifname 'eth0.5'
    option ipaddr '10.0.1.3'
    option netmask '255.255.255.0'
    option gateway '10.0.1.1'
    option metric '40'
    option dns '194.177.210.10 194.177.210.211'

Output of "ifconfig" : 

br-lan    Link encap:Ethernet  HWaddr C4:6E:1F:6B:BE:F0  
          inet addr:192.168.1.5  Bcast:255.255.255.255  Mask:255.255.255.0
          inet6 addr: fe80::c66e:1fff:fe6b:bef0/64 Scope:Link
          inet6 addr: fdfd:762b:5ca4:10::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:35460195 errors:0 dropped:4639 overruns:0 frame:0
          TX packets:51651985 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2948819072 (2.7 GiB)  TX bytes:71363104278 (66.4 GiB)

eth0      Link encap:Ethernet  HWaddr C4:6E:1F:6B:BE:F1  
          inet6 addr: fe80::c66e:1fff:fe6b:bef1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:54546320 errors:0 dropped:0 overruns:0 frame:0
          TX packets:36880601 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3048173335 (2.8 GiB)  TX bytes:3546354728 (3.3 GiB)
          Interrupt:4 

eth0.2    Link encap:Ethernet  HWaddr C4:6E:1F:6B:BE:F1  
          inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::c66e:1fff:fe6b:bef1/64 Scope:Link
          inet6 addr: fdfd:762b:5ca4::1/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20846930 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14465654 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:26168043300 (24.3 GiB)  TX bytes:1483864140 (1.3 GiB)

eth0.3    Link encap:Ethernet  HWaddr C4:6E:1F:6B:BE:F1  
          inet addr:192.168.10.88  Bcast:192.168.10.255  Mask:255.255.255.0
          inet6 addr: fe80::c66e:1fff:fe6b:bef1/64 Scope:Link
          inet6 addr: fdfd:762b:5ca4:1::1/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23824164 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15934904 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:30417813737 (28.3 GiB)  TX bytes:1527879334 (1.4 GiB)

eth0.4    Link encap:Ethernet  HWaddr C4:6E:1F:6B:BE:F1  
          inet addr:192.168.2.99  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::c66e:1fff:fe6b:bef1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9309656 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6138134 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:13456264377 (12.5 GiB)  TX bytes:362028735 (345.2 MiB)

eth0.5    Link encap:Ethernet  HWaddr C4:6E:1F:6B:BE:F1  
          inet addr:10.0.1.3  Bcast:10.0.1.255  Mask:255.255.255.0
          inet6 addr: fe80::c66e:1fff:fe6b:bef1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:565570 errors:0 dropped:0 overruns:0 frame:0
          TX packets:341901 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:743694897 (709.2 MiB)  TX bytes:25059259 (23.8 MiB)

eth1      Link encap:Ethernet  HWaddr C4:6E:1F:6B:BE:F0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:36249688 errors:0 dropped:197 overruns:0 frame:0
          TX packets:51048640 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2272472132 (2.1 GiB)  TX bytes:3885241948 (3.6 GiB)
          Interrupt:5 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:279157 errors:0 dropped:0 overruns:0 frame:0
          TX packets:279157 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:16845508 (16.0 MiB)  TX bytes:16845508 (16.0 MiB)

wlan0     Link encap:Ethernet  HWaddr C4:6E:1F:6B:BE:F0  
          inet6 addr: fe80::c66e:1fff:fe6b:bef0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3365474 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5409041 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:323930157 (308.9 MiB)  TX bytes:2344194289 (2.1 GiB)

Output of "route -n" : 

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.138      0.0.0.0         UG    10     0        0 eth0.2
0.0.0.0         192.168.10.254  0.0.0.0         UG    20     0        0 eth0.3
0.0.0.0         192.168.2.1     0.0.0.0         UG    30     0        0 eth0.4
0.0.0.0         10.0.1.1        0.0.0.0         UG    40     0        0 eth0.5
10.0.0.0        0.0.0.0         255.255.255.0   U     10     0        0 eth0.2
10.0.1.0        0.0.0.0         255.255.255.0   U     40     0        0 eth0.5
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
192.168.2.0     0.0.0.0         255.255.255.0   U     30     0        0 eth0.4
192.168.10.0    0.0.0.0         255.255.255.0   U     20     0        0 eth0.3

Output of "ip rule show" : 

0:    from all lookup 128 
1:    from all lookup local 
1001:    from all iif eth0.2 lookup main 
1002:    from all iif eth0.3 lookup main 
1003:    from all iif eth0.4 lookup main 
1004:    from all iif eth0.5 lookup main 
2001:    from all fwmark 0x100/0xff00 lookup 1 
2002:    from all fwmark 0x200/0xff00 lookup 2 
2003:    from all fwmark 0x300/0xff00 lookup 3 
2004:    from all fwmark 0x400/0xff00 lookup 4 
2253:    from all fwmark 0xfd00/0xff00 blackhole
2254:    from all fwmark 0xfe00/0xff00 unreachable
32766:    from all lookup main 
32767:    from all lookup default

Output of "ip route list table 1-250" : 

1
default via 10.0.0.138 dev eth0.2 
2
default via 192.168.10.254 dev eth0.3 
3
default via 192.168.2.1 dev eth0.4 
4
default via 10.0.1.1 dev eth0.5

Firewall default output policy (must be ACCEPT) : 

ACCEPT

Output of "iptables -L -t mangle -v -n" : 

Chain PREROUTING (policy ACCEPT 2570 packets, 689K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 314K  242M mwan3_hook  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 2570  689K fwmark     all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain INPUT (policy ACCEPT 1450 packets, 93766 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 976 packets, 579K bytes)
 pkts bytes target     prot opt in     out     source               destination         
  976  579K mssfix     all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain OUTPUT (policy ACCEPT 1523 packets, 362K bytes)
 pkts bytes target     prot opt in     out     source               destination         
20817 2886K mwan3_hook  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain POSTROUTING (policy ACCEPT 2501 packets, 942K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain fwmark (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain mssfix (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    2    96 TCPMSS     tcp  --  *      eth0.2  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan (mtu_fix) */ TCPMSS clamp to PMTU
    7   336 TCPMSS     tcp  --  *      eth0.3  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan2 (mtu_fix) */ TCPMSS clamp to PMTU
    3   144 TCPMSS     tcp  --  *      eth0.4  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan3 (mtu_fix) */ TCPMSS clamp to PMTU
    1    48 TCPMSS     tcp  --  *      eth0.5  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan4 (mtu_fix) */ TCPMSS clamp to PMTU

Chain mwan3_connected (2 references)
 pkts bytes target     prot opt in     out     source               destination         
 174K  233M MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected dst MARK or 0xff00

Chain mwan3_hook (2 references)
 pkts bytes target     prot opt in     out     source               destination         
 334K  245M CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0            CONNMARK restore mask 0xff00
16664  697K mwan3_ifaces  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
16013  640K mwan3_connected  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
14054  524K mwan3_track  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
 1716  130K mwan3_rules  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
 334K  245M CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0            CONNMARK save mask 0xff00
 296K  241M mwan3_connected  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match ! 0xff00/0xff00

Chain mwan3_iface_wan (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    9  2130 MARK       all  --  eth0.2 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
   31  2688 MARK       all  --  eth0.2 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan */ MARK xset 0x100/0xff00

Chain mwan3_iface_wan2 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  334 18466 MARK       all  --  eth0.3 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
   26  5621 MARK       all  --  eth0.3 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan2 */ MARK xset 0x200/0xff00

Chain mwan3_iface_wan3 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   66 12551 MARK       all  --  eth0.4 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
    0     0 MARK       all  --  eth0.4 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan3 */ MARK xset 0x300/0xff00

Chain mwan3_iface_wan4 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  172 15229 MARK       all  --  eth0.5 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
   13   845 MARK       all  --  eth0.5 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan4 */ MARK xset 0x400/0xff00

Chain mwan3_ifaces (1 references)
 pkts bytes target     prot opt in     out     source               destination         
16664  697K mwan3_iface_wan  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
16601  690K mwan3_iface_wan2  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
16223  665K mwan3_iface_wan4  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
  974 45255 mwan3_iface_wan3  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00

Chain mwan3_policy_balanced (3 references)
 pkts bytes target     prot opt in     out     source               destination         
    7   446 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 statistic mode random probability 0.18899999978 /* wan4 7 37 */ MARK xset 0x400/0xff00
    8   457 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 statistic mode random probability 0.29999999981 /* wan3 9 30 */ MARK xset 0x300/0xff00
   15   876 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 statistic mode random probability 0.52300000004 /* wan2 11 21 */ MARK xset 0x200/0xff00
   11   700 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan 10 10 */ MARK xset 0x100/0xff00

Chain mwan3_policy_wan2_only (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan2 11 11 */ MARK xset 0x200/0xff00

Chain mwan3_policy_wan2_wan (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan2 11 11 */ MARK xset 0x200/0xff00

Chain mwan3_policy_wan3_only (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan3 9 9 */ MARK xset 0x300/0xff00

Chain mwan3_policy_wan4_only (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan4 7 7 */ MARK xset 0x400/0xff00

Chain mwan3_policy_wan_only (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan 10 10 */ MARK xset 0x100/0xff00

Chain mwan3_policy_wan_wan2 (2 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan 10 10 */ MARK xset 0x100/0xff00

Chain mwan3_rules (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 mwan3_policy_balanced  tcp  --  *      *       0.0.0.0/0.0.0.1      0.0.0.0/0            multiport sports 0:65535 multiport dports 443 mark match 0x0/0xff00 /* sticky_even */
    6   288 mwan3_policy_balanced  tcp  --  *      *       0.0.0.1/0.0.0.1      0.0.0.0/0            multiport sports 0:65535 multiport dports 443 mark match 0x0/0xff00 /* sticky_odd */
    0     0 mwan3_policy_wan_only  all  --  *      *       192.168.1.0/24       193.92.150.71        mark match 0x0/0xff00 /* forthnetproxy */
    0     0 mwan3_policy_wan_wan2  all  --  *      *       0.0.0.0/0            213.16.167.212       mark match 0x0/0xff00 /* greekespresso */
    0     0 mwan3_policy_wan_wan2  all  --  *      *       0.0.0.0/0            128.65.209.18        mark match 0x0/0xff00 /* easybytez */
   35  2191 mwan3_policy_balanced  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* default_rule */

Chain mwan3_track (1 references)
 pkts bytes target     prot opt in     out     source               destination         
 9059  290K MARK       icmp --  *      *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_track_wan dst icmptype 8 length 32 MARK or 0xff00
 9723  311K MARK       icmp --  *      *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_track_wan2 dst icmptype 8 length 32 MARK or 0xff00
 9713  311K MARK       icmp --  *      *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_track_wan4 dst icmptype 8 length 32 MARK or 0xff00
  478 15296 MARK       icmp --  *      *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_track_wan3 dst icmptype 8 length 32 MARK or 0xff00
Interface status:
 interface wan is online (tracking active)
 interface wan2 is online (tracking active)
 interface wan3 is online (tracking active)
 interface wan4 is online (tracking active)

Policy balanced:
 wan4 (18%)
 wan3 (24%)
 wan2 (29%)
 wan (27%)

Policy wan2_only:
 wan2 (100%)

Policy wan2_wan:
 wan2 (100%)

Policy wan3_only:
 wan3 (100%)

Policy wan4_only:
 wan4 (100%)

Policy wan_only:
 wan (100%)

Policy wan_wan2:
 wan (100%)

Known networks:
 192.168.10.88
 192.168.2.99
 10.0.1.0/24
 192.168.10.0/24
 192.168.10.0
 10.0.1.3
 192.168.2.0/24
 10.0.0.255
 192.168.10.255
 192.168.1.0
 192.168.1.0/24
 127.255.255.255
 192.168.1.255
 127.0.0.0
 192.168.2.255
 10.0.0.2
 192.168.1.5
 10.0.1.0
 127.0.0.0/8
 192.168.2.0
 127.0.0.1
 10.0.0.0
 10.0.1.255
 224.0.0.0/3
 10.0.0.0/24

Active rules:
    0     0 - balanced  tcp  --  *      *       0.0.0.0/0.0.0.1      0.0.0.0/0            multiport sports 0:65535 multiport dports 443 
    6   288 - balanced  tcp  --  *      *       0.0.0.1/0.0.0.1      0.0.0.0/0            multiport sports 0:65535 multiport dports 443 
    0     0 - wan_only  all  --  *      *       192.168.1.0/24       193.92.150.71        
    0     0 - wan_wan2  all  --  *      *       0.0.0.0/0            213.16.167.212       
    0     0 - wan_wan2  all  --  *      *       0.0.0.0/0            128.65.209.18        
   18  1147 - balanced  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Hi dionisis,


Your config looks perfectly fine. I doubt that your conclusion of not all wans working is right. How did you test it?

(Last edited by Adze on 14 Jan 2016, 09:37)

Adze wrote:

Hi dionisis,


Your config looks perfectly fine. I doubt that your conclusion of not all wans working is right. How did you test it?

Hi Adze,
All wans are working I can ping to any server from the router using each interface.
My problem is on the balancing policy that cannot use wan2 and wan4 at the same time.

The test I do is as follows, 
at first, I add some big files for download to my pc using a download manager and I setup it to make also many connections per file. The files are from servers that support file segment I can download using multiple ips.

When the downloading starts, I go to the router and check the traffic graphs of each interface. There I see that if I have traffic on wan2 I have zero traffic on wan4 and if I have traffic on wan4 I have no traffic on wan2.
Even adding more files with even more connections there is no difference, wan2 or wan4 is not used and  has no traffic.

Sometimes it is possible while, for example, having zero traffic on wan2 to start have traffic, but the exact same time the traffic from wan4 stops.

I have also tried to disconnect wan and wan3 and repeat this test with wan2 and wan4 only connected, and still have the same issue. I see traffic only on the one of these two wans as I have described.

I'm doing these tests for many days now, wan2 and wan4 behave like they're on different member metrics on balancing policy.

Hi dionisis,


I have no idea why this is. Config looks perfectly fine. I can only think of one thing...

Are the 4 wans you have, real different wans, with each their own public ip address? And not your own test setup with faked wan? The reason i ask is that if it is possible in your setup that a syn packet leaves wan2 but syn+ack returns on wan4. That way all consecutive packets will leave wan4.

Could you do a tcpdump on all your wans and only match on tcp syn:

tcpdump -eqnvvi any "tcp[tcpflags] & (tcp-syn) != 0"
Adze wrote:

Hi dionisis,


I have no idea why this is. Config looks perfectly fine. I can only think of one thing...

Are the 4 wans you have, real different wans, with each their own public ip address? And not your own test setup with faked wan? The reason i ask is that if it is possible in your setup that a syn packet leaves wan2 but syn+ack returns on wan4. That way all consecutive packets will leave wan4.

Could you do a tcpdump on all your wans and only match on tcp syn:

tcpdump -eqnvvi any "tcp[tcpflags] & (tcp-syn) != 0"

Hi Adze.
Yes, all 4 wans are real different wans, with each their own public ip address.

About the tcpdump, I never used it, but I hope I'll figure how to do it.


edit: I hope I did the tcpdump you asked correctly.
while running the command you gave me I was downloading a file as i did on tests I described and this time, wan4 was not used.
I couldn't post all it here so I uploaded it to drobox,
https://www.dropbox.com/s/mkmpeazadsccx … p.txt?dl=0

(Last edited by dionisis on 14 Jan 2016, 16:25)

Hi Adze,
I have a problem. hope you can help me.

I use mwan3 create two wan interfaces for pppoe(adsl) , and use Transparent Proxy filter ADs..  Internal under everything perfect.
but after i added pptpd server. then probelm coming.
if i don't use transparent proxy ,pptpd client work normal. auto load balancing.
if i use transparent proxy, usually first client sometimes works , but the 2st or atfer client  will appear:
pptp client:
root@OpenWrt:~# netstat -antp |grep 192.168.0.21
tcp        0      0 192.168.0.1:8118        192.168.0.21:2177       SYN_RECV

Internal:
root@OpenWrt:~# netstat -antp |grep 192.168.1.2
tcp        0      0 192.168.1.1:8118        192.168.1.2:50270       ESTABLISHED

my router(CC15.05) information br-lan(192.168.1.1) pptpd(192.168.0.20-30)
/etc/firewall.user
iptables -I forwarding_rule -s 192.168.0.0/24 -i ppp+ -j ACCEPT
iptables -I forwarding_rule -s 192.168.0.0/24 -o ppp+ -j ACCEPT
iptables -t nat -A prerouting_rule -s 192.168.0.0/24 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8118

Looking forward to your reply.

Hi dionisis,

dionisis wrote:

edit: I hope I did the tcpdump you asked correctly.
while running the command you gave me I was downloading a file as i did on tests I described and this time, wan4 was not used.
I couldn't post all it here so I uploaded it to drobox,
https://www.dropbox.com/s/mkmpeazadsccx … p.txt?dl=0

Well, the tcpdump you uploaded was exactly the confirmation i was looking for. All your wans are used! So, i dont know what you are looking at and measuring, but all your wans are definitely used. 100% sure.

You can see for yourself in the dump towards 154.53.224.210:

wan = eth0.2 = 10.0.0.2:
17:05:12.049923 Out c4:6e:1f:6b:be:f1 (tos 0x0, ttl 127, id 24023, offset 0, flags [DF], proto TCP (6), length 48)
    10.0.0.2.56615 > 154.53.224.210.80: tcp 0
17:05:12.150609 Out c4:6e:1f:6b:be:f1 (tos 0x0, ttl 127, id 24041, offset 0, flags [DF], proto TCP (6), length 48)
    10.0.0.2.56617 > 154.53.224.210.80: tcp 0

wan2 = eth0.3 = 192.168.10.88:
17:05:12.250756 Out c4:6e:1f:6b:be:f1 (tos 0x0, ttl 127, id 24062, offset 0, flags [DF], proto TCP (6), length 48)
    192.168.10.88.56619 > 154.53.224.210.80: tcp 0
17:06:14.612843 Out c4:6e:1f:6b:be:f1 (tos 0x0, ttl 127, id 3722, offset 0, flags [DF], proto TCP (6), length 48)
    192.168.10.88.56666 > 154.53.224.210.80: tcp 0

wan3 = eth0.4 = 192.168.2.99:
17:06:14.307973 Out c4:6e:1f:6b:be:f1 (tos 0x0, ttl 127, id 3704, offset 0, flags [DF], proto TCP (6), length 48)
    192.168.2.99.56663 > 154.53.224.210.80: tcp 0
17:06:14.514029 Out c4:6e:1f:6b:be:f1 (tos 0x0, ttl 127, id 3709, offset 0, flags [DF], proto TCP (6), length 48)
    192.168.2.99.56664 > 154.53.224.210.80: tcp 0

wan4 = eth0.5 = 10.0.1.3:
17:05:11.830023 Out c4:6e:1f:6b:be:f1 (tos 0x0, ttl 127, id 24014, offset 0, flags [DF], proto TCP (6), length 48)
    10.0.1.3.56613 > 154.53.224.210.80: tcp 0
17:05:12.001816 Out c4:6e:1f:6b:be:f1 (tos 0x0, ttl 127, id 24018, offset 0, flags [DF], proto TCP (6), length 48)
    10.0.1.3.56614 > 154.53.224.210.80: tcp 0

Case closed  wink

(Last edited by Adze on 15 Jan 2016, 14:53)

I want to settle this conflict
WAN1 <=>LAN1 & WAN2 <=>LAN2
When I start WAN1 ==> WAN2 shut down

wadja_tn wrote:

I want to settle this conflict
WAN1 <=>LAN1 & WAN2 <=>LAN2
When I start WAN1 ==> WAN2 shut down

You have to elaborate some more on your troubles, if you want help from me...

Adze wrote:

Hi anarchy99,


I looked at the data and looks ok to me. But to be sure please upgrade to version 2.0-2, because the 2.0-0 version you are using contains a bug which might affect you

Also: (from the wiki)

On routers with just one wan interface (and one default route), there is no issue on which source address to use for new initiated sessions. But with two or more wan interfaces you may wish to have control over this. Up until version 2.0, mwan3 did not respect the already set source address of router originated packets. Packets were load-balanced regardless of source address, based on configured user rules.

As of version 2.0 mwan3 does respect the already set source address. The advantage of this is that an applications can have control over which wan interface to use. The downside of this is that when an application does not specify which source address to use (most of the time) the kernel will pick a source address based on the routing table. In practice this means the default route with the lowest metric is used to determine which source address to use. So if you don't configure a routable loopback address with corresponding more preferred default route, all traffic originating from the router itself will leave the primary wan with the source address of that wan interface, regardless of configured user mwan3 rules.

More info: https://wiki.openwrt.org/doc/howto/mwan … pback_self

no luck with routable loopback either.

tried to change the ipaddr and gateway of already present interface 'loopback' to the ip of the local interface that maps to main wan. i couldn't access internet or luci but ssh was still accessible.

then i added another interface 'self' as suggested in the wiki but internet still didn't work and i was able to access luci only on that ip.

shouldn't this be a problem having 2 interfaces with ifname 'lo' ?

(Last edited by anarchy99 on 16 Jan 2016, 04:23)

I have been using mwan3 about three years and everything worked perfectly,Thank you  Adze.
Now,I get a new problem after add some device.
Wan1 <=>Lan1
Wan2 <=>Lan2
Wan3+ Wan4+Wan5+Wan6+Wan7+Wan8<=>Lan3
When use the following settings, I found Lan2's upload traffic is going wan1, anything wrong with my settings??

Software versions : 

OpenWrt - OpenWrt Designated Driver r47935
LuCI - git-15.352.67088-e42e5f5

mwan3 - 2.0-1
mwan3-luci - 1.4-4

Output of "cat /etc/config/mwan3" : 

config interface 'wan1'
    option enabled '1'
    list track_ip '218.28.152.207'
    list track_ip '218.28.152.254'
    option reliability '1'
    option count '1'
    option timeout '1'
    option interval '300'
    option down '3'
    option up '2'

config interface 'wan2'
    option enabled '1'
    list track_ip '218.28.152.207'
    list track_ip '218.28.152.254'
    option reliability '1'
    option count '1'
    option timeout '1'
    option interval '300'
    option down '3'
    option up '2'

config interface 'wan3'
    option enabled '1'
    list track_ip '218.28.152.207'
    list track_ip '218.28.152.254'
    option reliability '1'
    option count '1'
    option timeout '1'
    option interval '300'
    option down '3'
    option up '2'

config interface 'wan4'
    option enabled '1'
    list track_ip '218.28.152.207'
    list track_ip '218.28.152.254'
    option reliability '1'
    option count '1'
    option timeout '1'
    option interval '300'
    option down '3'
    option up '2'

config interface 'wan5'
    option enabled '1'
    list track_ip '218.28.152.207'
    list track_ip '218.28.152.254'
    option reliability '1'
    option count '1'
    option timeout '1'
    option interval '300'
    option down '3'
    option up '2'

config interface 'wan6'
    option enabled '1'
    list track_ip '218.28.152.207'
    list track_ip '218.28.152.254'
    option reliability '1'
    option count '1'
    option timeout '1'
    option interval '300'
    option down '3'
    option up '2'

config interface 'wan7'
    option enabled '1'
    list track_ip '218.28.152.207'
    list track_ip '218.28.152.254'
    option reliability '1'
    option count '1'
    option timeout '1'
    option interval '300'
    option down '3'
    option up '2'

config interface 'wan8'
    option enabled '1'
    list track_ip '218.28.152.207'
    list track_ip '218.28.152.254'
    option reliability '1'
    option count '1'
    option timeout '1'
    option interval '300'
    option down '3'
    option up '2'

config member 'wan1_m1_w1'
    option interface 'wan1'
    option metric '1'
    option weight '1'

config member 'wan2_m1_w1'
    option interface 'wan2'
    option weight '1'
    option metric '1'

config member 'wan3_m1_w1'
    option interface 'wan3'
    option weight '1'
    option metric '1'

config member 'wan4_m1_w1'
    option interface 'wan4'
    option weight '1'
    option metric '1'

config member 'wan5_m1_w1'
    option interface 'wan5'
    option weight '1'
    option metric '1'

config member 'wan6_m1_w1'
    option interface 'wan6'
    option weight '1'
    option metric '1'

config member 'wan7_m1_w1'
    option interface 'wan7'
    option weight '1'
    option metric '1'

config member 'wan8_m1_w1'
    option interface 'wan8'
    option weight '1'
    option metric '1'

config policy 'wan1_only'
        list use_member 'wan1_m1_w1'

config policy 'wan2_only'
        list use_member 'wan2_m1_w1'

config policy 'all4'
    list use_member 'wan3_m1_w1'
    list use_member 'wan4_m1_w1'
    list use_member 'wan5_m1_w1'
    list use_member 'wan6_m1_w1'
    list use_member 'wan7_m1_w1'
    list use_member 'wan8_m1_w1'

config rule 'dan_zou_wan1'
        option src_ip '192.168.1.145'
    option dest_ip '0.0.0.0/0'
        option proto 'all'
        option use_policy 'wan1_only'

config rule 'dan_zou_wan2'
        option src_ip '192.168.1.207'
    option dest_ip '0.0.0.0/0'
        option proto 'all'
        option use_policy 'wan2_only'

config rule 'default_rule'
    option dest_ip '0.0.0.0/0'
    option use_policy 'all4'
    option proto 'all'
    option sticky '0'

Output of "cat /etc/config/network" : 

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fd1f:3ba0:0015::/48'

config interface 'lan'
    option ifname 'eth0.1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config interface 'wan1'
    option proto 'pppoe'
    USERNAME HIDDEN
    PASSWORD HIDDEN
    option ifname 'eth0.2'
    option metric '10'
    option ipv6 '0'

config interface 'wan2'
    option proto 'pppoe'
    USERNAME HIDDEN
    PASSWORD HIDDEN
    option ifname 'eth0.2'
    option metric '20'
    option auto '0'
    option ipv6 '0'

config interface 'wan3'
    option proto 'pppoe'
    USERNAME HIDDEN
    PASSWORD HIDDEN
    option ifname 'eth0.2'
    option metric '30'
    option auto '0'
    option ipv6 '0'

config interface 'wan4'
    option proto 'pppoe'
    USERNAME HIDDEN
    PASSWORD HIDDEN
    option ifname 'eth0.2'
    option metric '40'
    option auto '0'
    option ipv6 '0'

config interface 'wan5'
    option proto 'pppoe'
    USERNAME HIDDEN
    PASSWORD HIDDEN
    option ifname 'eth0.2'
    option metric '50'
    option auto '0'
    option ipv6 '0'

config interface 'wan6'
    option proto 'pppoe'
    USERNAME HIDDEN
    PASSWORD HIDDEN
    option ifname 'eth0.2'
    option metric '60'
    option auto '0'
    option ipv6 '0'

config interface 'wan7'
    option proto 'pppoe'
    USERNAME HIDDEN
    PASSWORD HIDDEN
    option ifname 'eth0.2'
    option metric '70'
    option auto '0'
    option ipv6 '0'

config interface 'wan8'
    option proto 'pppoe'
    USERNAME HIDDEN
    PASSWORD HIDDEN
    option ifname 'eth0.2'
    option metric '80'
    option auto '0'
    option ipv6 '0'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '0t 2 3 4 5'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '0t 1'

Output of "ifconfig" : 

br-lan    Link encap:Ethernet  HWaddr 6C:E8:73:FF:07:F7  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd1f:3ba0:15::1%2006946680/60 Scope:Global
          inet6 addr: fe80::6ee8:73ff:feff:7f7%2006946680/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:610041452 errors:0 dropped:0 overruns:0 frame:0
          TX packets:560169464 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:657670604684 (612.5 GiB)  TX bytes:323465760085 (301.2 GiB)

eth0      Link encap:Ethernet  HWaddr 6C:E8:73:FF:07:F7  
          inet6 addr: fe80::6ee8:73ff:feff:7f7%2006945816/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1171052378 errors:0 dropped:0 overruns:216240 frame:0
          TX packets:1167834216 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1465367800 (1.3 GiB)  TX bytes:370453930 (353.2 MiB)
          Interrupt:4 

eth0.1    Link encap:Ethernet  HWaddr 6C:E8:73:FF:07:F7  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:607387386 errors:0 dropped:456 overruns:0 frame:0
          TX packets:554559220 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:657385735193 (612.2 GiB)  TX bytes:317218752937 (295.4 GiB)

eth0.2    Link encap:Ethernet  HWaddr 6C:E8:73:FF:07:F7  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:563664967 errors:0 dropped:0 overruns:0 frame:0
          TX packets:613369731 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:319433100442 (297.4 GiB)  TX bytes:670748654204 (624.6 GiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%4566648/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:295 errors:0 dropped:0 overruns:0 frame:0
          TX packets:295 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:23323 (22.7 KiB)  TX bytes:23323 (22.7 KiB)

pppoe-wan1 Link encap:Point-to-Point Protocol  
          inet addr:123.5.164.45  P-t-P:123.5.160.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:4860368 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5065647 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:3808482536 (3.5 GiB)  TX bytes:5515692828 (5.1 GiB)

pppoe-wan2 Link encap:Point-to-Point Protocol  
          inet addr:123.5.193.145  P-t-P:123.5.192.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:643708 errors:0 dropped:0 overruns:0 frame:0
          TX packets:329061 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:843652081 (804.5 MiB)  TX bytes:136448428 (130.1 MiB)

pppoe-wan3 Link encap:Point-to-Point Protocol  
          inet addr:125.40.155.144  P-t-P:125.40.152.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:380389 errors:0 dropped:0 overruns:0 frame:0
          TX packets:278096 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:467340675 (445.6 MiB)  TX bytes:57881178 (55.1 MiB)

pppoe-wan4 Link encap:Point-to-Point Protocol  
          inet addr:125.40.153.7  P-t-P:125.40.152.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:3696175 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2732014 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:4437693127 (4.1 GiB)  TX bytes:757678804 (722.5 MiB)

pppoe-wan5 Link encap:Point-to-Point Protocol  
          inet addr:123.5.160.199  P-t-P:123.5.160.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:862159 errors:0 dropped:0 overruns:0 frame:0
          TX packets:667422 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:1053527615 (1004.7 MiB)  TX bytes:206990353 (197.4 MiB)

pppoe-wan6 Link encap:Point-to-Point Protocol  
          inet addr:123.5.165.242  P-t-P:123.5.160.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:1147853 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1235424 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:914698008 (872.3 MiB)  TX bytes:980037591 (934.6 MiB)

pppoe-wan7 Link encap:Point-to-Point Protocol  
          inet addr:123.5.215.183  P-t-P:123.5.208.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:1496497 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1181167 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:1733037878 (1.6 GiB)  TX bytes:389474771 (371.4 MiB)

pppoe-wan8 Link encap:Point-to-Point Protocol  
          inet addr:123.5.194.223  P-t-P:123.5.192.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:3085790 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2452274 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:3315575864 (3.0 GiB)  TX bytes:883500275 (842.5 MiB)

wlan0     Link encap:Ethernet  HWaddr 6C:E8:73:FF:07:F8  
          inet6 addr: fe80::6ee8:73ff:feff:7f8%2006280504/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2772384 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5017846 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:339445849 (323.7 MiB)  TX bytes:5928372369 (5.5 GiB)

Output of "route -n" : 

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         123.5.160.1     0.0.0.0         UG    10     0        0 pppoe-wan1
0.0.0.0         123.5.192.1     0.0.0.0         UG    20     0        0 pppoe-wan2
0.0.0.0         125.40.152.1    0.0.0.0         UG    30     0        0 pppoe-wan3
0.0.0.0         125.40.152.1    0.0.0.0         UG    40     0        0 pppoe-wan4
0.0.0.0         123.5.160.1     0.0.0.0         UG    50     0        0 pppoe-wan5
0.0.0.0         123.5.160.1     0.0.0.0         UG    60     0        0 pppoe-wan6
0.0.0.0         123.5.208.1     0.0.0.0         UG    70     0        0 pppoe-wan7
0.0.0.0         123.5.192.1     0.0.0.0         UG    80     0        0 pppoe-wan8
123.5.160.1     0.0.0.0         255.255.255.255 UH    0      0        0 pppoe-wan6
123.5.160.1     0.0.0.0         255.255.255.255 UH    0      0        0 pppoe-wan5
123.5.160.1     0.0.0.0         255.255.255.255 UH    0      0        0 pppoe-wan1
123.5.192.1     0.0.0.0         255.255.255.255 UH    0      0        0 pppoe-wan8
123.5.192.1     0.0.0.0         255.255.255.255 UH    0      0        0 pppoe-wan2
123.5.208.1     0.0.0.0         255.255.255.255 UH    0      0        0 pppoe-wan7
125.40.152.1    0.0.0.0         255.255.255.255 UH    0      0        0 pppoe-wan4
125.40.152.1    0.0.0.0         255.255.255.255 UH    0      0        0 pppoe-wan3
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan

Output of "ip rule show" : 

0:    from all lookup 128 
1:    from all lookup local 
1001:    from all iif pppoe-wan1 lookup main 
1002:    from all iif pppoe-wan2 lookup main 
1003:    from all iif pppoe-wan3 lookup main 
1004:    from all iif pppoe-wan4 lookup main 
1005:    from all iif pppoe-wan5 lookup main 
1006:    from all iif pppoe-wan6 lookup main 
1007:    from all iif pppoe-wan7 lookup main 
1008:    from all iif pppoe-wan8 lookup main 
2001:    from all fwmark 0x100/0xff00 lookup 1 
2002:    from all fwmark 0x200/0xff00 lookup 2 
2003:    from all fwmark 0x300/0xff00 lookup 3 
2004:    from all fwmark 0x400/0xff00 lookup 4 
2005:    from all fwmark 0x500/0xff00 lookup 5 
2006:    from all fwmark 0x600/0xff00 lookup 6 
2007:    from all fwmark 0x700/0xff00 lookup 7 
2008:    from all fwmark 0x800/0xff00 lookup 8 
2253:    from all fwmark 0xfd00/0xff00 blackhole
2254:    from all fwmark 0xfe00/0xff00 unreachable
32766:    from all lookup main 
32767:    from all lookup default

Output of "ip route list table 1-250" : 

1
default via 123.5.160.1 dev pppoe-wan1 
2
default via 123.5.192.1 dev pppoe-wan2 
3
default via 125.40.152.1 dev pppoe-wan3 
4
default via 125.40.152.1 dev pppoe-wan4 
5
default via 123.5.160.1 dev pppoe-wan5 
6
default via 123.5.160.1 dev pppoe-wan6 
7
default via 123.5.208.1 dev pppoe-wan7 
8
default via 123.5.192.1 dev pppoe-wan8

Firewall default output policy (must be ACCEPT) : 

ACCEPT

Output of "iptables -L -t mangle -v -n" : 

Chain PREROUTING (policy ACCEPT 3000K packets, 2701M bytes)
 pkts bytes target     prot opt in     out     source               destination         
3006K 2705M mwan3_hook  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
3000K 2701M fwmark     all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain INPUT (policy ACCEPT 17150 packets, 2688K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 2982K packets, 2698M bytes)
 pkts bytes target     prot opt in     out     source               destination         
2982K 2698M mssfix     all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain OUTPUT (policy ACCEPT 14879 packets, 5147K bytes)
 pkts bytes target     prot opt in     out     source               destination         
15137 5204K mwan3_hook  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain POSTROUTING (policy ACCEPT 2997K packets, 2703M bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain fwmark (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain mssfix (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   38  2264 TCPMSS     tcp  --  *      pppoe-wan1  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan (mtu_fix) */ TCPMSS clamp to PMTU
   83  4980 TCPMSS     tcp  --  *      pppoe-wan2  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan (mtu_fix) */ TCPMSS clamp to PMTU
  392 22100 TCPMSS     tcp  --  *      pppoe-wan3  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan (mtu_fix) */ TCPMSS clamp to PMTU
  403 22684 TCPMSS     tcp  --  *      pppoe-wan4  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan (mtu_fix) */ TCPMSS clamp to PMTU
  650 37520 TCPMSS     tcp  --  *      pppoe-wan5  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan (mtu_fix) */ TCPMSS clamp to PMTU
  241 13012 TCPMSS     tcp  --  *      pppoe-wan6  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan (mtu_fix) */ TCPMSS clamp to PMTU
  272 14600 TCPMSS     tcp  --  *      pppoe-wan7  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan (mtu_fix) */ TCPMSS clamp to PMTU
  523 29692 TCPMSS     tcp  --  *      pppoe-wan8  0.0.0.0/0            0.0.0.0/0            tcp flags:0x06/0x02 /* wan (mtu_fix) */ TCPMSS clamp to PMTU

Chain mwan3_connected (2 references)
 pkts bytes target     prot opt in     out     source               destination         
1606K 1565M MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected dst MARK or 0xff00

Chain mwan3_hook (2 references)
 pkts bytes target     prot opt in     out     source               destination         
3021K 2710M CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0            CONNMARK restore mask 0xff00
49706 2095K mwan3_ifaces_in  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
43449 1660K mwan3_ifaces_out  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
42433 1588K mwan3_connected  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
41378 1449K mwan3_rules  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
3021K 2710M CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0            CONNMARK save mask 0xff00
2993K 2703M mwan3_connected  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match ! 0xff00/0xff00

Chain mwan3_iface_in_wan1 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  pppoe-wan1 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
  327 18631 MARK       all  --  pppoe-wan1 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan1 */ MARK xset 0x100/0xff00

Chain mwan3_iface_in_wan2 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  pppoe-wan2 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
  320 19152 MARK       all  --  pppoe-wan2 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan2 */ MARK xset 0x200/0xff00

Chain mwan3_iface_in_wan3 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  pppoe-wan3 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
  567 40674 MARK       all  --  pppoe-wan3 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan3 */ MARK xset 0x300/0xff00

Chain mwan3_iface_in_wan4 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   20  1922 MARK       all  --  pppoe-wan4 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
  566 40077 MARK       all  --  pppoe-wan4 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan4 */ MARK xset 0x400/0xff00

Chain mwan3_iface_in_wan5 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   12  1173 MARK       all  --  pppoe-wan5 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
  825 55678 MARK       all  --  pppoe-wan5 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan5 */ MARK xset 0x500/0xff00

Chain mwan3_iface_in_wan6 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  pppoe-wan6 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
  192 15273 MARK       all  --  pppoe-wan6 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan6 */ MARK xset 0x600/0xff00

Chain mwan3_iface_in_wan7 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  pppoe-wan7 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
  473 38291 MARK       all  --  pppoe-wan7 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan7 */ MARK xset 0x700/0xff00

Chain mwan3_iface_in_wan8 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  pppoe-wan8 *       0.0.0.0/0            0.0.0.0/0            match-set mwan3_connected src mark match 0x0/0xff00 /* default */ MARK or 0xff00
 2955  205K MARK       all  --  pppoe-wan8 *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan8 */ MARK xset 0x800/0xff00

Chain mwan3_iface_out_wan1 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  718 49247 MARK       all  --  *      *       123.5.164.45         0.0.0.0/0            mark match 0x0/0xff00 /* wan1 */ MARK xset 0x100/0xff00

Chain mwan3_iface_out_wan2 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   35  2896 MARK       all  --  *      *       123.5.193.145        0.0.0.0/0            mark match 0x0/0xff00 /* wan2 */ MARK xset 0x200/0xff00

Chain mwan3_iface_out_wan3 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   43  3216 MARK       all  --  *      *       125.40.155.144       0.0.0.0/0            mark match 0x0/0xff00 /* wan3 */ MARK xset 0x300/0xff00

Chain mwan3_iface_out_wan4 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   43  3216 MARK       all  --  *      *       125.40.153.7         0.0.0.0/0            mark match 0x0/0xff00 /* wan4 */ MARK xset 0x400/0xff00

Chain mwan3_iface_out_wan5 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   42  3176 MARK       all  --  *      *       123.5.160.199        0.0.0.0/0            mark match 0x0/0xff00 /* wan5 */ MARK xset 0x500/0xff00

Chain mwan3_iface_out_wan6 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   44  3256 MARK       all  --  *      *       123.5.165.242        0.0.0.0/0            mark match 0x0/0xff00 /* wan6 */ MARK xset 0x600/0xff00

Chain mwan3_iface_out_wan7 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   45  3296 MARK       all  --  *      *       123.5.215.183        0.0.0.0/0            mark match 0x0/0xff00 /* wan7 */ MARK xset 0x700/0xff00

Chain mwan3_iface_out_wan8 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   46  3336 MARK       all  --  *      *       123.5.194.223        0.0.0.0/0            mark match 0x0/0xff00 /* wan8 */ MARK xset 0x800/0xff00

Chain mwan3_ifaces_in (1 references)
 pkts bytes target     prot opt in     out     source               destination         
49685 2090K mwan3_iface_in_wan1  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
49267 2053K mwan3_iface_in_wan2  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
48860 2025K mwan3_iface_in_wan3  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
48132 1970K mwan3_iface_in_wan4  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
47432 1922K mwan3_iface_in_wan5  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
46539 1860K mwan3_iface_in_wan6  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
46286 1839K mwan3_iface_in_wan7  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
45753 1797K mwan3_iface_in_wan8  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00

Chain mwan3_ifaces_out (1 references)
 pkts bytes target     prot opt in     out     source               destination         
43428 1654K mwan3_iface_out_wan1  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
42624 1587K mwan3_iface_out_wan2  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
42505 1576K mwan3_iface_out_wan3  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
42310 1559K mwan3_iface_out_wan4  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
42173 1551K mwan3_iface_out_wan5  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
42079 1543K mwan3_iface_out_wan6  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
41970 1534K mwan3_iface_out_wan7  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00
41875 1527K mwan3_iface_out_wan8  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00

Chain mwan3_policy_all4 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
 6573  220K MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 statistic mode random probability 0.16600000020 /* wan8 1 6 */ MARK xset 0x800/0xff00
 6489  217K MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 statistic mode random probability 0.20000000019 /* wan7 1 5 */ MARK xset 0x700/0xff00
 6689  223K MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 statistic mode random probability 0.25000000000 /* wan6 1 4 */ MARK xset 0x600/0xff00
 6523  220K MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 statistic mode random probability 0.33300000010 /* wan5 1 3 */ MARK xset 0x500/0xff00
 6667  223K MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 statistic mode random probability 0.50000000000 /* wan4 1 2 */ MARK xset 0x400/0xff00
 6650  222K MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan3 1 1 */ MARK xset 0x300/0xff00

Chain mwan3_policy_wan1_only (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  698 48636 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan1 1 1 */ MARK xset 0x100/0xff00

Chain mwan3_policy_wan2_only (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  637 44373 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* wan2 1 1 */ MARK xset 0x200/0xff00

Chain mwan3_rules (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  697 48560 mwan3_policy_wan1_only  all  --  *      *       192.168.1.145        0.0.0.0/0            mark match 0x0/0xff00 /* dan_zou_wan1 */
  637 44373 mwan3_policy_wan2_only  all  --  *      *       192.168.1.207        0.0.0.0/0            mark match 0x0/0xff00 /* dan_zou_wan2 */
39591 1326K mwan3_policy_all4  all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match 0x0/0xff00 /* default_rule */
Adze wrote:
wadja_tn wrote:

I want to settle this conflict
WAN1 <=>LAN1 & WAN2 <=>LAN2
When I start WAN1 ==> WAN2 shut down

You have to elaborate some more on your troubles, if you want help from me...

I use two dongle 3G in my modem and I want to create two separate networks for each dongle
it is done
but if one of the dongle is connected the other is disconnected

brick2008 wrote:

When use the following settings, I found Lan2's upload traffic is going wan1, anything wrong with my settings??

Everything looks perfectly fine. Can't tell you why you have this problem... If you browse to https://ipv4.wtfismyip.com/ from 192.168.1.207? Does it report the right ip address (from wan2)?

wadja_tn wrote:

I use two dongle 3G in my modem and I want to create two separate networks for each dongle
it is done
but if one of the dongle is connected the other is disconnected

Is this also the case it mwan3 is not installed? Do you have both default routes present in the main routing table?