1

Temat: mwan3: komuś się udało skonfigurować?

szukam opisu jak skonfigurować aero2 i lokalnego dostawcę tak aby w razie padu tego ostatniego łącze przełączało się automatycznie na aero2. polecono mwan3. wpisuję w google mwan3 tutorial: 2 strony, same śmieci. mwan3 configuration: 5 stron, te na temat kręcą się wokół opisu autora na forum:

https://forum.openwrt.org/viewtopic.php?id=39052

autor potraktował raczej temat jako dla bardziej doświadczonych użytkowników: 0 słowa o instalacji, wzmianka, aby sprawdzić czy sa odpowiednio skonfigurowane WANy po czym hop siup konfiguracja mwan3.

sprawdzałem u siebie te wpisy tabeli rutingu o których pisze autor pakietu, ale mam u siebie tylko dla dostawcy lokalnego, mimo, że modem 3g siedzi w usb (co prawda nie jest podłączony, ale nie wiem jak można to ręcznie podłączyć). czy ktoś z Was przerabiał temat i mógłby napisać jak to w ogóle zainstalować i ewentualnie podał przykładową konfigurację na przykładzie polskich realiów?

ruter to MR3420

pozdrawiam
geos

2

Odp: mwan3: komuś się udało skonfigurować?

Tu na forum jest opis mwan2, link znajdziesz w podwieszonych wątkach.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: mwan3: komuś się udało skonfigurować?

Geos czy poradziłeś sobie z instalacją i konfiguracja tego mwan3 ?

4

Odp: mwan3: komuś się udało skonfigurować?

Witam,

Czy mozecie zerknac na ten wontek

http://eko.one.pl/forum/viewtopic.php?pid=88071#p88071

nie umiem skonfigurowac mwana3

5

Odp: mwan3: komuś się udało skonfigurować?

Witam,

z autorem sie skontaktowalem i dal mi rozwiazanie ale generalnie update trzeba zrobic do mwan3

"Which version of mwan3 are you using? The reason i ask is because there was a bug in earlier versions. The bug was that when an interface is named "wan", it would not work. So please update to version 1.2-20 or rename your "wan" interface to "wan1


Jeroen."

6

Odp: mwan3: komuś się udało skonfigurować?

WItam,

v1.3 dziala dobrze failover i loadbalancer bezproblemowo
najnowszy interfejs do luci jest juz calkiem niezly

moja konfiguracja

Software versions :

OpenWrt - OpenWrt Attitude Adjustment 12.09.1 (r38462) mwan3 - 1.3-0 luci-app-mwan3 - unknown

Firewall default output policy (must be ACCEPT) :

ACCEPT

Output of "ip route show" :

default via 10.0.0.1 dev eth0.2 proto static metric 10 default via 192.168.200.1 dev eth0.3 proto static metric 20 default via 10.64.64.64 dev 3g-wan3 proto static metric 30 10.0.0.0/24 dev eth0.2 proto static scope link metric 10 10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1 10.64.64.64 dev 3g-wan3 proto kernel scope link src 93.154.222.111 192.168.100.0/24 dev br-lan proto kernel scope link src 192.168.100.100 192.168.200.0/24 dev eth0.3 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 1003: from all fwmark 0x300/0xff00 lookup 1003 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 1021: from all fwmark 0x1500/0xff00 lookup 1021 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 10.0.0.1 dev eth0.2 1002 default via 192.168.200.1 dev eth0.3 1003 default via 10.64.64.64 dev 3g-wan3 1016 default via 10.0.0.1 dev eth0.2 metric 1 1017 default via 192.168.200.1 dev eth0.3 metric 1 1018 default metric 1 nexthop via 10.0.0.1 dev eth0.2 weight 10 nexthop via 192.168.200.1 dev eth0.3 weight 2 1019 default via 10.0.0.1 dev eth0.2 metric 1 default via 192.168.200.1 dev eth0.3 metric 2 default via 10.64.64.64 dev 3g-wan3 metric 3 1020 default via 192.168.200.1 dev eth0.3 metric 1 default via 10.0.0.1 dev eth0.2 metric 2 1021 default via 10.0.0.1 dev eth0.2 metric 1 default via 192.168.200.1 dev eth0.3 metric 2

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

Chain PREROUTING (policy ACCEPT 28492 packets, 10M bytes) pkts bytes target prot opt in out source destination 39126 14M mwan3_pre all -- * * 0.0.0.0/0 0.0.0.0/0 35768 13M fwmark all -- * * 0.0.0.0/0 0.0.0.0/0 Chain INPUT (policy ACCEPT 4476 packets, 427K bytes) pkts bytes target prot opt in out source destination 8560 889K mwan3_post all -- * * 0.0.0.0/0 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4774 packets, 1304K bytes) pkts bytes target prot opt in out source destination 8821 2083K mwan3_pre all -- * * 0.0.0.0/0 0.0.0.0/0 Chain POSTROUTING (policy ACCEPT 27535 packets, 11M bytes) pkts bytes target prot opt in out source destination 37512 15M mwan3_post all -- * * 0.0.0.0/0 0.0.0.0/0 11823 1980K bw_egress all -- * eth0.2 0.0.0.0/0 0.0.0.0/0 Chain mwan3_default (1 references) pkts bytes target prot opt in out source destination 697 52759 MARK all -- * * 0.0.0.0/0 224.0.0.0/3 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00 204 14242 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 2 472 MARK all -- * * 0.0.0.0/0 10.0.0.0/24 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00 0 0 MARK all -- * * 0.0.0.0/0 10.8.0.0/24 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00 0 0 MARK all -- * * 0.0.0.0/0 10.64.64.64 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00 300 24635 MARK all -- * * 0.0.0.0/0 192.168.100.0/24 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00 61 7449 MARK all -- * * 0.0.0.0/0 192.168.200.0/24 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00 Chain mwan3_interfaces (1 references) pkts bytes target prot opt in out source destination Chain mwan3_post (2 references) pkts bytes target prot opt in out source destination 2079 170K MARK all -- * eth0.2 0.0.0.0/0 !10.0.0.0/24 mark match !0x7f00/0xff00 MARK xset 0x100/0xff00 176 14784 MARK all -- * 3g-wan3 0.0.0.0/0 !10.64.64.64 mark match !0x7f00/0xff00 MARK xset 0x300/0xff00 570 51614 MARK all -- * eth0.3 0.0.0.0/0 !192.168.200.0/24 mark match !0x7f00/0xff00 MARK xset 0x200/0xff00 3204 327K MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x8000/0x8000 MARK and 0xffff7fff 46072 16M 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 47947 16M CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 CONNMARK restore mask 0xff00 2697 218K MARK all -- eth0.2 * !10.0.0.0/24 0.0.0.0/0 mark match !0x7f00/0xff00 MARK xset 0x8100/0xff00 148 12256 MARK all -- 3g-wan3 * !10.64.64.64 0.0.0.0/0 mark match !0x7f00/0xff00 MARK xset 0x8300/0xff00 520 52421 MARK all -- eth0.3 * !192.168.200.0/24 0.0.0.0/0 mark match !0x7f00/0xff00 MARK xset 0x8200/0xff00 5091 402K mwan3_default all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 2437 196K mwan3_interfaces all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 2437 196K mwan3_rules all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 7 508 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 769 79764 MARK all -- * * 192.168.100.0/24 0.0.0.0/0 mark match 0x0/0xff00 MARK xset 0x7f00/0xff00 0 0 MARK all -- * * 192.168.100.0/24 0.0.0.0/0 mark match 0x0/0xff00 MARK xset 0x1300/0xff00 188 13298 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 statistic mode random probability 0.166000 MARK xset 0x200/0xff00 1006 67686 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 statistic mode random probability 1.000000 MARK xset 0x100/0xff00

Output of "ifconfig" :

3g-wan3 Link encap:Point-to-Point Protocol inet addr:93.154.222.111 P-t-P:10.64.64.64 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:189 errors:0 dropped:0 overruns:0 frame:0 TX packets:204 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:15025 (14.6 KiB) TX bytes:16734 (16.3 KiB) br-lan Link encap:Ethernet HWaddr xx:xx:11:B7:xx:xx inet addr:192.168.100.100 Bcast:192.168.100.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:13550 errors:0 dropped:52 overruns:0 frame:0 TX packets:18396 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2270503 (2.1 MiB) TX bytes:11058120 (10.5 MiB) eth0 Link encap:Ethernet HWaddr xx:xx:11:B7:xx:xx UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:91516 errors:0 dropped:11 overruns:360226 frame:0 TX packets:59736 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:26573447 (25.3 MiB) TX bytes:31260113 (29.8 MiB) Interrupt:4 eth0.1 Link encap:Ethernet HWaddr xx:xx:11:B7:xx:xx UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1112 errors:0 dropped:0 overruns:0 frame:0 TX packets:2115 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:166238 (162.3 KiB) TX bytes:512771 (500.7 KiB) eth0.2 Link encap:Ethernet HWaddr xx:xx:11:B7:xx:xx inet addr:10.0.0.155 Bcast:10.0.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:30158 errors:0 dropped:521 overruns:0 frame:0 TX packets:14493 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:11659431 (11.1 MiB) TX bytes:2501789 (2.3 MiB) eth0.3 Link encap:Ethernet HWaddr xx:xx:11:B7:xx:xx inet addr:192.168.200.100 Bcast:192.168.200.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2516 errors:0 dropped:0 overruns:0 frame:0 TX packets:2884 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:268953 (262.6 KiB) TX bytes:1462509 (1.3 MiB) 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:282794 errors:0 dropped:0 overruns:0 frame:0 TX packets:282794 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:16687244 (15.9 MiB) TX bytes:16687244 (15.9 MiB) tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.8.0.1 P-t-P:10.8.0.1 Mask:255.255.255.0 UP POINTOPOINT RUNNING NOARP 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:100 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) wlan0 Link encap:Ethernet HWaddr xx:xx:11:B7:xx:xx UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12847 errors:0 dropped:0 overruns:0 frame:0 TX packets:19548 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2414922 (2.3 MiB) TX bytes:11594519 (11.0 MiB)

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

config rule 'to_default' option src_ip '192.168.100.0/24' option dest_ip '0.0.0.0/0' option proto 'all' option use_policy 'default' config rule 'failover' option src_ip '192.168.100.0/24' option dest_ip '0.0.0.0/0' option proto 'all' option use_policy 'wan_pri_wan2_sec_wan3_backup' config rule 'balancer' option dest_ip '0.0.0.0/0' option proto 'all' option use_policy 'wan_wan2_loadbalanced' option equalize '1' option src_ip '0.0.0.0/0' config interface 'wan' option enabled '1' list track_ip '8.8.8.8' list track_ip '212.77.100.101' option reliability '1' option count '2' option timeout '3' option down '5' option up '3' # option reroute '1' option interval '10' config interface 'wan2' option enabled '1' list track_ip '8.8.8.8' list track_ip '212.77.100.101' option reliability '1' option count '2' option timeout '3' option down '5' option up '3' # option reroute '1' option interval '10' config interface 'wan3' option enabled '1' list track_ip '8.8.8.8' list track_ip '212.77.100.101' option reliability '1' option down '10' option reroute '1' option count '3' option timeout '5' option up '10' option interval '20' config member 'wan_m1_w1' option metric '1' option weight '10' option interface 'wan' config member 'wan_m2_w2' option metric '2' option weight '10' option interface 'wan' config member 'wan2_m1_w1' option interface 'wan2' option metric '1' option weight '2' config member 'wan2_m2_w2' option interface 'wan2' option metric '2' option weight '2' config member 'wan3_backup' option interface 'wan3' option metric '3' option weight '1' config policy 'wan_only' list use_member 'wan_m1_w1' config policy 'wan2_only' list use_member 'wan2_m1_w1' config policy 'wan_wan2_loadbalanced' list use_member 'wan_m1_w1' list use_member 'wan2_m1_w1' config policy 'wan_pri_wan2_sec_wan3_backup' list use_member 'wan_m1_w1' list use_member 'wan2_m2_w2' list use_member 'wan3_backup' config policy 'wan2_pri_wan_sec' list use_member 'wan2_m1_w1' list use_member 'wan_m2_w2' config policy 'wan_pri_wan2_sec' list use_member 'wan_m1_w1' list use_member 'wan2_m2_w2'

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 alias # option interface 'loopback' # option proto 'static' # option ipaddr '192.168.1.1' # option netmask '255.255.255.255' config interface 'lan' option ifname 'eth0.1' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option ipaddr '192.168.100.100' option dns '208.67.222.222 208.67.220.220' config interface 'wan' option ifname 'eth0.2' option proto 'static' option ipaddr '10.0.0.155' option netmask '255.255.255.0' option gateway '10.0.0.1' option metric '10' option peerdns '0' option dns '208.67.222.222 208.67.220.220' config interface 'wan2' option ifname 'eth0.3' option macaddr 'F8:D1:11:B7:41:56' option proto 'dhcp' option metric '20' option broadcast '1' config interface 'wan3' option auto '1' option proto '3g' option device '/dev/ttyUSB0' option apn 'darmowy' option service 'umts' option mobile_isp 'Polska - Aero2' option peerdns '0' option dns '208.67.220.220 208.67.222.222 8.8.8.8 8.8.4.4' option defaultroute '1' option metric '30' config switch option enable '1' option name 'rtl8366rb' option reset '1' option enable_vlan '1' option blinkrate '4' config switch_vlan option device 'rtl8366rb' option vlan '1' option ports '2 3 4 5t' config switch_vlan option device 'rtl8366rb' option vlan '2' option ports '0 5t' config switch_vlan option device 'rtl8366rb' option vlan '3' option ports '1 5t' config interface 'vpn' option ifname 'tun0' option proto 'none' option defaultroute '0' option peerdns '0' option auto '0'

dodatkowo dodalem pewne zmiany dla polaczenia do openvpn w firewalu mozna sie dostac przez wan2 i wan jednoczesnie i jak zniknie ktorys z interfejsow