Open k0ste opened 6 years ago
PBR is designed to work with an incoming interface, if you do not want that we will need to modify PBR to do this.
I was thinking that pbrd is Policy Based Routing daemon and I'll can replace my iproute scripts with this frr
feature. My ip rule example, and lookup like this ip rule add from all fwmark 0x1e5b lookup this_table
is a gentlemen's set. If this is not possible at this time - this issue is feature request.
as a workaround you can add the pbr-policy to every interface, you'll end up with more rules but it will allow you to use it in the meantime.
Maybe there should be possibility to attach pbr-map globally, without referencing any interface (in addition to interfaced based pbr-maps). Internally global pbr rules should have higher sequence numbers than interface based (let's say above 20k) to guarantee that interface based rules are evaluated earlier and always override global rules. This way current behavior would be preserved and global map will provide means for direct translation of existing ip rule based configurations into pbrd.
@n3wtype -> It would be a very simple matter of adding a pbr rule range ..
command. Please feel free to do so
The workaround for this, is use new frr lua scripting feature. The example of script can be found here https://github.com/FRRouting/frr/discussions/16727#discussioncomment-10981791
Description
How-to make ip rule with pbrd like this:
ip rule add from 5.128.220.100 lookup ntk
ip route add 0.0.0.0/0 via 5.128.220.1 table ntk
Steps to Reproduce
Expected behavior:
Possible to add pbr without interface definition.
Actual behavior:
pbr-policy
only avaiable for interface. I don't neediif
in this rule.Components
pbrd
Versions