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

Add next-hop-unchanged for BGP #1158

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

dplore
Copy link
Member

@dplore dplore commented Aug 3, 2024

Change Scope

By default BGP changes the next hop of a BGP route to itself when advertising to neighbors. .../afi-safis/afi-safi/.../config/next-hop-unchanged is added to disable this behavior.

This feature is commonly used in combination with BGP based VPN's (RFC4364).

The full paths added are:

/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast/config/next-hop-unchanged
/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast/state/next-hop-unchanged
/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-unicast/config/next-hop-unchanged
/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-unicast/state/next-hop-unchanged
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/config/next-hop-unchanged
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/state/next-hop-unchanged
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/config/next-hop-unchanged
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/state/next-hop-unchanged
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/config/next-hop-unchanged
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/state/next-hop-unchanged
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/config/next-hop-unchanged
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/state/next-hop-unchanged

This change is backwards compatible.

Platform Implementations

@dplore dplore requested a review from a team as a code owner August 3, 2024 00:07
@OpenConfigBot
Copy link

OpenConfigBot commented Aug 3, 2024

No major YANG version changes in commit 9ebc0b6

Copy link

@LimeHat LimeHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be configurable with per afi/safi granularity and not tied to multihop.

Nokia ref: https://documentation.nokia.com/sr/24-7/7750-sr/cli-books/classic-cli-command-reference/classic-n-commands.html?hl=next-hop-unchanged#yc23860

Nvidia ref: https://docs.nvidia.com/networking/display/onyxv3104302/bgp+commands#src-132451846_BGPCommands-neighbornext-hop-unchanged

Another Cisco ref that shows per-afi/safi config
https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3650/software/release/16-12/configuration_guide/rtng/b_1612_rtng_3650_cg/configuring_bgp_next_hop_unchanged.pdf

I know that Arista supports the config like in the above cisco reference as well, just wasn't able to find a public reference immediately.

@dplore dplore changed the title Add preserve-next-hop for ebgp-multihop container Add next-hop-unchanged for BGP Aug 29, 2024
@dplore
Copy link
Member Author

dplore commented Aug 29, 2024

This should be configurable with per afi/safi granularity and not tied to multihop.

Nokia ref: https://documentation.nokia.com/sr/24-7/7750-sr/cli-books/classic-cli-command-reference/classic-n-commands.html?hl=next-hop-unchanged#yc23860

Nvidia ref: https://docs.nvidia.com/networking/display/onyxv3104302/bgp+commands#src-132451846_BGPCommands-neighbornext-hop-unchanged

Another Cisco ref that shows per-afi/safi config https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3650/software/release/16-12/configuration_guide/rtng/b_1612_rtng_3650_cg/configuring_bgp_next_hop_unchanged.pdf

I know that Arista supports the config like in the above cisco reference as well, just wasn't able to find a public reference immediately.

Moved to afi-safi container. I also renamed the leaf to 'next-hop-unchanged' to align with something much closer to what implementations are already using.

@dplore dplore added the last-call PR that is in final review before merging. label Sep 25, 2024
@robshakir
Copy link
Contributor

This is still inconsistent with how next-hop-self is represented in OpenConfig -- where it is something that is within a policy not a leaf. I don't agree with this proposal unless we have a coherent approach within the models.

Note that implementations would already a need to be mapping the current approach to underlying config -- so either this is implemented (and thus can be extended), or unimplementable (and thus the current n-h-s approach should be deprecated).

Copy link
Contributor

@robshakir robshakir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes to make this consistent with next-hop self in the models.

@dplore
Copy link
Member Author

dplore commented Jan 3, 2025

Requesting changes to make this consistent with next-hop self in the models.

Sorry I do not understand the issue. Could you provide an example of how BGP next-hop-self is represented in openconfig? Maybe that will be enough for me to understand how to propose something that enable/disables that. But if you have a suggestion in mind, I'd also be happy to see that too.

One idea is that you're referring to the typedef bgp-next-hop-type used in /routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/config/set-next-hop.

Are you saying that it's better to define next-hop-unchanged within each policy rather than at the afi/safi level?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
last-call PR that is in final review before merging. non-breaking
Projects
Status: Waiting for author
Development

Successfully merging this pull request may close these issues.

4 participants