Why is an mwan3 active policy balancing on an offline interface?

I am running mwan3 2.10.13-1 on OpenWrt 21.02.3 r16554-1d4dea6d4f

Today I noticed that one of my links was showing status of:
"interface wan15 is offline and tracking is active"

Wan15 was also showing as part of the balancing mix for some rules. For example:
wan_11_13_15_17
wan17 (33%)
wan15 (33%)
wan11 (33%)

After running mwan3 ifdown on wan15, the link showed:
"interface wan15 is offline and tracking is paused"
and the rules no longer included wan15

After running mwan3 ifup on wan15, the link showed:
"interface wan17 is online"
and the rules included wan15 as expected.

I cannot reproduce the "offline and tracking is active" status.

I have three questions:

  1. What conditions would cause "offline and tracking is active"

  2. When this happens, why is the interface included in active balancing?

  3. If it happens again, which settings/issues should I look for to prevent this?

Did you test if the wan15 was actually working?
My understanding is that the offline means it doesn't currently pass data and active tracking means that it keeps trying to ping the probe to understand when it is back online.

I'm not sure, though I think it was working since after ifdown and ifup it returned to online and active.

I thought I had previous set it down since I did not want it to be passing traffic, but I am not sure.

I agree with your understanding, yet the was not what I saw. My concern is that if the link is listed as offline, then it should not being balancing rotation. However, it was showing active in several rules.

I don't know how easy it is to replicate the problem in your setup.
For example, could you unplug a cable from the wan15 router to simulate an offline but tracking active situation?

I can look into that. And, I'd really like to know why mwan3 would actively balance an interface when the status is "offline and tracking is active". It seems to me that this is an error, but I may be missing something.

I couldn't reproduce the issue on a similar release (OpenWrt 21.02.1, r16325-88151b8303, mwan3 - 2.10.13-1).

Just set the track ip option(s) in the interface section to something unreachable (such as 1.2.3.4) and restart the mwan3 service.

Thanks! setting the ping address to 1.2.3.4 produced a status of:
"offline and tracking is active".
This makes sense - it is tracking to see when it comes back on.

And, after doing this, the rule reports "unreachable".
This is also as expected since the tracking pings fail.

The concern about balancing remains. While it is now handling this correctly, when I posted the issue, mwan3 had been balancing traffic to wan15 even though it reported the interface offline.

If it happens again, are there some settings or diagnostics to check to determine what is wrong and how to correct it?

First, make sure that this is the case.

Run logread -e mwan3track to check if the last known status is "offline", then run
iptables -t mangle -S | grep policy | grep MARK
to see if the interface is indeed listed in the policy chain while it is considered down.

1 Like

Excellent - thanks much!