-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mwan3: No interface recovers from offline if all become offline #3885
Comments
Version 1.6-3 doesn't have this issue. |
You have to change the last resort to default |
Hi @feckert , thanks for your feedback.
|
Hi @feckert , I tested with default routing table as policy. |
@joaochainho, I have the same scenario on my router (wan as main and wwan as backup). If mwan3track notice that interface wan is down traffic will be router to the wwan interface. And if wwan goes also down then (if use_policy default is set) mwan3track will recover the interface because he will use the default routing table. Have you set different metrics for each interface (wan / wwan) in the network config? |
Yes, 10 for wan and 20 for wwan.
I'm trying to figure out what's different between MWAN3 v2.x and 1.6, but no clue yet. |
@joaochainho i am not aware of the version LEDE r3844-c5e245a. What interface proto do you have on the wan interface dhcp/static? I think if both interfaces are down then no default route is set the router can not route the icmp pages (wan dhcp cable unpluged/ wwan dhcp lease removed and not renewed due connectivity loose). But if one of the wans get online again (wan cable pluged in / wwan dhcp lease renewed) then the icmp can be routed again (default route set be netifd on ifup event) and mwan3track declares this wan after successful pings as online again. |
Hi @feckert, thanks for your feedback and sorry for replying so late.
It's master commit c5e245a, and the fix for #4158 is already included.
wan (eth0) uses DHCP. wwan (USB modem) uses 3G protocol.
wan online, wwan online
wan offline, wwan offline
My suspicion is that when all interfaces are offline, the specific MWAN rules/routes (based on the configured metrics/weights) are deleted. Because the ethernet cable on the wan port is never unplugged, the physical link state never changes and there are no ifdown/ifup events. So the MWAN rules are never reloaded again. Does this make sense? |
@joaochainho Yes the rules/routes are deleted but the mwan3track is still running on inteface wwan/wan
I have attached my mwa3 config
I have a simpe backup szenario
If during backup a higher interface comes online again then this interface will used wwan->wan |
I had a very simulator setup and problem a few months ago.
The way that I fixed it was applying the below patch to allow all outbound
icmp traffic for mwan3. From my observation when mwan3 did not recover,
mwan3 was blocking all ICMP ping traffic. Ping -i<inf> 8.8.8.8 always
returned an error. I still do not know to this day why it happened, why
did mwan3 blocked ICMP ping traffic on all interfaces?
The setup of the system encountered the problem on was:
Ethernet WAN - dhcp protocol
WWAN - qmi or SierraWireless SDK w/ dhcp
Thanks,
TP
Reference Patch:
…--- files/lib/mwan3/mwan3.sh.vanilla
+++ files/lib/mwan3/mwan3.sh
@@ -490,6 +490,9 @@ mwan3_create_policies_iptables()
$IPT -F mwan3_policy_$1
+ # Pham, unblock ping
+ iptables -t mangle -I mwan3_policy_$1 1 -p icmp -j ACCEPT
+
case "$last_resort" in
blackhole)
$IPT -A mwan3_policy_$1 -m mark --mark 0x0/0xff00 -m
comment --comment "blackhole" -j MARK --set-xmark 0xfd00/0xff00
On Mon, Apr 3, 2017 at 8:59 AM, Florian Eckert ***@***.***> wrote:
My suspicion is that when all interfaces are offline, the specific MWAN
rules/routes (based on the configured metrics/weights) are deleted. Because
the ethernet cable on the wan port is never unplugged, the physical link
state never changes and there are no ifdown/ifup events. So the MWAN rules
are never reloaded again. Does this make sense?
@joaochainho <https://github.com/joaochainho> Yes the rules/routes are
deleted but the mwan3track is still running on inteface wwan/wan
-
If the cable is plugged in again (tested on my setup) mwan3track is
recognizing the interface after reliability check as up again and i am able
to surf over the wan interface.
-
If i enable wwan (plugin usb wwan modem) then mwan3track recognize the
interface wwan after reliability check as online again as well.
I have attached my mwa3 config
config policy 'wan_only'
list use_member 'wan_m1_w1'
config policy 'xdsl_only'
list use_member 'xdsl_m2_w1'
config policy 'wwan_only'
list use_member 'wwan_m3_w1'
config member 'wan_m1_w1'
option interface 'wan'
option metric '1'
option weight '1'
config member 'xdsl_m2_w1'
option interface 'xdsl'
option metric '2'
option weight '1'
config rule 'default_rule'
option dest_ip '0.0.0.0/0'
option proto 'all'
option sticky '0'
option use_policy 'wan_xdsl_wwan'
config member 'wwan_m3_w1'
option interface 'wwan'
option metric '3'
option weight '1'
config policy 'wan_xdsl_wwan'
list use_member 'wan_m1_w1'
list use_member 'xdsl_m2_w1'
list use_member 'wwan_m3_w1'
option last_resort 'default'
config interface 'wan'
option enabled '1'
list track_ip '8.8.8.8'
list track_ip '8.8.4.4'
option count '1'
option timeout '2'
option interval '60'
option failure '10'
option recovery '10'
option down '3'
option reliability '1'
option up '3'
option family 'ipv4'
option flush_conntrack 'always'
config interface 'xdsl'
option enabled '1'
list track_ip '8.8.8.8'
list track_ip '8.8.4.4'
option reliability '1'
option count '1'
option timeout '2'
option interval '60'
option failure '10'
option recovery '10'
option down '3'
option family 'ipv4'
option up '3'
option flush_conntrack 'always'
config interface 'wwan'
option enabled '1'
list track_ip '8.8.8.8'
list track_ip '8.8.4.4'
option reliability '1'
option count '1'
option timeout '5'
option interval '60'
option failure '10'
option recovery '10'
option down '3'
option up '3'
option family 'ipv4'
option flush_conntrack 'always'
I have a simpe backup szenario
1. wan -> all traffic goes over wan if online -> if it goes offline
then surfe over xdsl
2. xdsl -> all traffic goes over xdsl if online -> if it goes offline
then surfe over wwan
3. wwan -> all traffic goes over wwan if online this is the las wan
interface -> if this last inerface goes offline as well then i have a
problem ;-)
If during backup a higher interface comes online again then this interface
will used wwan->wan
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3885 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AH0qom7iqebgBjbmOiZKEIFWRTEGmCq6ks5rsO0xgaJpZM4LooBX>
.
|
Hi @tpham3783 , your patch solved my issue! 😄 |
hi @feckert , I only now noticed this new option |
Hi @feckert , using |
@joaochainho if last_resort is not set to default and no interface is up, then the default table will not run through and the package will be dropped. A improvement would be to add the ping targets to an ipset and do not mangle the packages. As suggested by @tpham3783. The ipset should only contain ip/adresse of the targets per interface.
See: |
HI @feckert , thanks for your feedback. And sorry for missing the wiki info 😄 |
A improvement would be to add the ping targets to an ipset and do not
mangle the packets.
That's a good idea! Routing policy of wan3 should be updated to allow
network ping to the target IP addresses.
@joae, thank you for your persistence in testing the last_resort config
option, because I too, did not know about it!
thanks,
TP
…On Wed, Apr 5, 2017 at 8:40 AM, Florian Eckert ***@***.***> wrote:
@joaochainho <https://github.com/joaochainho> if last_resort is not set
to default and no interface is up, then the default table will not run
through and the package will be dropped. A improvement would be to add the
ping targets to an ipset and do not mangle the packages. As suggested by
@tpham3783 <https://github.com/tpham3783>. The ipset should only contain
ip/adresse of the targets per interface.
mwan metrics doesn't seem to apply to the traffic originated from the
router itself.
See:
https://wiki.openwrt.org/doc/howto/mwan3
Section:
The routable loopback (self)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3885 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AH0qok0aeYPbyqhHE3PvkWmB-A5bxz0nks5rs4vYgaJpZM4LooBX>
.
|
@joaochainho I think we could close this issue. I will try to implement a feature that the track_ips will not be mangled on the OUTPUT CHAIN. |
Hi @feckert I agree, it can be closed. Thanks for your help and effort. |
Hi,
I noticed that no interface recovers from offline if all interfaces become offline.
The test scenario if the following: two interfaces (wan and wwan), default policy is wan as primary and wwan as backup.
If I manually run 'ifup wan/wwan' then both interfaces become online.
I noticed this issue for some time. Tested latest mwan3 version (2.0-3) in OpenWrt and LEDE (ar71xx).
Meanwhile I found out that in this state the router sends ARP requests querying the public IP addresses defined as track_ip's.
My config:
I'm available to provide more info and do further testing if needed.
TIA
The text was updated successfully, but these errors were encountered: