My actual uses cases all involve LTE devices, specifically with multiple LTE modules/modems & routers that may be deployed for different short-term needs, in different, typically remote place. But often there is a desire to direct traffic of some set of devices out a specific LTE (or other WAN) by someone who may know how enough to setup a Netgear Nighthawk...but VLAN/bridging be a mystery, and FW rules ("mangle") to control routing isn't the first idea even seasoned IT would have. @anav is more patient than I on the latter, why I like the "routing rules" - less explaining.
While there is a lot of config to deal with multiple WANs, we abstract that into a set of 6 fix routing tables*, each with a specific "role" (e.g. going out "primary LTE" only, "secondary LTE" only, ECMP, etc.). We also use recursive routing, and it's 6 since the old/orginal BBN DNS still work and helpfully since sequentially numbered: 4.2.2.1 ... 4.1.1.6, a routing table "route1" match the 1st recursive route, etc. So any potential "extra WAN" are "pre-wired" to use the routing rules.
所以“路由规则用例”是“non-Mikrotik雷竞技网站admin" can at least define what define what range or IP goes out where on their own – without having knowing nothing much about the rest of the configuration needed to support thatflexibility. And redirecting a subnet or device be may be need for a few reasons:
- if one LTE carriers/WAN becomes slow/unavailble
- if both work well enough ECMP can be used
- someone wants to break up traffic so "mission critical" device has a dedicated LTE connection
- a satellite uplink, or some fiber, cable, etc WAN is available at the temporary location.
Since we control the 6 "WAN slots", the "dumb admin" just picks the right table for the subnet in most cases to select the internet path to use.
The only "issue" is since we use the routing rules
only for WAN/internet traffic, we need to add a boilerplate at top to send [most] private addresses to "main". I do think trying to do both inter-LAN routing and WAN routing using PBR/"routing rules" at the same time is where things can more complex/impossible – why I perfer to defer inter-LAN routing to the "main" and firewall. Generally we use VLAN only to limited broadcast scope, and want global Layer 3 routing between all devices/VLAN– this may not be typical. But it is a "don't delete the first three lines!":
/routing rule { add action=lookup disabled=$norules dst-address=10.0.0.0/8 table=main add action=lookup disabled=$norules dst-address=172.16.0.0/12 table=main add action=lookup disabled=$norules dst-address=192.168.0.0/16 table=main }
In our case, we use a webfig skin to hide most things, so the "Routing > Rules" is quite intuitive (and if you only show PVID in bridging, avoids any mysteries).
Long way to say I'm not unhappy with the current situation in routing rules.. But it is a lot of syntax to initially setup things up to use the rules efficiently....
If you're talking more generically about "routing rules" than just PBR. I'd say making /interface/internet-detect smarter – or something other than leaning about BGP scope and recursive routes – actually help more since it's the "failed" route detection that's actual hard today. Similar with the new "netwatch", it be nice if that feed more directly in some generic meaning of "routing rules" – than leave it at "On Up"/"On Down" script (that aren't easy to write well). With new "netwatch" features, it be nice that could replace routing's "check-gateway" (without scripting).
Edit 1
I guess the one generic "routing rule" I lost from V6 is the "dynamic-in" – that was, while odd place, great way set the "default-route-distance" in /ip/dhcp-client etc. In V7, and especially with recursive routes, it now always involves a script. While I like your scripting a lot, I also know one bug/change/etc could break some script and the dhcp-client on is especially important. That about my only complaint actually on this topic.