Skip to content
Thomas Mangin edited this page Apr 8, 2026 · 2 revisions

Pre-Alpha. This page describes behavior that may change.

The core BGP plugin implementing RFC 4271. It provides the BGP finite state machine (Idle, Connect, Active, OpenSent, OpenConfirm, Established), OPEN/UPDATE/KEEPALIVE/NOTIFICATION message handling, the peer reactor, and the plugin event bus bridge.

Category

Core.

Configuration

The plugin is loaded automatically when a bgp configuration block is present.

bgp {
    peer upstream {
        router-id     10.0.0.1;
        local-as      65000;
        peer-as       65001;
        local-address 10.0.0.1;
        peer-address  10.0.0.2;
    }
}

The bgp config root triggers loading. FatalOnConfigError is set, so the daemon exits if the BGP configuration is invalid.

Behaviour

The reactor is the central orchestrator. On startup it parses the config tree, opens TCP listeners, and creates a peer session for each configured neighbor. Peer sessions run the RFC 4271 FSM: the connection advances through Idle, Connect, Active, OpenSent, OpenConfirm, and Established. OPEN messages negotiate capabilities. Once Established, UPDATE messages carry NLRI and path attributes, KEEPALIVE messages maintain the session, and NOTIFICATION messages signal errors.

Peer startup is deferred until all higher-tier plugins have completed their handshake. A post-startup callback on the coordinator starts peer sessions only after the plugin infrastructure is ready, preventing validate-open callbacks from arriving before dependent plugins are initialised.

Configuration changes use a three-phase transaction protocol (verify, apply, rollback). The apply phase reconciles the running peer set against the new config tree through a journaled operation that can be rolled back on failure.

Interactions

  • Every other BGP plugin depends on this one. It is always the first BGP component loaded.
  • Publishes peer lifecycle events and UPDATE messages to the event bus for consumption by bgp-rib, bgp-gr, bgp-watchdog, and other subscribers.
  • Registers the reactor with the coordinator, which manages plugin startup ordering and the post-startup peer launch.
  • The interface plugin provides link-state events that the reactor uses to react to interface changes.

Source

main/internal/component/bgp/plugin/ main/internal/component/bgp/reactor/

See also

Home

About

First Steps

Configuration

Operation

Interfaces

Plugins

Plugin Development

Chaos Testing

Blueprints

Development

Reference

Clone this wiki locally