Temat: mwan3 i zrywanie połączenia wan2
Witam.
Jako że dziś cały dzień nie działa mi radiówka, to zainstalowałem sobie pakiet MWAN3 i podłączyłem modem LTE ZTE MF823, gdzie ustawiłem modem pod nazwa "wan2", oraz wyłączyłem "wan'.
Na początku działało dobrze ale co jakiś czas wywala interfejs "wan2"
2018-02-25T18:19:11+01:00 notice netifd[]: wan2 (13758): udhcpc: received SIGTERM
2018-02-25T18:19:11+01:00 notice netifd[]: Interface 'wan2' is now down
2018-02-25T18:19:11+01:00 notice netifd[]: Interface 'wan2' is disabled
2018-02-25T18:19:11+01:00 notice netifd[]: Interface 'wan2' is enabled
2018-02-25T18:19:11+01:00 notice netifd[]: Interface 'wan2' is setting up now
2018-02-25T18:19:11+01:00 notice netifd[]: wan2 (21425): udhcpc: started, v1.25.1
2018-02-25T18:19:11+01:00 notice netifd[]: wan2 (21425): udhcpc: sending discover
2018-02-25T18:19:11+01:00 notice netifd[]: wan2 (21425): udhcpc: sending select for 192.168.0.152
2018-02-25T18:19:11+01:00 notice netifd[]: wan2 (21425): udhcpc: lease of 192.168.0.152 obtained, lease time 86400
2018-02-25T18:19:11+01:00 notice netifd[]: Interface 'wan2' is now up
2018-02-25T18:19:12+01:00 notice mwan3[]: ifup interface wan2 (usb0)
2018-02-25T18:19:13+01:00 notice firewall[]: Reloading firewall due to ifup of wan2 (usb0)
2018-02-25T18:19:31+01:00 info kresd[22037]: net.ipv6 = false
2018-02-25T18:19:31+01:00 info kresd[22037]:
2018-02-25T18:19:33+01:00 info kresd[22037]: > net.ipv6 = false
2018-02-25T18:19:33+01:00 info kresd[22037]:
2018-02-25T18:22:25+01:00 notice mwan3track[]: Interface wan2 (usb0) is offline
2018-02-25T18:22:25+01:00 notice mwan3[]: ifdown interface wan2 (usb0)i muszę ręcznie podnosić go, nie jestem do końca przekonany czy dobrze ustawiłem pakiet MWAN3.
Software versions :
OpenWrt - OpenWrt omnia 15.05 r47055
LuCI - git-17.212.24321-49c3edd
mwan3 - 2.0-2
mwan3-luci - 1.4-4
Output of "cat /etc/config/mwan3" :
config interface 'wan2'
list track_ip '8.8.8.8'
list track_ip '208.67.220.220'
option reliability '1'
option count '1'
option timeout '2'
option down '3'
option up '8'
option enabled '1'
option interval '60'
config interface 'wan'
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 down '3'
option up '8'
option interval '60'
option enabled '0'
config member 'wan_m1_w3'
option interface 'wan'
option metric '1'
option weight '3'
config member 'wan_m2_w3'
option interface 'wan'
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'
config policy 'wan_only'
list use_member 'wan_m1_w3'
option last_resort 'unreachable'
config policy 'wan2_only'
list use_member 'wan2_m1_w2'
option last_resort 'unreachable'
config policy 'balanced'
list use_member 'wan_m1_w3'
list use_member 'wan2_m1_w2'
option last_resort 'unreachable'
config policy 'wan_wan2'
list use_member 'wan_m1_w3'
list use_member 'wan2_m2_w2'
option last_resort 'unreachable'
config policy 'wan2_wan'
list use_member 'wan_m2_w3'
list use_member 'wan2_m1_w2'
option last_resort 'unreachable'
config rule 'https'
option sticky '1'
option dest_port '443'
option proto 'tcp'
option use_policy 'balanced'
config rule 'default_rule'
option dest_ip '0.0.0.0/0'
option use_policy 'balanced'
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 'fd58:36af:49d2::/48'
config interface 'lan'
option force_link '1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
option _orig_ifname 'eth0 eth2 turris_0 turris_1'
option _orig_bridge 'true'
option ifname 'eth0 eth2 turris_0 turris_1'
config interface 'wan'
option ifname 'eth1'
option proto 'static'
option ipaddr '192.168.0.2'
option netmask '255.255.255.0'
option gateway '192.168.0.1'
list dns '8.8.8.8'
list dns '9.9.9.9'
option metric '10'
config interface 'wan6'
option ifname '@wan'
option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 3 5'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 6'
config interface 'wan2'
option proto 'dhcp'
option ifname 'usb0'
option metric '20'
Output of "ifconfig" :
br-lan Link encap:Ethernet HWaddr D8:58:D7:00:33:DE
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::da58:d7ff:fe00:33de/64 Scope:Link
inet6 addr: fd58:36af:49d2::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1195608 errors:0 dropped:0 overruns:0 frame:0
TX packets:1397812 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:357499668 (340.9 MiB) TX bytes:1711266116 (1.5 GiB)
eth0 Link encap:Ethernet HWaddr D8:58:D7:00:33:DE
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:532299 errors:0 dropped:109 overruns:0 frame:0
TX packets:715343 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:532
RX bytes:81450201 (77.6 MiB) TX bytes:814879876 (777.1 MiB)
Interrupt:37
eth1 Link encap:Ethernet HWaddr D8:58:D7:00:33:DF
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::da58:d7ff:fe00:33df/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:45938 errors:0 dropped:0 overruns:0 frame:0
TX packets:383141 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:532
RX bytes:4939375 (4.7 MiB) TX bytes:33069895 (31.5 MiB)
Interrupt:38
eth2 Link encap:Ethernet HWaddr D8:58:D7:00:33:E0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:26236 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:532
RX bytes:0 (0.0 B) TX bytes:2957730 (2.8 MiB)
Interrupt:40
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:148826 errors:0 dropped:0 overruns:0 frame:0
TX packets:148826 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:15977500 (15.2 MiB) TX bytes:15977500 (15.2 MiB)
turris_0 Link encap:Ethernet HWaddr 4C:5E:0C:13:FD:C8
inet6 addr: fe80::4e5e:cff:fe13:fdc8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:295314 errors:0 dropped:0 overruns:0 frame:0
TX packets:346743 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:158370946 (151.0 MiB) TX bytes:284708588 (271.5 MiB)
turris_1 Link encap:Ethernet HWaddr 4C:5E:0C:13:C1:B6
inet6 addr: fe80::4e5e:cff:fe13:c1b6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:427702 errors:0 dropped:0 overruns:0 frame:0
TX packets:552703 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:137644573 (131.2 MiB) TX bytes:657506185 (627.0 MiB)
usb0 Link encap:Ethernet HWaddr 36:4B:50:B7:EF:D9
inet addr:192.168.0.152 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::344b:50ff:feb7:efd9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1358543 errors:95 dropped:0 overruns:0 frame:95
TX packets:1110310 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1367045033 (1.2 GiB) TX bytes:312699569 (298.2 MiB)
Output of "route -n" :
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 10 0 0 eth1
0.0.0.0 192.168.0.1 0.0.0.0 UG 20 0 0 usb0
192.168.0.0 0.0.0.0 255.255.255.0 U 10 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 20 0 0 usb0
192.168.0.1 0.0.0.0 255.255.255.255 UH 20 0 0 usb0
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 local
1001: from all iif usb0 lookup main
2001: from all fwmark 0x100/0xff00 lookup 1
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 192.168.0.1 dev usb0
Firewall default output policy (must be ACCEPT) :
ACCEPT
Output of "iptables -L -t mangle -v -n" :
Chain PREROUTING (policy ACCEPT 57546 packets, 26M bytes)
pkts bytes target prot opt in out source destination
2472K 1714M mwan3_hook all -- * * 0.0.0.0/0 0.0.0.0/0
Chain INPUT (policy ACCEPT 21973 packets, 6736K bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 35154 packets, 19M bytes)
pkts bytes target prot opt in out source destination
1 52 TCPMSS tcp -- * eth1 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 /* !fw3: wan (mtu_fix) */ TCPMSS clamp to PMTU
908 47344 TCPMSS tcp -- * usb0 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 /* !fw3: wan (mtu_fix) */ TCPMSS clamp to PMTU
Chain OUTPUT (policy ACCEPT 25980 packets, 5798K bytes)
pkts bytes target prot opt in out source destination
499K 277M mwan3_hook all -- * * 0.0.0.0/0 0.0.0.0/0
Chain POSTROUTING (policy ACCEPT 61051 packets, 25M bytes)
pkts bytes target prot opt in out source destination
Chain mwan3_connected (2 references)
pkts bytes target prot opt in out source destination
1397K 1369M 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
2971K 1991M CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 CONNMARK restore mask 0xff00
161K 13M mwan3_ifaces_in all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00
161K 13M mwan3_connected all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00
85886 7081K mwan3_ifaces_out all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00
84948 7003K mwan3_rules all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00
2971K 1991M CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 CONNMARK save mask 0xff00
2343K 1606M mwan3_connected all -- * * 0.0.0.0/0 0.0.0.0/0 mark match ! 0xff00/0xff00
Chain mwan3_iface_in_wan2 (1 references)
pkts bytes target prot opt in out source destination
0 0 MARK all -- usb0 * 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 -- usb0 * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 /* wan2 */ MARK xset 0x100/0xff00
Chain mwan3_iface_out_wan2 (1 references)
pkts bytes target prot opt in out source destination
30 2520 MARK all -- * * 192.168.0.152 0.0.0.0/0 mark match 0x0/0xff00 /* wan2 */ MARK xset 0x100/0xff00
Chain mwan3_ifaces_in (1 references)
pkts bytes target prot opt in out source destination
6401 464K mwan3_iface_in_wan2 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
4773 353K mwan3_iface_out_wan2 all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00
Chain mwan3_policy_balanced (2 references)
pkts bytes target prot opt in out source destination
4268 323K MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 /* wan2 2 2 */ 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 2 2 */ MARK xset 0x100/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 2 2 */ MARK xset 0x100/0xff00
Chain mwan3_policy_wan_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 /* unreachable */ MARK xset 0xfe00/0xff00
Chain mwan3_policy_wan_wan2 (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 2 2 */ MARK xset 0x100/0xff00
Chain mwan3_rule_https (1 references)
pkts bytes target prot opt in out source destination
487 28017 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 MARK xset 0x100/0xff00
13 709 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x100/0xff00 ! match-set mwan3_sticky_https src,src MARK and 0xffff00ff
13 709 mwan3_policy_balanced all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00
487 28017 SET all -- * * 0.0.0.0/0 0.0.0.0/0 mark match ! 0xfc00/0xfc00 del-set mwan3_sticky_https src,src
487 28017 SET all -- * * 0.0.0.0/0 0.0.0.0/0 mark match ! 0xfc00/0xfc00 add-set mwan3_sticky_https src,src
Chain mwan3_rules (1 references)
pkts bytes target prot opt in out source destination
487 28017 mwan3_rule_https tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport sports 0:65535 multiport dports 443 mark match 0x0/0xff00 /* https */
4255 323K mwan3_policy_balanced all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x0/0xff00 /* default_rule */AP: 3x Netgear WAX220