Setting metric on static route
-
2.8.1-RELEASE
Am I blind or is there no way to configure a metric on a route? I know I can create static routes on all the gateways in a gateway group and set tiers on them, but some firewall rules don't lend themselves well to gateway groups.
For example, a firewall pass rule that references multiple destination networks. I can't set a gateway on that rule because different destinations need different gateways. Some of these destinations are reachable via multiple paths and should prefer one over another. Creating static routes on multiple gateways with different cost would accomplish the goal.
Breaking the firewall rule into multiple separate rules with different destinations and different gateways would also accomplish the goal but less elegantly.
-
Rules are processed in order from top down until a match is hit, so you should be able to accomplish what you need with policy-based routing rules. You may need multiple rules instead of stuffing all the logic into a single rule and relying on route metrics.
It appears that the concept of route metrics is somewhat new in FreeBSD, although it looks like it'll be coming soon.
Privacy Policy · Cookie Policy