Repository navigation
Conversation
nikatza
force-pushed
the
bgp-nexthop-self
branch
from
October 22, 2026 11:44
a387998 to
0bf089f
Compare
nikatza
force-pushed
the
bgp-nexthop-self
branch
7 times, most recently
from
October 27, 2026 10:23
f4c55e7 to
ce1c9a6
Compare
nikatza
force-pushed
the
bgp-nexthop-self
branch
7 times, most recently
from
October 27, 2026 15:47
6bb9e48 to
ba22390
Compare
Contributor
Author
|
Edited and deleted this comment because it does not hold anymore as per re-design to simplify the implementation. |
nikatza
marked this pull request as ready for review
October 27, 2026 15:54
nikatza
force-pushed
the
bgp-nexthop-self
branch
from
October 27, 2026 16:33
ba22390 to
a6d95f3
Compare
nikatza
marked this pull request as draft
October 28, 2026 17:40
nikatza
force-pushed
the
bgp-nexthop-self
branch
4 times, most recently
from
October 30, 2026 13:54
e896b84 to
c43fdfb
Compare
nikatza
force-pushed
the
bgp-nexthop-self
branch
11 times, most recently
from
November 1, 2026 13:19
34f97e8 to
1fc0bb5
Compare
nikatza
marked this pull request as ready for review
November 1, 2026 13:30
This commit introduces a way to control the next-hop for advertised routes. Vendors like Cisco support a `nexthop-self` knob in the peers address-family configuration. This is however not modeled in OpenConfig, for which the same can be achieved by configuring routing policies (and so for every vendor). The configuration via policies is not addressed in this commit: only configuration via the nexthop-self is. As most vendors support this kind of knob, we extend the `BGPPeer` resource with a flag that models the same. This is also in line with the existing flag to enable route-reflector client behavior. It is the responsibility of each provider to signalize that the feature is not supported, as shown here in the OpenConfig provider. While NXOS is implemented in this commit, IOSXR and Nokia need a follow up. Cisco exposes the NX-OS peer address-family controls as a typed bitmask. As we now use multiple control flags in this mask we have updated the provider to handle properly the comma-separated gNMI values returned by the device and avoid unnecessary device writes due to different order. For consistency with other resources naming we renamed the `bgp_peer` to `bgppeer`. Signed-off-by: Pujol <enric.pujol@sap.com>
OpenConfig and some vendors do not offer a way to coarsely configure the nexthop with its own address in the advertised routes (`nexthop-self`). The same functionality can be achieved by defining a routing policy, attach it to a neighbor, and define the nexthop in an action within a statement. This approach allows more fine grained control than the `nexthop-self` knob we just introduced. In this commit we add a new BGP action in the RoutingPolicy that allows to define an IP address that should be used as nexthop (any kind of reference to `self` is not considered in the API as in OpenConfig). We update the NXOS provider, and change all other providers to signalize that this is not implemented yet for them. Signed-off-by: Pujol <enric.pujol@sap.com>
nikatza
force-pushed
the
bgp-nexthop-self
branch
from
November 2, 2026 09:19
1fc0bb5 to
4e9305a
Compare
|
Caution No coverage for base commit 527448a was found, so this report compares against its ancestor 0147768 (1 commit earlier) Merging this branch changes the coverage (4 decrease, 5 increase)
Coverage detailsCompared to commit 0147768 (run #41300423041)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See commit message for design and implementation details.
Enable
nexthop-selfvia flag inBGPPeer(1st commit)Tested with a cisco nxos device yields:
Set nexthop via
RoutingPolicy(2nd commit)(notice how both settings co-exist)
yields