Hi Adze, can you help me out?
After installing mwan3, my ip rule is very strange:
Output of "ip rule show" :
0: from all lookup local
1001: from all fwmark 0x100/0xff00 lookup 1001
1002: from all fwmark 0x200/0xff00 lookup 1002
1016: from all fwmark 0x1000/0xff00 lookup 1016
1017: from all fwmark 0x1100/0xff00 lookup 1017
1018: from all fwmark 0x1200/0xff00 lookup 1018
1019: from all fwmark 0x1300/0xff00 lookup 1019
1020: from all fwmark 0x1400/0xff00 lookup 1020
32766: from all lookup main
32767: from all lookup default
80000: from 192.168.1.1 nop
80000: from 127.0.0.1 nop
80000: from 192.168.16.108 nop
80000: from 172.24.210.132 nop
90000: from 192.168.1.1/24 nop
90000: from 127.0.0.1/8 nop
90000: from 192.168.16.108/24 nop
90000: from 172.24.210.132/23 nop
-------------------------------------------------------------------------------------------
I have two wans, one is 192.168.16.1; another is 172.24.210.1.
I dont know why mwan3 cannot use the two gateways as default gateway.
more information you may need as flow. Is there anything I missed?
---------------------------------------------------------------------------------------------
Software versions :
OpenWrt - OpenWrt Barrier Breaker r38578 (r38578)
mwan3 - 1.3-0
luci-app-mwan3 - 1.1-13
Firewall default output policy (must be ACCEPT) :
ACCEPT
Output of "ip route show" :
default via 172.24.210.1 dev eth1 proto static metric 10
172.24.210.0/23 dev eth1 proto static scope link metric 10
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1
192.168.16.0/24 dev wlan0 proto static scope link metric 20
Output of "ip rule show" :
0: from all lookup local
1001: from all fwmark 0x100/0xff00 lookup 1001
1002: from all fwmark 0x200/0xff00 lookup 1002
1016: from all fwmark 0x1000/0xff00 lookup 1016
1017: from all fwmark 0x1100/0xff00 lookup 1017
1018: from all fwmark 0x1200/0xff00 lookup 1018
1019: from all fwmark 0x1300/0xff00 lookup 1019
1020: from all fwmark 0x1400/0xff00 lookup 1020
32766: from all lookup main
32767: from all lookup default
80000: from 192.168.1.1 nop
80000: from 127.0.0.1 nop
80000: from 192.168.16.108 nop
80000: from 172.24.210.132 nop
90000: from 192.168.1.1/24 nop
90000: from 127.0.0.1/8 nop
90000: from 192.168.16.108/24 nop
90000: from 172.24.210.132/23 nop
Output of "ip route list table 1001-1099" (1001-1015 = interface tables, 1016-1099 = policy tables) :
1001
default via 172.24.210.1 dev eth1
1002
default via 192.168.16.1 dev wlan0
1016
default via 172.24.210.1 dev eth1 metric 1
1017
default via 192.168.16.1 dev wlan0 metric 1
1018
default metric 1
nexthop via 172.24.210.1 dev eth1 weight 3
nexthop via 192.168.16.1 dev wlan0 weight 2
1019
default via 172.24.210.1 dev eth1 metric 1
default via 192.168.16.1 dev wlan0 metric 2
1020
default via 192.168.16.1 dev wlan0 metric 1
default via 172.24.210.1 dev eth1 metric 2
Output of "iptables -L -t mangle -v -n | awk '/mwan3/' RS=" :
Chain PREROUTING (policy ACCEPT 15264 packets, 7085K bytes)
pkts bytes target prot opt in out source destination
1779K 1110M mwan3_pre all -- * * 0.0.0.0/0 0.0.0.0/0
15264 7085K fwmark all -- * * 0.0.0.0/0 0.0.0.0/0
Chain INPUT (policy ACCEPT 1392 packets, 163K bytes)
pkts bytes target prot opt in out source destination
141K 19M mwan3_post all -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 488 packets, 151K bytes)
pkts bytes target prot opt in out source destination
37573 4926K mwan3_pre all -- * * 0.0.0.0/0 0.0.0.0/0
Chain POSTROUTING (policy ACCEPT 14253 packets, 7046K bytes)
pkts bytes target prot opt in out source destination
1660K 1093M mwan3_post all -- * * 0.0.0.0/0 0.0.0.0/0
Chain mwan3_default (1 references)
pkts bytes target prot opt in out source destination
1454 269K MARK all -- * * 0.0.0.0/0 224.0.0.0/3 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00
0 0 MARK all -- * * 0.0.0.0/0 127.0.0.0/8 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00
0 0 MARK all -- * * 0.0.0.0/0 127.0.0.1 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00
696 73552 MARK all -- * * 0.0.0.0/0 172.24.210.0/23 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00
49 4154 MARK all -- * * 0.0.0.0/0 192.168.1.0/24 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00
13 1146 MARK all -- * * 0.0.0.0/0 192.168.16.0/24 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00
Chain mwan3_interfaces (1 references)
pkts bytes target prot opt in out source destination
55989 3963K mwan3_wan2 all -- * * 0.0.0.0/0 0.0.0.0/0
1478 95430 mwan3_wan1 all -- * * 0.0.0.0/0 0.0.0.0/0
Chain mwan3_post (2 references)
pkts bytes target prot opt in out source destination
5006 1099K MARK all -- * eth1 0.0.0.0/0 !172.24.210.0/23 mark match ! 0x7f00/0xff00 MARK xset 0x100/0xff00
269K 45M MARK all -- * wlan0 0.0.0.0/0 !192.168.16.0/24 mark match ! 0x7f00/0xff00 MARK xset 0x200/0xff00
1058K 985M MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x8000/0x8000 MARK and 0xffff7fff
1802K 1112M CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 CONNMARK save mask 0xff00
Chain mwan3_pre (2 references)
pkts bytes target prot opt in out source destination
1817K 1115M CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 CONNMARK restore mask 0xff00
4510 3265K MARK all -- eth1 * !172.24.210.0/23 0.0.0.0/0 mark match ! 0x7f00/0xff00 MARK xset 0x8100/0xff00
505K 495M MARK all -- wlan0 * !192.168.16.0/24 0.0.0.0/0 mark match ! 0x7f00/0xff00 MARK xset 0x8200/0xff00
160K 21M mwan3_default all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00
56739 4063K mwan3_interfaces all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00
40399 2759K mwan3_rules all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00
519 81954 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00
Chain mwan3_rules (1 references)
pkts bytes target prot opt in out source destination
0 0 MARK tcp -- * * 192.168.21.0/24 0.0.0.0/0 multiport sports 0:65535 multiport dports 563 mark match 0x0/0xff00 MARK xset 0x1100/0xff00
0 0 MARK tcp -- * * 192.168.21.0/24 0.0.0.0/0 multiport sports 0:65535 multiport dports 995 mark match 0x0/0xff00 MARK xset 0x1000/0xff00
0 0 MARK tcp -- * * 0.0.0.0/0 88.154.0.0/16 multiport sports 0:65535 multiport dports 1024:65535 mark match 0x0/0xff00 statistic mode random probability 0.39999999991 MARK xset 0x200/0xff00
0 0 MARK tcp -- * * 0.0.0.0/0 88.154.0.0/16 multiport sports 0:65535 multiport dports 1024:65535 mark match 0x0/0xff00 statistic mode random probability 0.99999999953 MARK xset 0x100/0xff00
0 0 MARK tcp -- * * 0.0.0.0/0 77.11.41.0/24 multiport sports 0:65535 multiport dports 1024:65535 mark match 0x0/0xff00 MARK xset 0x1300/0xff00
0 0 MARK udp -- * * 0.0.0.0/0 112.136.0.0/16 multiport sports 0:65535 multiport dports 5352 mark match 0x0/0xff00 MARK xset 0x1400/0xff00
1047 61742 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 MARK xset 0x1200/0xff00
Chain mwan3_wan1 (1 references)
pkts bytes target prot opt in out source destination
317 24271 MARK all -- * * 172.24.210.132 0.0.0.0/0 MARK xset 0x100/0xff00
Chain mwan3_wan2 (1 references)
pkts bytes target prot opt in out source destination
5383 432K MARK all -- * * 192.168.16.108 0.0.0.0/0 MARK xset 0x200/0xff00
Output of "ifconfig" :
br-lan Link encap:Ethernet HWaddr C6:3D:C7:8B:94:E7
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::c43d:c7ff:fe8b:94e7/64 Scope:Link
inet6 addr: fda1:b0d1:92a3::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:635711 errors:0 dropped:0 overruns:0 frame:0
TX packets:1062892 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:109757465 (104.6 MiB) TX bytes:1003781703 (957.2 MiB)
eth0 Link encap:Ethernet HWaddr C6:3D:C7:8B:94:E7
inet6 addr: fe80::c43d:c7ff:fe8b:94e7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:636325 errors:0 dropped:117 overruns:13 frame:0
TX packets:1062905 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:121257077 (115.6 MiB) TX bytes:1008035460 (961.3 MiB)
Interrupt:4
eth0.1 Link encap:Ethernet HWaddr C6:3D:C7:8B:94:E7
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:635729 errors:0 dropped:0 overruns:0 frame:0
TX packets:1062892 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:109758527 (104.6 MiB) TX bytes:1003781703 (957.2 MiB)
eth1 Link encap:Ethernet HWaddr C4:3D:C7:8B:94:E8
inet addr:172.24.210.132 Bcast:172.24.211.255 Mask:255.255.254.0
inet6 addr: fe80::c63d:c7ff:fe8b:94e8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:756036 errors:0 dropped:0 overruns:0 frame:0
TX packets:342951 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:526600193 (502.2 MiB) TX bytes:65248388 (62.2 MiB)
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:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2044 (1.9 KiB) TX bytes:2044 (1.9 KiB)
wlan0 Link encap:Ethernet HWaddr C4:3D:C7:8B:94:E7
inet addr:192.168.16.108 Bcast:192.168.16.255 Mask:255.255.255.0
inet6 addr: fe80::c63d:c7ff:fe8b:94e7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:515197 errors:0 dropped:0 overruns:0 frame:0
TX packets:272354 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:505230319 (481.8 MiB) TX bytes:54832891 (52.2 MiB)
Output of "cat /etc/config/mwan3" :
# This is a mwan3 example config. For mwan3 to work you will need at least:
#
# - 2 interfaces
# - 2 members
# - 1 policy
# - 1 rule
#
# First define all your wan interfaces. Interface name must match with the
# name used in your network configuration:
config 'interface' 'wan1'
option 'enabled' '1'
list 'track_ip' '8.8.4.4'
list 'track_ip' '8.8.8.8'
list 'track_ip' '208.67.222.222'
list 'track_ip' '208.67.220.220'
option 'reliability' '2'
option 'count' '1'
option 'timeout' '2'
option 'interval' '5'
option 'down' '3'
option 'up' '8'
option 'reroute' '0'
config 'interface' 'wan2'
option 'enabled' '1'
list 'track_ip' '8.8.8.8'
list 'track_ip' '208.67.220.220'
option 'reliability' '1'
option 'count' '1'
option 'timeout' '2'
option 'interval' '5'
option 'down' '3'
option 'up' '8'
option 'reroute' '0'
# Next define a member and configure metric and weight values for this member.
# Each interface can have multiple member definitions. Give each member a correct
# name (A-Z, a-z, 0-9, "_" and no spaces).
config 'member' 'wan1_m1_w3'
option 'interface' 'wan1'
option 'metric' '1'
option 'weight' '3'
config 'member' 'wan1_m2_w3'
option 'interface' 'wan1'
option 'metric' '2'
option 'weight' '3'
config 'member' 'wan2_m1_w2'
option 'interface' 'wan2'
option 'metric' '1'
option 'weight' '2'
config 'member' 'wan2_m2_w2'
option 'interface' 'wan2'
option 'metric' '2'
option 'weight' '2'
# After that create a routing policy. A routing policy consist of one or more
# members. Give each policy a correct name (A-Z, a-z, 0-9, "_" and no spaces). You
# can create multiple policies, so that it is possible for different traffic to
# have different primary and/or backup interfaces.
config 'policy' 'wan1_only'
list 'use_member' 'wan1_m1_w3'
config 'policy' 'wan2_only'
list 'use_member' 'wan2_m1_w2'
config 'policy' 'wan1_wan2_loadbalanced'
list 'use_member' 'wan1_m1_w3'
list 'use_member' 'wan2_m1_w2'
config 'policy' 'wan1_pri_wan2_sec'
list 'use_member' 'wan1_m1_w3'
list 'use_member' 'wan2_m2_w2'
config 'policy' 'wan2_pri_wan1_sec'
list 'use_member' 'wan1_m2_w3'
list 'use_member' 'wan2_m1_w2'
# And to finish the config define your traffic rules. Rules are matched in top to
# bottom order. If you define a rule and it matches, all following rules are ignored.
#
# If the option equalize is set, mwan3 will load-balance each new session to the same
# host. If not set, it will load-balance based on destination.
config 'rule' 'rule1'
option 'src_ip' '192.168.21.0/24'
option 'proto' 'tcp'
option 'dest_port' '563'
option 'use_policy' 'wan2_only'
config 'rule' 'rule2'
option 'src_ip' '192.168.21.0/24'
option 'proto' 'tcp'
option 'dest_port' '995'
option 'use_policy' 'wan1_only'
config 'rule' 'rule3'
option 'dest_ip' '88.154.0.0/16'
option 'proto' 'tcp'
option 'dest_port' '1024:65535'
option 'equalize' '1'
option 'use_policy' 'wan1_wan2_loadbalanced'
config 'rule' 'rule4'
option 'dest_ip' '77.11.41.0/24'
option 'proto' 'tcp'
option 'dest_port' '1024:65535'
option 'use_policy' 'wan1_pri_wan2_sec'
config 'rule' 'rule5'
option 'dest_ip' '112.136.0.0/16'
option 'proto' 'udp'
option 'dest_port' '5352'
option 'use_policy' 'wan2_pri_wan1_sec'
config 'rule' 'rule6'
option 'dest_ip' '0.0.0.0/0'
option 'use_policy' 'wan1_wan2_loadbalanced'
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 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 ifname 'eth1'
option proto 'dhcp'
option metric '10'
config globals 'globals'
option ula_prefix 'fda1:b0d1:92a3::/48'
config switch
option name 'rtl8366s'
option reset '1'
option enable_vlan '1'
option blinkrate '2'
config switch_vlan
option device 'rtl8366s'
option vlan '1'
option ports '0 1 2 3 5t'
config switch_port
option device 'rtl8366s'
option port '1'
option led '6'
config switch_port
option device 'rtl8366s'
option port '2'
option led '9'
config switch_port
option device 'rtl8366s'
option port '5'
option led '2'
config interface 'wan2'
option proto 'dhcp'
option metric '20'
(Last edited by yanggis on 31 Oct 2013, 07:52)