-
Notifications
You must be signed in to change notification settings - Fork 715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: a way to see if a route is not exported / imported due to policys #1938
Comments
Just for reference, should be possible to make with a few easy changes: in Path: add a reason of policy rejection (completely internal) and pass that to api That should make it possible to see why a certain path was rejected (for the adj-in table) For the adj-out table you can get the filtered paths from getBestFromLocal (server.go:getAdjRib) -> that's why adj-out takes a long time, each time it's called all paths are reevaluated |
Implemented my proposal in the attached PR, except for the filtered paths, at least you see when a path was Accepted ;) New field "Policy" in the cli output for RIB shows in the format: A/import/match_incomplete [A]ccepted|[R]ejected/Policy Name/Statement Name |
I've been hacking a little on this also. From what i've concluded until now is; Either we implement a separat table for rejected incomming routes. Or we store the rejected incoming routes in the general table that is already setup. I dont know where we really should put this. And i think we should save the routes in the table even if they are invalid and do the filtering based information attached to the path by the policys.
|
Actually, the incoming routes are saved in the adj-rib, and are just passed to the global rib as a withdraw. That's because you can change the Policy at runtime and reevaluate the adj-rib |
Yeah i saw that the adj-in does have all the routes I’ve began writing a PR to get the information saved on the path if it’s rejected or not and which policy that if so rejected it. |
I wrote this today; Also added a "detail" flag to adj-in for example;
|
@mrevilme thanks a lot
|
The size of api.Policy structure is 40 bytes at least. This hurts the performance of an often-use feature, getting the paths in the rib. I really want to avoid fattening api.Path. |
ListPath API will support the feature to show routes filtered by import/export policies. Anyone is interested in making the CLI (gobgp) to support this feature? |
eg a R1 sends 10.0.0.0/24 and i have a policy that filteres bogons from that router.
like Quagga or FRR. This feature is quite useful in traffic engineering and troubleshooting , routers like Cisco or Juniper also support similar feature to show hidden routes (filtered) and locally accepted routes etc.
Perhaps a variable on each path that tells me the reason for it being filtered like a reference to what policy blocked it
Please refer to Juniper's Understanding hidden routes for the hidden routes and its purposes and reasons
Thanks in advance
The text was updated successfully, but these errors were encountered: