Skip to content
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

zebra: Resolve the nexthop being tracked to a non-BGP route #16917

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

donaldsharp
Copy link
Member

Currently a nexthop being tracked in NHT can be resolved to a BGP route. As BGP routes are usually recursive, the nexthop resolution may not be complete, resulting in wrong IGP metric being given to BGP for bestpath calculation.

The fix is to make sure the nexthop being tracked is always resolved to a non-BGP route.

Currently a nexthop being tracked in NHT can be resolved to a BGP route.
As BGP routes are usually recursive, the nexthop resolution may not be
complete, resulting in wrong IGP metric being given to BGP for bestpath
calculation.

The fix is to make sure the nexthop being tracked is always resolved to
a non-BGP route.

Signed-off-by: Enke Chen <[email protected]>
@donaldsharp
Copy link
Member Author

@enkechen-panw -> here is how I was suggesting one way to fix the problem.

@donaldsharp
Copy link
Member Author

I modified #16793 to be the way I think it should be done. Eric can pull this and run with it if desired. There is still work that needs to be done to get this ready for commit though

@enkechen-panw
Copy link
Contributor

enkechen-panw commented Sep 27, 2024

I have reviewed the patch by @donaldsharp, and have several comments with the patch/approach:

It does not work when the dependent route has a non-zero MED. Just run the topotest by adding "set metric 100" to the route-map on r2 and r3.

The value of 0 is a valid MED in BGP. It really should not be treated differently from any other values.

There are applications that rely on the existing behavior of downloading BGP MED as the metric in zebra. We should not change that by overriding the MED field during route download.

The approach introduces a new flow: zebra --> BGP --> zebra, trying to make the IGP metric correct. However, when there is a change to the IGP metric, BGP would not re-down the route to zebra (unless the bestpath changes) and that would break the flow.

The calculation of the IGP metric should be solely zebra's job. This new flow zebra --> BGP --> zebra for IGP metric is neither clean, nor necessary IMO.

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants