-
Notifications
You must be signed in to change notification settings - Fork 2
bgp
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.
Core.
The plugin is loaded automatically when a bgp configuration block is present.
bgp {
router-id 10.0.0.1;
session { asn { local 65000; } }
peer upstream {
connection {
remote { ip 10.0.0.2; }
local { ip 10.0.0.1; }
}
session {
asn { remote 65001; }
family { ipv4/unicast { prefix { maximum 1000000; } } }
}
}
}
The bgp config root triggers loading. FatalOnConfigError is set, so the daemon exits if the BGP configuration is invalid. For the full peer surface (session policy, capabilities, filters, address families, authentication) see Peers.
bgp/multipath/ configures equal-cost multipath (ECMP) across BGP paths.
bgp {
multipath {
maximum-paths 4;
relax-as-path false;
}
}
| Leaf | Type | Default | Description |
|---|---|---|---|
maximum-paths |
uint16 (1–256) | 1 |
Maximum number of equal-cost paths installed in the FIB for the same prefix. 1 disables multipath. |
relax-as-path |
boolean | false |
When true, AS-path length must match but the content does not have to. Equivalent to bgp bestpath as-path multipath-relax on other vendors. When false, multipath requires identical AS-path length and content. |
Multipath operates on the post-best-path selection output: after best-path picks one winner, any additional paths that tie on the usual comparison attributes (up to maximum-paths) are also installed for forwarding.
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.
- 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
interfaceplugin provides link-state events that the reactor uses to react to interface changes.
main/internal/component/bgp/plugin/
main/internal/component/bgp/reactor/
Unreviewed draft. This wiki was authored in bulk and has not been reviewed. File corrections on the issue tracker.
- Overview
- YANG Model
- Editor Workflow
- Archive and Rollback
- System
- Interfaces
- VRRP
- BFD
- FIB
- OSPF
- IS-IS
- MPLS / LDP / RSVP-TE
- RSVP-TE
- SRv6
- Static Routes
- Policy Routing
- Firewall
- Traffic Control
- Class of Service
- L2TP/PPP
- PPPoE
- VPP Data Plane
- RPKI
- IPsec VPN
- TACACS+ AAA
- RADIUS AAA
- AS112 DNS
- Authorization
- Fleet
- BGP
- Starting and Stopping
- Show Commands
- Monitoring
- Flow Export
- DDoS Mitigation
- Anomaly Detection
- Health Checks
- Audit Trail
- Production Diagnostics
- Logging
- Operational Reports
- Healthcheck
- Self-Update
- Zero-Touch Provisioning
- MRT Analysis
- Upgrade and Restart
- Storage
- Policy
- Core
- Resilience
- Validation
- Capabilities
- Address Families
- Protocol
- Subsystems
- Infrastructure
- Route Server at an IXP
- Transit Edge with RPKI
- Public Looking Glass
- ExaBGP Migration Walkthrough
- FlowSpec Injection
- Chaos-Tested Peering
- AS Path Topology