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.

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 openconfig and iosxr providers reject interfaceRef as unsupported.

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.

@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
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.

The NX-OS interface address items are replaced instead of merged,
so addresses removed from the spec, such as global addresses when
switching to link-local only, are removed from the device. As a gNMI
Set applies replace before update operations, they are sent in a
separate Set after the interface itself has been created.

Signed-off-by: Oliver Frommel <oliver.frommel@bwi.de>
@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
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.

2 participants