Sat Feb 03, 2024 11:07 pm
I think part of the problem is using term "policy routing". To me, that just means using /routing/rules in a configuration. And, does what winbox shows: you create a "filter" on top, and pick the action on bottom to select a route table. Now...that alone does NOT solve a "multi WAN" problem since you need /routing/table's to use them & those need to be configured with routes, connections marked, etc. etc. So it's the later things that need to be understood first (and /routing/rule would then make more sense). Basically /routing/rule does nothing... without a lot of other config in place.
Another way to think about is, in theory, you can do ALL routing in the firewall with mangle ALONE (e.g. action=route) using rich filters selectors & not bother adding routes/tables/rule at all. The same is not true with route selection using /routing/rules — your basically limited to using the src/dest address to select a /routing/table. Even then, the routing rule will still go through firewall rules after selection, just indirectly via a route table. So kinda need a grasp of /ip/firewall to even use policy routing in /routing/rules.
What's confusing, I think, is the firewall does more than filter – it also, critically, tracks connections (packet flows between a host and internet/lan) so very much involved in routing (despite be under "firewall") – which is same as Linux. But it's the mangle rules that add the critical "marks" in firewall's tracking (/ip/firewall/connections) to know which route was selected. You don't escape this marking step in RouterOS for ANY kinda of "multi WAN" routing! It's only the route selection part where there is even a choice between the "firewall" stuff like PCC, and using /routing/rule.
Is policy routing "better" than mangle?. The question turns on how often you update the route selection logic. If it never changes (e.g. two wan, primary and secondary), firewall be better. If you need a lot of host-specific rules or want easier way to "pick a WAN", /routing/rule can help. But it's just an "add on" to mangle – not a replacement.