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.

sgelband wrote:

1) Can I define a pool of OpenVPN tun interfaces to be my Wan connections?

Yes

sgelband wrote:

2) What is the fastest time I can set for detecting a fail-over? sub-second? (I am trying not to drop a call)

Sub-second is not possible. A practical minimum i would say is about three seconds

sgelband wrote:

3) can I setup a rule to only route my VoIP phones over this link? based on vlan ID? based on source IP?

Yes, rules can be based on source and/or destination ip address and/or ports

Hello,

What it the right setup to switch to 3G when wan is down and switch back to wan when wan is up?

At the beginning:
root@openwrt:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 3gg
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
192.168.30.0    0.0.0.0         255.255.255.0   U     10     0        0 eth1
0.0.0.0         192.168.30.1    0.0.0.0         UG    10     0        0 eth1
0.0.0.0         10.64.64.64     0.0.0.0         UG    30     0        0 3gg

64 bytes from 8.8.8.8: seq=109 ttl=47 time=25.610 ms
64 bytes from 8.8.8.8: seq=110 ttl=47 time=25.819 ms
64 bytes from 8.8.8.8: seq=111 ttl=47 time=25.669 ms
64 bytes from 8.8.8.8: seq=112 ttl=47 time=25.623 ms
64 bytes from 8.8.8.8: seq=113 ttl=47 time=25.315 ms
64 bytes from 8.8.8.8: seq=114 ttl=47 time=25.166 ms


After ifconfig eth1 down, it switches to 3G:

64 bytes from 8.8.8.8: seq=150 ttl=44 time=70.635 ms
64 bytes from 8.8.8.8: seq=151 ttl=44 time=70.490 ms
64 bytes from 8.8.8.8: seq=152 ttl=44 time=70.373 ms
64 bytes from 8.8.8.8: seq=153 ttl=44 time=70.270 ms
64 bytes from 8.8.8.8: seq=154 ttl=44 time=70.151 ms
64 bytes from 8.8.8.8: seq=155 ttl=44 time=70.028 ms

root@openwrt:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 3gg
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
0.0.0.0         10.64.64.64     0.0.0.0         UG    30     0        0 3gg


After ifconfig eth1 up strange situation happens:

root@openwrt:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 3gg
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
192.168.30.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         10.64.64.64     0.0.0.0         UG    30     0        0 3gg

64 bytes from 8.8.8.8: seq=5 ttl=44 time=71.091 ms
64 bytes from 8.8.8.8: seq=6 ttl=44 time=70.959 ms
64 bytes from 8.8.8.8: seq=7 ttl=44 time=70.824 ms
64 bytes from 8.8.8.8: seq=8 ttl=44 time=70.708 ms
64 bytes from 8.8.8.8: seq=9 ttl=44 time=70.582 ms

My configuration is:

Firewall default output policy (must be ACCEPT) :

ACCEPT

Output of "ip route show" :

10.64.64.64 dev 3gg proto kernel scope link src 188.196.84.26
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1
192.168.30.0/24 dev eth1 proto static scope link metric 10
default via 192.168.30.1 dev eth1 proto static metric 10
default via 10.64.64.64 dev 3gg proto static metric 30

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
32766: from all lookup main
32767: from all lookup default

Output of "ip route list table 1001-1027" :

1001
default via 10.64.64.64 dev 3gg 1002
default via 192.168.30.1 dev eth1 1016
default via 192.168.30.1 dev eth1 metric 1 default via 10.64.64.64 dev 3gg metric 2 1017
default via 192.168.30.1 dev eth1 metric 1 1018
default via 10.64.64.64 dev 3gg metric 1
Output of "iptables -L -t mangle -v -n | awk '/mwan3/' RS=" :

Chain PREROUTING (policy ACCEPT 1171 packets, 460K bytes)
pkts bytes target prot opt in out source destination
44134 12M mwan3_pre all -- * * 0.0.0.0/0 0.0.0.0/0

Chain INPUT (policy ACCEPT 200 packets, 17294 bytes)
pkts bytes target prot opt in out source destination
13930 1280K mwan3_post all -- * * 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT 138 packets, 49994 bytes)
pkts bytes target prot opt in out source destination
9754 2097K mwan3_pre all -- * * 0.0.0.0/0 0.0.0.0/0

Chain POSTROUTING (policy ACCEPT 1085 packets, 492K bytes)
pkts bytes target prot opt in out source destination
37863 12M 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
14 1747 MARK all -- * * 0.0.0.0/0 224.0.0.0/3 mark match !0x8000/0x8000 MARK or 0x8000
0 0 MARK all -- * * 0.0.0.0/0 10.64.64.64 mark match !0x8000/0x8000 MARK or 0x8000
216 56243 MARK all -- * * 0.0.0.0/0 192.168.1.0/24 mark match !0x8000/0x8000 MARK or 0x8000
0 0 MARK all -- * * 0.0.0.0/0 192.168.30.0/24 mark match !0x8000/0x8000 MARK or 0x8000

Chain mwan3_post (2 references)
pkts bytes target prot opt in out source destination
521 251K MARK all -- * eth1 0.0.0.0/0 0.0.0.0/0 mark match !0x8000/0x8000 MARK xset 0x200/0xff00
3548 255K MARK all -- * 3gg 0.0.0.0/0 0.0.0.0/0 mark match !0x8000/0x8000 MARK xset 0x100/0xff00
27503 8669K MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x8000/0x8000 MARK and 0xffff7fff
51793 13M 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
53888 14M CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 CONNMARK restore mask 0xff00
540 201K MARK all -- eth1 * 0.0.0.0/0 0.0.0.0/0 MARK xset 0x8200/0xff00
837 72358 MARK all -- 3gg * 0.0.0.0/0 0.0.0.0/0 MARK xset 0x8100/0xff00
36034 7254K mwan3_default all -- * * 0.0.0.0/0 0.0.0.0/0 mark match !0x8000/0x8000
7090 520K mwan3_rules all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00

Chain mwan3_rules (1 references)
pkts bytes target prot opt in out source destination
91 6317 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 MARK xset 0x1000/0xff00

Output of "ifconfig" :

3gg Link encap:Point-to-Point Protocol
inet addr:188.196.84.26 P-t-P:10.64.64.64 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:845 errors:0 dropped:0 overruns:0 frame:0
TX packets:3558 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:72510 (70.8 KiB) TX bytes:255119 (249.1 KiB)

br-lan Link encap:Ethernet HWaddr 00:D0:50:43:BF:C6
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2d0:50ff:fe43:bfc6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22550 errors:0 dropped:0 overruns:0 frame:0
TX packets:16874 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4937607 (4.7 MiB) TX bytes:7825113 (7.4 MiB)

eth0 Link encap:Ethernet HWaddr 00:D0:50:43:BF:C6
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22605 errors:0 dropped:0 overruns:0 frame:0
TX packets:16836 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5623087 (5.3 MiB) TX bytes:7823261 (7.4 MiB)
Base address:0x6000

eth1 Link encap:Ethernet HWaddr 00:D0:50:43:BF:C7
inet addr:192.168.30.103 Bcast:192.168.30.255 Mask:255.255.255.0
inet6 addr: fe80::2d0:50ff:fe43:bfc7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20259 errors:0 dropped:0 overruns:0 frame:0
TX packets:15199 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7150504 (6.8 MiB) TX bytes:4633305 (4.4 MiB)
Base address:0xe000

eth1.242 Link encap:Ethernet HWaddr 00:D0:50:43:BF:C7
inet6 addr: fe80::2d0:50ff:fe43:bfc7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:800 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:309512 (302.2 KiB)

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:16436 Metric:1
RX packets:3224 errors:0 dropped:0 overruns:0 frame:0
TX packets:3224 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:209362 (204.4 KiB) TX bytes:209362 (204.4 KiB)

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

config rule 'wan_g3'
option dest_ip '0.0.0.0/0'
option use_policy 'wan_pri_3g_sec'
option proto 'all'

config interface '3g'
option enabled '1'
option reliability '1'
option count '1'
option timeout '2'
option interval '5'
list track_ip '8.8.8.8'
list track_ip '8.8.4.4'
option down '3'
option up '5'

config interface 'wan'
option enabled '1'
option reliability '1'
option count '1'
option timeout '2'
option interval '5'
list track_ip '8.8.8.8'
list track_ip '8.8.4.4'
option down '3'
option up '5'

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

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

config member '3g_m1_w2'
option interface '3g'
option metric '1'
option weight '3'

config member '3g_m2_w2'
option interface '3g'
option metric '2'
option weight '3'

config policy 'wan_pri_3g_sec'
list use_member 'wan_m1_w3'
list use_member '3g_m2_w2'

config policy 'wan_only'
list use_member 'wan_m1_w3'

config policy '3g_only'
list use_member '3g_m1_w2'

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

config switch 'eth0'
option enable '1'

config switch_vlan 'eth0_1'
option device 'eth0'
option vlan '1'
option ports '0 1 2 3 4'

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'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'

config interface 'mng'
option proto 'dhcp'
option ifname 'eth1.242'

config interface 'wan'
option _orig_ifname 'eth1.100'
option _orig_bridge 'false'
option ifname 'eth1'
option proto 'static'
option ipaddr '192.168.30.103'
option netmask '255.255.255.0'
option gateway '192.168.30.1'
option metric '10'

config route
option interface 'mng'
option target '172.28.2.49'
option gateway '192.168.242.1'

config route
option interface 'mng'
option target '172.18.48.19'
option gateway '192.168.242.1'

config interface '3g'
option ifname '3gg'
option device '/dev/ttyUSB2'
option service 'umts'
option proto '3g'
option apn 'AGD'
option pincode '1234'
option username 'user'
option password 'user'
option ctrldev '/dev/ttyUSB1'
option metric '30'

Hi vinca,


The problem you are facing does not look like a mwan3 problem but a general problem. The way you test your failover (ifconfig {up|down}) does not work. Please try it by plugging / unplugging the eth1 interface. You could also use the command "ACTION=ifdown DEVICE=eth1 INTERFACE=wan /sbin/hotplug-call iface" to trigger an interface down.

The main problem is that there is no default route available for eth1 after "ifconfig eth1 up". This is why mwan3 dows not work.

After ifconfig eth1 up strange situation happens:

root@openwrt:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 3gg
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
192.168.30.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         10.64.64.64     0.0.0.0         UG    30     0        0 3gg
khanh3t wrote:

ps: i cant remove ip server ping in interface

There's some buggy behavior in LuCI pages which effects dynamic lists. I confirmed it on the DHCP and DNS page. If you want to confirm it just run a similar test on that page in the domain whitelist dynamic lists.

In the dynamic list boxes if you have say 4 IPs set for pinging (8.8.8.8, 8.8.4.4, 1.1.1.1, 2.2.2.2 for example) and then you edit the interface and remove all the boxes but one and change the last entry when you click save and apply it will put back all of the entries you deleted and add your new entry as a 5th option (in my case it added 192.168.51.1 when I removed all those IPs and replaced the last one with that and tried to Save & Apply)

Workaround:
Delete all the dynamic list boxes and completely blank out the last one and Save & Apply then go back and configure them again

(Last edited by arfett on 24 May 2013, 22:10)

btw. does somebody have the current ipks for the ath7xxx (TP-Link TLWR1043ND)? smile


Cheers Thomy

Hi-
How and where to add entries to WAN1 was only for 192.168.0.243 ?
thx

grisha wrote:

Hi-
How and where to add entries to WAN1 was only for 192.168.0.243 ?
thx

You should read the first post in this thread.

There were several reports on load balancing issues recently, have they been fixed?

arfett wrote:
Thomymaster wrote:

does somebody have the current ipks for the ath7xxx (TP-Link TLWR1043ND)?

http://www.mediafire.com/folder/fvd0r4i8n4ikg/mwan3

great  thanks arfett

i've been waitting for someone compiling the new packages for long!

biatche wrote:

There were several reports on load balancing issues recently, have they been fixed?

The issues that i heard of are still  unresolved. It is not clear what the source of the issue is or that it even is a mwan3 problem. Are you seeing issues with the latest version?

(Last edited by Adze on 26 May 2013, 12:39)

Adze wrote:
biatche wrote:

There were several reports on load balancing issues recently, have they been fixed?

The issues that i heard of are still  unresolved. It is not clear what the source of the issue is or that it even is a mwan3 problem. Are you seeing issues with the latest version?

I don't use load balancing - was just wondering.. and considering 'my possibilities'.

Hi,Adze,
I am using OpenWrt Barrier Breaker r36641 / LuCI Trunk (svn-r9814) ,mwan3 is not that stable,
I can post  the troubleshooting if you need ,and which version of openwrt works well? 12.09 final?

brick2008 wrote:

I am using OpenWrt Barrier Breaker r36641 / LuCI Trunk (svn-r9814) ,mwan3 is not that stable,
I can post  the troubleshooting if you need ,and which version of openwrt works well? 12.09 final?

I had instability issues also. The router became unreachable from any interface over time. It was actually the firewall3 deamon that caused this. I now run r36713 and haven't seen that instability issue since.

Maybe you could try r36713 and the latest mwan3?

(Last edited by Adze on 27 May 2013, 07:08)

Adze wrote:
brick2008 wrote:

I am using OpenWrt Barrier Breaker r36641 / LuCI Trunk (svn-r9814) ,mwan3 is not that stable,
I can post  the troubleshooting if you need ,and which version of openwrt works well? 12.09 final?

I had instability issues also. The router became unreachable from any interface over time.

I confirm that. The same happened once and I had to reboot (manually) the router.

Adze wrote:
brick2008 wrote:

I am using OpenWrt Barrier Breaker r36641 / LuCI Trunk (svn-r9814) ,mwan3 is not that stable,
I can post  the troubleshooting if you need ,and which version of openwrt works well? 12.09 final?

I had instability issues also. The router became unreachable from any interface over time. It was actually the firewall3 deamon that caused this. I now run r36713 and haven't seen that instability issue since.

Maybe you could try r36713 and the latest mwan3?

Where to download the latest mwan3?  213.136.13.52 is down.

brick2008 wrote:

Where to download the latest mwan3?  213.136.13.52 is down.

See start post:

edit4: GitHub repo is up: https://github.com/Adze1502/mwan . svn repo is down. Please update your "feeds.conf.default" file with the line "src-git mwan git://github.com/Adze1502/mwan.git" and remove the old svn repo.

Thanks arfett for compiling and uploading the latest build smile

I have a problem with the newest version. Switching to 3G works fine but when it switched to 3G i am not able to lookup an IP adress (even if i ssh to my router and do nslookup "www.google.de" i get "connection refused").

Here is the output of the troubleshooting page:

MWAN3 package versions : 

mwan3 - 1.2-5
luci-app-mwan3 - 1.0-3

Firewall default output policy (must be ACCEPT) : 

ACCEPT

Output of "ip route show" : 

default via 10.64.64.64 dev 3g-wwan  proto static 
10.64.64.64 dev 3g-wwan  proto kernel  scope link  src 10.33.7.153 
188.99.176.1 dev pppoe-wan  proto kernel  scope link  src 188.99.188.141 
192.168.2.0/24 dev br-lan  proto kernel  scope link  src 192.168.2.1 

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 
32766:    from all lookup main 
32767:    from all lookup default 

Output of "ip route list table 1001-1099" (1001-1015 = interface tables, 1016-1099 = policy tables) : 

1001
default via 188.99.176.1 dev pppoe-wan 
1002
default via 10.64.64.64 dev 3g-wwan 
1016
default via 188.99.176.1 dev pppoe-wan  metric 1 
default via 10.64.64.64 dev 3g-wwan  metric 2 

Output of "iptables -L -t mangle -v -n | awk '/mwan3/' RS=" : 

Chain PREROUTING (policy ACCEPT 4215 packets, 1263K bytes)
 pkts bytes target     prot opt in     out     source               destination         
10865 3991K mwan3_pre  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain INPUT (policy ACCEPT 1961 packets, 180K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 3856  359K mwan3_post  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain OUTPUT (policy ACCEPT 2049 packets, 803K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 3834 1229K mwan3_pre  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain POSTROUTING (policy ACCEPT 4297 packets, 1885K bytes)
 pkts bytes target     prot opt in     out     source               destination         
10734 4845K 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         
   13   839 MARK       all  --  *      *       0.0.0.0/0            224.0.0.0/3         mark match !0x8000/0x8000 MARK or 0x8000 
    0     0 MARK       all  --  *      *       0.0.0.0/0            127.0.0.0/8         mark match !0x8000/0x8000 MARK or 0x8000 
    0     0 MARK       all  --  *      *       0.0.0.0/0            10.64.64.64         mark match !0x8000/0x8000 MARK or 0x8000 
    0     0 MARK       all  --  *      *       0.0.0.0/0            188.99.176.1        mark match !0x8000/0x8000 MARK or 0x8000 
 2583  863K MARK       all  --  *      *       0.0.0.0/0            192.168.2.0/24      mark match !0x8000/0x8000 MARK or 0x8000 

Chain mwan3_post (2 references)
 pkts bytes target     prot opt in     out     source               destination         
  316 26544 MARK       all  --  *      3g-wwan  0.0.0.0/0            0.0.0.0/0           mark match !0x8000/0x8000 MARK xset 0x200/0xff00 
 2071  260K MARK       all  --  *      pppoe-wan  0.0.0.0/0            0.0.0.0/0           mark match !0x8000/0x8000 MARK xset 0x100/0xff00 
10533 4711K MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0           mark match 0x8000/0x8000 MARK and 0xffff7fff 
14590 5204K 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         
14699 5221K CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK restore mask 0xff00 
  317 26628 MARK       all  --  3g-wwan *       0.0.0.0/0            0.0.0.0/0           MARK xset 0x8200/0xff00 
 2562 1408K MARK       all  --  pppoe-wan *       0.0.0.0/0            0.0.0.0/0           MARK xset 0x8100/0xff00 
 9653 1912K mwan3_default  all  --  *      *       0.0.0.0/0            0.0.0.0/0           mark match !0x8000/0x8000 
 1365  104K mwan3_rules  all  --  *      *       0.0.0.0/0            0.0.0.0/0           mark match 0x0/0xff00 

Chain mwan3_rules (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  757 61077 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0           mark match 0x0/0xff00 MARK xset 0x1000/0xff00 

Output of "ifconfig" : 

3g-wwan   Link encap:Point-to-Point Protocol  
          inet addr:10.33.7.153  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:326 errors:0 dropped:0 overruns:0 frame:0
          TX packets:326 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:26808 (26.1 KiB)  TX bytes:26844 (26.2 KiB)

br-lan    Link encap:Ethernet  HWaddr B0:48:7A:EB:70:0A  
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5909 errors:0 dropped:127 overruns:0 frame:0
          TX packets:6643 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:723004 (706.0 KiB)  TX bytes:4442372 (4.2 MiB)

eth0      Link encap:Ethernet  HWaddr B0:48:7A:EB:70:0A  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4668 errors:0 dropped:0 overruns:60145 frame:0
          TX packets:4766 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2378947 (2.2 MiB)  TX bytes:569030 (555.6 KiB)
          Interrupt:4 

eth0.1    Link encap:Ethernet  HWaddr B0:48:7A:EB:70:0A  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:750 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:108307 (105.7 KiB)

eth0.2    Link encap:Ethernet  HWaddr B0:48:7A:EB:70:0A  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3570 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3079 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1475446 (1.4 MiB)  TX bytes:336153 (328.2 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:42 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3426 (3.3 KiB)  TX bytes:3426 (3.3 KiB)

pppoe-wan Link encap:Point-to-Point Protocol  
          inet addr:188.99.188.141  P-t-P:188.99.176.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:2567 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2076 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:1408702 (1.3 MiB)  TX bytes:260329 (254.2 KiB)

wlan0     Link encap:Ethernet  HWaddr B0:48:7A:EB:70:0A  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6094 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7581 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32 
          RX bytes:891806 (870.9 KiB)  TX bytes:4786701 (4.5 MiB)

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

config rule 'default'
    option proto 'all'
    option use_policy 'wan_pri_wwan_sec'
    option dest_ip '0.0.0.0/0'

config interface 'wan'
    option enabled '1'
    option reliability '1'
    option count '1'
    option timeout '2'
    option interval '5'
    option down '3'
    option up '3'
    list track_ip '173.194.69.94'
    list track_ip '8.8.8.8'

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

config member 'wwan_m1_w1'
    option interface 'wwan'
    option metric '1'
    option weight '1'

config member 'wwan_m2_w1'
    option interface 'wwan'
    option metric '2'
    option weight '1'

config policy 'wan_pri_wwan_sec'
    list use_member 'wan_m1_w1'
    list use_member 'wwan_m2_w1'

config member 'wan_m2_w1'
    option interface 'wan'
    option metric '2'
    option weight '1'

config member 'wan_m1_w1'
    option interface 'wan'
    option metric '1'
    option weight '1'

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 netmask '255.255.255.0'
    option ipaddr '192.168.2.1'

config interface 'wan'
    option ifname 'eth0.2'
    option _orig_ifname 'eth0.2'
    option _orig_bridge 'false'
    option proto 'pppoe'
    option username '1und1/pt1228-985@online.de'
    option password '******'

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

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

config switch_vlan
    option device 'rtl8366rb'
    option vlan '2'
    option ports '0 5t'

config interface 'wwan'
    option proto '3g'
    option device '/dev/ttyUSB0'
    option service 'umts'
    option apn 'internet'
    option username 'root'
    option password '*******'

When i reconnect my main ADSL line it works again. How can i fix this problem?

root@OpenWrt:~# cat /etc/resolv.conf
search homezone.de
nameserver 127.0.0.1

cat /tmp/resolv.conf
search homezone.de
nameserver 127.0.0.1

(Last edited by Thomymaster on 27 May 2013, 15:36)

Thomymaster wrote:

I have a problem with the newest version. Switching to 3G works fine but when it switched to 3G i am not able to lookup an IP adress (even if i ssh to my router and do nslookup "www.google.de" i get "connection refused").

You have no metrics configured on your interfaces.

edit:
1.0-6 has been put on mediafire if you want to try it. The interface pages will warn you about duplicate and missing metrics and even highlights the offending parties in red for you.

(Last edited by arfett on 27 May 2013, 18:32)

arfett wrote:
Thomymaster wrote:

I have a problem with the newest version. Switching to 3G works fine but when it switched to 3G i am not able to lookup an IP adress (even if i ssh to my router and do nslookup "www.google.de" i get "connection refused").

You have no metrics configured on your interfaces. Version 1.0-6 and later of the GUI page will warn you about duplicate and missing metrics.

What arfett says + You don't use the loopback route trick (but you do run a caching nameserver on your router) which causes the traffic originating from the router never to failover.

So in summary:

- Configure metrics for your interfaces in your network config
- Use the loopback route trick to also load-balance router originating traffic.

More info about this in the first post.

On a side note, you must use a dns server that allows lookups from any source ip. Most isp's block lookups on their dns servers if the source ip address is not from their AS.

(Last edited by Adze on 27 May 2013, 18:14)

Hi

-Where is the download link for the new luci-mwan3 package?

-To use the loopback trick, i have to issue

ip route add default via 127.0.0.1 dev lo src 192.168.0.1

??
Where do i have to put the command so that it survives a reboot?


-Regarding metrics, i have set it up in the mwan3 config or what exactly do you mean?

Cheers

Thomy

Thomymaster wrote:

To use the loopback trick, i have to issue "ip route add default via 127.0.0.1 dev lo src 192.168.0.1" ??

Almost.. replace 192.168.0.1 with the ip adres of your routers lan interface.

Thomymaster wrote:

Where do i have to put the command so that it survives a reboot?

/etc/rc.local

Thomymaster wrote:

Regarding metrics, i have set it up in the mwan3 config or what exactly do you mean?

You have to set them in your network config! Please read the first post as it is clearly described...

(Last edited by Adze on 28 May 2013, 09:49)

Yes i did that and now its working, thanks a lot smile

I only need the latest binary for the luci-app from arfett now