Self-Hosted BMP Collectors: GoBGP vs ExaBGP vs OpenBGPD - 夜莺博客

Self-Hosted BMP Collectors: GoBGP vs ExaBGP vs OpenBGPD

Once BMP is enabled on your routers, someone has to receive the stream. Commercial collectors exist, but a self-hosted one is often enough: GoBGP ships a built-in BMP server, ExaBGP accepts BMP through a process hook, and OpenBGPD supports it on newer releases. This article compares the three for real deployments, then shows a working Docker Compose setup and the exact router-side configuration that points Cisco, Juniper and FRR devices at your collector.

Which Collector Fits Which Job

  • GoBGP - TOML configuration, gRPC API, built-in BMP server mode listening on 11019 by default. Best choice when you also want programmatic access to the received routes or plan to combine BMP with route injection and FlowSpec.
  • ExaBGP - Python-based, extremely flexible for parsing and reacting to messages, but BMP support arrives through a process hook rather than a native server. Best when you want custom logic per message (alerting, prefix hijack detection).
  • OpenBGPD - very low resource usage and a single declarative config file, but BMP support is version dependent and less feature rich. Best for small labs or edge boxes where memory is the constraint.

All three accept BMP over plain TCP or TCP+TLS and can sit on a single Linux VM for a lab; production sizing depends on route volume rather than peer count.

Docker Compose Deployment (GoBGP)

services:
  gobgp:
    image: osrg/gobgp:latest
    container_name: gobgp-bmp
    ports:
      - 179:179/tcp
      - 11019:11019/tcp
      - 50051:50051/tcp
    volumes:
      - ./gobgp.conf:/etc/gobgp/gobgp.conf:ro
    command: gobgpd -f /etc/gobgp/gobgp.conf
    restart: unless-stopped
[global.config]
  as = 65001
  router-id = 192.168.1.1

[bmp-servers.config]
  address = 0.0.0.0
  port = 11019
docker compose up -d
docker logs gobgp-bmp --tail 30
gobgp bmp station list      # via the gobgp CLI or gRPC API

Keep the collector out of the routing path: it should be a leaf device that only listens. If you also run BGP on it - useful for injecting test routes - use different local ports for BMP and the BGP speaker.

Pointing Routers at the Collector

! Cisco IOS-XR
bmp server 1
 host 10.0.0.50 port 11019
 initial-delay 60
!
router bgp 65000
 bmp server 1
  update-source Loopback0
  activate

# Juniper Junos
set routing-options bmp station collector station-address 10.0.0.50
set routing-options bmp station collector station-port 11019
set routing-options bmp station collector connection-mode active
set routing-options bmp station collector route-monitoring post-policy

# FRRouting
router bgp 65000
 bmp targets collector
 bmp connect 10.0.0.50 port 11019
 bmp monitor ipv4 unicast post-policy

Operational Guardrails

  • Use a dedicated management VRF or routing instance on the router side; full-table refreshes are bursty and should not share the production path.
  • Watch collector storage: a full internet table is roughly 1M routes, and every session reset replays it. Compression plus a retention policy is mandatory, not optional.
  • TLS with a private CA is worth the effort if BMP crosses a shared segment; the payload is raw routing information.
  • Alert on station state changes: a collector that silently stops receiving is worse than no collector, because it creates false confidence.
  • Time-align the collector with NTP; correlating a route event with a syslog or BGP log line without time sync is guesswork.

Related reading: BMP router-side configuration on Junos, IOS-XR and FRR, route injection testing with ExaBGP and GoBGP, and BGP route reflector design for deciding which routers should stream at all.

原文链接:https://pistack.xyz/posts/2026-05-14-self-hosted-bmp-collectors-gobgp-exabgp-openbgpd-guide