Hi,Adze.
The mwan3 is very usefull for me, I have used it for several months. Thank you very much.
However,I met some troubles on it today.
I found the IP rules can be created if an interface up,however ,it can NOT be deleted when the interface down. Could you please check the configure for me ?
(update: I updated a new firmware for my router and re-configured the mwan3 then found the issue.)
root@OpenWrt:~# ip rule show
0: from all lookup local
1001: from 192.168.119.145 fwmark 0x0/0x8000 lookup 1001
1002: from 192.168.111.245 fwmark 0x0/0x8000 lookup 1002
1003: from 192.168.120.245 fwmark 0x0/0x8000 lookup 1003
1004: from 192.168.122.145 fwmark 0x0/0x8000 lookup 1004
1008: from all fwmark 0x100/0xff00 lookup 1001
1009: from all fwmark 0x200/0xff00 lookup 1002
1010: from all fwmark 0x300/0xff00 lookup 1003
1011: from all fwmark 0x400/0xff00 lookup 1004
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
root@OpenWrt:~# logread|grep mwan3
Jan 13 19:56:36 OpenWrt user.notice root: mwan3: ifup interface wan4 (eth0.4)
Jan 13 19:56:59 OpenWrt user.notice root: mwan3: No gateway found for interface wan (eth0.1)
Jan 13 19:57:18 OpenWrt user.notice root: mwan3: No gateway found for interface wan2 (eth0.2)
Jan 13 19:57:35 OpenWrt user.notice root: mwan3: No gateway found for interface wan3 (eth0.3)
Jan 13 19:57:41 OpenWrt user.notice root: mwan3: ifup interface wan4 (eth0.4)
Jan 13 20:03:14 OpenWrt user.notice root: mwan3: ifdown interface wan4 (eth0.4)
Jan 13 20:03:52 OpenWrt user.notice root: mwan3: ifup interface wan4 (eth0.4)
Jan 13 20:05:28 OpenWrt user.notice root: mwan3: Lost 1 ping(s) on interface wan4 (eth0.4)
Jan 13 20:32:39 OpenWrt user.notice root: mwan3: Lost 1 ping(s) on interface wan4 (eth0.4)
Jan 13 21:21:18 OpenWrt user.notice root: mwan3: Lost 1 ping(s) on interface wan4 (eth0.4)
Jan 13 21:32:03 OpenWrt user.notice root: mwan3: ifup interface wan (eth0.1)
Jan 13 21:32:23 OpenWrt user.notice root: mwan3: ifup interface wan2 (eth0.2)
Jan 13 21:32:34 OpenWrt user.notice root: mwan3: ifup interface wan3 (eth0.3)
Jan 13 21:32:40 OpenWrt user.notice root: mwan3: Interface wan (eth0.1) is offline
Jan 13 21:32:42 OpenWrt user.notice root: mwan3: ifdown interface wan (eth0.1)
Jan 13 21:32:59 OpenWrt user.notice root: mwan3: Interface wan2 (eth0.2) is offline
Jan 13 21:32:59 OpenWrt user.notice root: mwan3: ifdown interface wan2 (eth0.2)
Jan 13 21:33:11 OpenWrt user.notice root: mwan3: Interface wan3 (eth0.3) is offline
Jan 13 21:33:11 OpenWrt user.notice root: mwan3: ifdown interface wan3 (eth0.3)
root@OpenWrt:~#
/etc/config/network
root@OpenWrt:~# cat /etc/config/network
#### VLAN configuration
config switch eth0
option enable 1
config switch_vlan eth0_0
option device "eth0"
option vlan 0
option ports "4 8*"
config switch_vlan eth0_1
option device "eth0"
option vlan 1
option ports "0 8"
config switch_vlan eth0_2
option device "eth0"
option vlan 2
option ports "1 8"
config switch_vlan eth0_3
option device "eth0"
option vlan 3
option ports "2 8"
config switch_vlan eth0_4
option device "eth0"
option vlan 4
option ports "3 8"
#### Loopback configuration
config interface loopback
option ifname "lo"
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
#### LAN configuration
config interface lan
option type bridge
option ifname "eth0.0"
option proto static
option ipaddr 192.168.115.100
option netmask 255.255.255.0
#### WAN configuration
config interface wan
option ifname "eth0.1"
option proto dhcp
option metric 40
option accept_ra 1
config interface wan2
option ifname "eth0.2"
option proto dhcp
option metric 30
option accept_ra 1
config interface wan3
option ifname "eth0.3"
option proto dhcp
option metric 20
option accept_ra 1
config interface wan4
option ifname "eth0.4"
option proto dhcp
option metric 10
option accept_ra 1
root@OpenWrt:~#
/etc/config/firware
root@OpenWrt:~# cat /etc/config/firewall
config defaults
option syn_flood 1
option input DROP
option output ACCEPT
option forward REJECT
# Uncomment this line to disable ipv6 rules
# option disable_ipv6 1
config zone
option name lan
option network 'lan'
option input ACCEPT
option output ACCEPT
option forward REJECT
config zone
option name wan
option network 'wan wan2 wan3 wan4'
option input REJECT
option output ACCEPT
option forward REJECT
option masq 1
option mtu_fix 1
config forwarding
option src lan
option dest wan
# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
option name Allow-DHCP-Renew
option src wan
option proto udp
option dest_port 68
option target ACCEPT
option family ipv4
# Allow IPv4 ping
config rule
option name Allow-Ping
option src wan
option proto icmp
option icmp_type echo-request
option family ipv4
option target ACCEPT
# Allow DHCPv6 replies
# see https://dev.openwrt.org/ticket/10381
config rule
option name Allow-DHCPv6
option src wan
option proto udp
option src_ip fe80::/10
option src_port 547
option dest_ip fe80::/10
option dest_port 546
option family ipv6
option target ACCEPT
# Allow essential incoming IPv6 ICMP traffic
config rule
option name Allow-ICMPv6-Input
option src wan
option proto icmp
list icmp_type echo-request
list icmp_type echo-reply
list icmp_type destination-unreachable
list icmp_type packet-too-big
list icmp_type time-exceeded
list icmp_type bad-header
list icmp_type unknown-header-type
list icmp_type router-solicitation
list icmp_type neighbour-solicitation
list icmp_type router-advertisement
list icmp_type neighbour-advertisement
option limit 1000/sec
option family ipv6
option target ACCEPT
# Allow essential forwarded IPv6 ICMP traffic
config rule
option name Allow-ICMPv6-Forward
option src wan
option dest *
option proto icmp
list icmp_type echo-request
list icmp_type echo-reply
list icmp_type destination-unreachable
list icmp_type packet-too-big
list icmp_type time-exceeded
list icmp_type bad-header
list icmp_type unknown-header-type
option limit 1000/sec
option family ipv6
option target ACCEPT
# include a file with users custom iptables rules
config include
option path /etc/firewall.user
### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
# option src lan
# option src_ip 192.168.45.2
# option dest wan
# option proto tcp
# option target REJECT
# block a specific mac on wan
#config rule
# option dest wan
# option src_mac 00:11:22:33:44:66
# option target REJECT
# block incoming ICMP traffic on a zone
#config rule
# option src lan
# option proto ICMP
# option target DROP
# port redirect port coming in on wan to lan
#config redirect
# option src wan
# option src_dport 80
# option dest lan
# option dest_ip 192.168.16.235
# option dest_port 80
# option proto tcp
# port redirect of remapped ssh port (22001) on wan
#config redirect
# option src wan
# option src_dport 22001
# option dest lan
# option dest_port 22
# option proto tcp
# allow IPsec/ESP and ISAKMP passthrough
#config rule
# option src wan
# option dest lan
# option protocol esp
# option target ACCEPT
#config rule
# option src wan
# option dest lan
# option src_port 500
# option dest_port 500
# option proto udp
# option target ACCEPT
### FULL CONFIG SECTIONS
#config rule
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 80
# option dest wan
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp
# option target REJECT
#config redirect
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 1024
# option src_dport 80
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp
root@OpenWrt:~#
/etc/config/mwan3
root@OpenWrt:~# cat /etc/config/mwan3
config member 'wan_m2_w3'
option weight '3'
option interface 'wan'
option metric '2'
config member 'wan2_m2_w3'
option interface 'wan2'
option metric '2'
option weight '3'
config member 'wan3_m2_w3'
option interface 'wan3'
option metric '2'
option weight '3'
config member 'wan4_m2_w3'
option interface 'wan4'
option metric '2'
option weight '3'
config policy 'wan1_only'
list use_member 'wan1_m1_w3'
config policy 'wan2_only'
list use_member 'wan2_m1_w2'
config policy 'wan_wan2_wan3_wan4_loadbalanced'
list use_member 'wan_m2_w3'
list use_member 'wan2_m2_w3'
list use_member 'wan3_m2_w3'
list use_member 'wan4_m2_w3'
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'
config rule
option dest_ip '0.0.0.0/0'
option proto 'all'
option use_policy 'wan_wan2_wan3_wan4_loadbalanced'
option equalize '1'
config interface 'wan'
option enabled '1'
option count '1'
option timeout '2'
option interval '5'
option down '3'
option reliability '2'
list track_ip '61.135.169.125'
list track_ip '202.108.33.70'
list track_ip '61.135.181.167'
list track_ip '103.8.222.23'
option up '8'
config interface 'wan2'
option enabled '1'
list track_ip '61.135.169.125'
list track_ip '202.108.33.70'
list track_ip '61.135.181.167'
list track_ip '103.8.222.23'
option reliability '2'
option count '1'
option timeout '2'
option interval '5'
option down '3'
option up '8'
config interface 'wan3'
option enabled '1'
list track_ip '61.135.169.125'
list track_ip '202.108.33.70'
list track_ip '61.135.181.167'
list track_ip '103.8.222.23'
option reliability '2'
option count '1'
option timeout '2'
option interval '5'
option down '3'
option up '8'
config interface 'wan4'
option enabled '1'
list track_ip '61.135.169.125'
list track_ip '202.108.33.70'
list track_ip '61.135.181.167'
list track_ip '103.8.222.23'
option reliability '2'
option count '1'
option timeout '2'
option interval '5'
option down '3'
option up '8'
root@OpenWrt:~#
route -n
root@OpenWrt:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 127.0.0.1 0.0.0.0 UG 0 0 0 lo
0.0.0.0 192.168.122.1 0.0.0.0 UG 10 0 0 eth0.4
0.0.0.0 192.168.120.1 0.0.0.0 UG 20 0 0 eth0.3
0.0.0.0 192.168.111.1 0.0.0.0 UG 30 0 0 eth0.2
0.0.0.0 192.168.119.1 0.0.0.0 UG 40 0 0 eth0.1
192.168.111.0 0.0.0.0 255.255.255.0 U 30 0 0 eth0.2
192.168.115.0 0.0.0.0 255.255.255.0 U 0 0 0 br-lan
192.168.119.0 0.0.0.0 255.255.255.0 U 40 0 0 eth0.1
192.168.120.0 0.0.0.0 255.255.255.0 U 20 0 0 eth0.3
192.168.122.0 0.0.0.0 255.255.255.0 U 10 0 0 eth0.4
root@OpenWrt:~#
Thank you in advance.
(Last edited by sagitar on 14 Jan 2013, 05:27)