What policies do I need for MultiWAN?

I have a small question on this article: https://openwrt.org/docs/guide-user/network/wan/multiwan/mwan3 . It's a great explanation how to setup multiple WANs, but I'd like to know why. Why do I need different policies and what policies are (or are not) mandatory?

For example, I created a MultiWAN configuration for 3 WANs. I set up all interfaces in "Switch" section: eth0.2, eth0.3 and eth0.4 - and assigned interfaces to all of them in "Interface" section: WAN, WAN2 and WAN3 respectively. Then in "Load Balancing" I created MWAN interfaces and members. For each interface I created 2 members:
wan_m1_w3
wan_m2_w3
wan2_m1_w3
wan2_m2_w3
wan3_m1_w3
wan3_m2_w3

And then I went to "Policies" section. I created "wan_only", "wan2_only", "wan3_only" and "balanced" policies (well, "balanced" has already been there, I just modified it).

Now please tell - why do I need policies like "wan_wan2" or "wan2_wan3"? Do I need "wan_wan2_wan3" policy with all members and different metrics? What are they for exactly?

These are for failover. If for example wan goes down, it will use wan2 as gateway.

Thanks! So I have to make all possible pairs to ensure all failovers will be resolved, haven't I? Then, if I'll connect 4 or 5 WANs in future, I'll have to make 10 or 15 pairs of WANs?

Not really. You need to create the policies you need.
If your hosts can use all 3 WANs then the balanced is enough.
If some hosts need to use WAN and only that, then create the wan_only.
If some other hosts must use WAN as primary, but if it goes down they can use WAN2, then create a wan_wan2.
And so on...

2 Likes

So "metric" here shows priority of a connection? If I make a policy with equal metrics, it is "balanced"; if I make a policy with WAN_m1_w3 and WAN2_m2_w3, if is "failover": WAN is the main connect (metric=1), and WAN2 is used only when WAN is off (metric=2 for WAN2), isn't it? And if I make some policy with "WAN_m1_w3 - WAN2_m2_w3 - WAN3_m3_w3", it will be "double failover"?

Correct to all.

1 Like

Thank you! I got this mystery at last.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.