Skip to content

Support unnumbered interface-based BGP peering - #575

Open
ofrzeta wants to merge 1 commit into
ironcore-dev:mainfrom
ofrzeta:support-unnumbered-bgp-peering
Open

ofrzeta wants to merge 1 commit into
ironcore-dev:mainfrom
ofrzeta:support-unnumbered-bgp-peering

Conversation

@ofrzeta

@ofrzeta ofrzeta commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Allow a BGPPeer to name an Interface instead of a peer address, so an eBGP session can run over the peers' IPv6 link-local addresses and the transit link needs no addressing of its own. The referenced Interface must set spec.ipv6.useLinkLocalOnly.

spec.address becomes optional and is mutually exclusive with the new spec.interfaceRef; spec.localAddress is meaningless for such a peer. Both rules are enforced by CEL and by the webhook. A peer's identity, its address, interfaceRef or bgpRef, is immutable.

@ofrzeta
ofrzeta marked this pull request as draft September 17, 2026 05:32
@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Sep 17, 2026
@hardikdr hardikdr added this to Roadmap Sep 17, 2026
@ofrzeta
ofrzeta force-pushed the support-unnumbered-bgp-peering branch from 731e5b3 to fea40a3 Compare September 17, 2026 12:36
@ofrzeta
ofrzeta marked this pull request as ready for review September 17, 2026 12:36
@felix-kaestner

Copy link
Copy Markdown
Collaborator

Hey @ofrzeta could you be so kind and rebase this PR, there seem to be some conflicts. 🙏

Allow a BGPPeer to name an Interface instead of a peer address, so an
eBGP session can run over the peers' IPv6 link-local addresses and the
transit link needs no addressing of its own. The referenced Interface
must set spec.ipv6.useLinkLocalOnly.

spec.address becomes optional and is mutually exclusive with the new
spec.interfaceRef; spec.localAddress is meaningless for such a peer.
Both rules are enforced by CEL and by the webhook. A peer's identity,
its address, interfaceRef or bgpRef, is immutable, as the finalizer
only knows the current identity and would leave the previous peer
behind on the device.

spec.asNumber accepts the sentinel "external" for dynamic AS discovery,
which only applies to interface-based peers.

On NX-OS the peer maps to a PeerIf object under peerif-items, keyed by
the interface name. The device reports an empty asn with asnType
external, which the omitempty payload matches, so reconciliation stays
idempotent. The device-level interface name is recorded in
status.peerInterface, so the finalizer can still remove the peer after
its Interface was deleted.

The openconfig and iosxr providers reject interfaceRef as unsupported
and skip the deletion of such peers as they were never configured on
the device.

The BGPPeer controller now watches Interfaces through a field index
covering both interface references, so a peer converges as soon as its
Interface appears instead of waiting for the periodic requeue.

Signed-off-by: Oliver Frommel <oliver.frommel@bwi.de>
@ofrzeta
ofrzeta force-pushed the support-unnumbered-bgp-peering branch from fea40a3 to 38f265a Compare September 24, 2026 14:38
@ofrzeta

ofrzeta commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @felix-kaestner, I've updated the branch.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants