unnumbered inspect fix + future gateway support - #1588
Draft
edipascale wants to merge 2 commits into
Draft
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
An unnumbered session has no peer IP to be keyed by, so the device reports it under the NOS interface it runs over: Ethernet3, Ethernet0.1001 for a hostBGP subinterface, Vlan3123 for the TH5 workaround SVI. Those names must not reach the API, so the agent now translates them to the port names we use everywhere else - E1/1, E1/1.1001, E1/5.3123 - and apiutil keys the expected neighbors the same way. This replaces the "unnum" placeholder, which matched nothing the agent reports: every unnumbered session showed up in `hhfctl inspect bgp` twice, once as an unexpected neighbor and once as a phantom that never established, so `--strict` could not pass on an unnumbered fabric. It also collapsed every unnumbered link on a switch onto one key. BFD sessions get the same treatment, keyed by their interface rather than by the IPv6 link-local address they run over, which is of no use to anyone and never joined the BGP neighbor it belongs to. Numbered sessions keep their IP keys, so nothing else moves. Since the port is now what identifies the peer, `hhfctl inspect bgp` and `hhfctl inspect bfd` would otherwise show the same thing in their port and neighbor/peer columns, so those rows are rendered as "E1/1 IPv6 LL". That is display only: the key, and with it the JSON output, stays the plain port name that the agent reports and that --strict matches on. An `unnumbered` flag on the status carries it to the renderer. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Emanuele Di Pascale <emanuele@githedgehog.com>
A gateway link with no IP on either side now runs BGP unnumbered, the same way fabric and mesh links already do: IPv6 is enabled on the link, the neighbor is keyed by the interface rather than the peer IP, and extended-nexthop lets the gateway's VTEP and protocol IPs resolve over the link-local next hop. On TH5 the peering runs over the workaround SVI. BFD, the L2VPN EVPN AF and the l2vpn-neighbors import policy are unchanged, and RemoteAS still comes from GatewayASN so a miscabled port cannot bring the session up. Validation now rejects a gateway link with an IP on only one side instead of requiring both, and the unnum golden group covers a gateway link on both a leaf and a spine. The gateway side has to be configured to match, which the Gateway API cannot express yet; the fabric half is ready for it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Emanuele Di Pascale <emanuele@githedgehog.com>
edipascale
force-pushed
the
ema/bgp-unnumbered-gateway
branch
from
August 28, 2026 08:01
b8fa955 to
6700fb9
Compare
|
🚀 Temp artifacts published: |
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.
No description provided.