exabgp(1) Influence or control network using BGP


[--folder folder | -f folder ] [--env env-config | -e env-config ] [--full-ini | --fi ] [--diff-ini | --di ] [--full-env | --fe ] [--diff-env | --de ] [--debug | -d ] [--signal time ] [--once | -1 ] [--pdb | -p ] [--memory | -s ] [--profile profile ] [--test | -t ] [--decode hex-message | -x hex-message ] [--help | -h ] [--version | -v ] [configuration ... ]


allows engineers to control their network from commodity servers. Possible uses include DDoS mitigation, network visualisation, service high availability and implementing anycast. does not perform any FIB manipulation on the system it runs on; if you need that this is not the program for you. can also print received BGP messages into readable plain text or JSON formatted text.

The arguments are as follows:

--folder folder | -f folder
Specify the directory where the configuration file can be found.
--env env-config | -e env-config
Specify where the environment configuration file can be found.
--full-ini | --fi
Display the full environment configuration using on stdout using the ini format.
--diff-ini | --di
Display the non-default environment configuration on stdout using the ini format.
--full-env | --fe
Display the full environment configuration on stdout using the env format.
--diff-env | --de
Display the non-default configuration on stdout using the env format.
--debug | -d
Start the python debugger on serious logging on and on reception of the SIGTERM signal. This is a shortcut for exabgp.log.all=true and exabgp.log.level=DEBUG.
--signal time
Issue a SIGUSR1 signal to reload the configuration after the specified number of seconds, only useful for code debugging.
--once | -1
Only perform one attempt to connect to peers, used mostly for debugging.
--pdb | -p
Start the python debugger on critical logging, reception of SIGTERM, and on uncaught python exceptions. This is a shortcut for exabgp.pdb.enable=true.
--memory | -s
Display memory usage information on program exit.
--profile profile
Enable collection of profiling information to the given file. This is a shortcut for exabgp.profile.enable=true and exabgp.profile.file=profile.
--test | -t
Only do a configuration validity check.
--decode hex-message | -x hex-message
Decode a raw route packet in hexadecimal string.
--help | -h
Display summary of usage and configuration of exabgp.
--version | -v
Display the version number and exit.


The configuration of exabgp is split in two:

  • The environment configuration which controls the basic execution of such as logging, daemonizing, pid-file, profiling etc.
  • The BGP configuration of exabgp, which specifies which neighbors it should talk BGP with and all other aspects of the BGP configuration.

The environment configuration can be specified a number of different ways, with different priority:

  1. Command line values using dot-separated notation.
  2. Environment variables using dot-separated notation.
  3. Command line values using underscore-separated notation.
  4. Environment variables using underscore-seprated notation.
  5. The values from the ini configuration file, /etc/exabgp/exabgp.env
  6. The built-in default values.

The following environment variables can be used to configure the basic execution of :

(experimental) default encoder to use with external API (text or json). Default: text.
Controls whether to use high-resolution timestamps in JSON. Default: false.
Controls whether to respawn a helper process if it dies. Default: false.
Controls how many seconds we should wait for a BGP open message once the TCP session is established. Default: 60 seconds.
Controls whether all attributes (configuration and wire) should be cached for faster parsing. Default: true.
(deprecated) Controls whether route next-hops are cached. Default: true.
Controls whether should run in the background. Default: false.
Where to save the PID of if we manage it. Default: '' (not set).
The user to run as. Should be an unprivileged user. Default: nobody.
Controls whether debug logging should be done for everything. Default: false.
Controls whether logging should be done for the configuration and command parsing. Default: true.
Controls whether logging should be done for PID change, forking, etc. Default: true.
Controls where logging should be sent. syslog (or no setting) sends the data to the local syslog server. host:<location> sends the data to a remote syslog server. stdout sends the data to stdout. stderr sends the data to stderr. <filename> sends the data to the named file. Default: stdout.
Controls whether logging should be done. Default: true.
Sets the minimum severity level to log. Default: INFO.
Controls logging of changes in route announcement in config reload. Default: false.
Controls logging of networking information (TCP/IP state, network state etc.). Default: true.
Controls logging of BGP packets sent and received. Default: false.
Controls logging of BGP message parsing details. Default: false.
Controls logging of forked processes. Default: true.
Controls logging of signals received and command reload. Default: true.
Controls logging of changes in locally configured routes. Default: false.
Controls logging of received routes. Default: false.
Coontrols whether to use long or short log format (not prepended with time, level, pid and source). Default: false.
Controls logging of keepalive timers. Default: false.
Controls whether pdb, the python interactive debugger should be started on program faults. Default: false.
Controls whether profiling of the code should be done. Default: false.
Controls where profiling results should be written. None/empty means stdout. Default: empty.
Controls the time of one reactor loop. Use only if you understand the code. Default: 1.0.
(experimental, unimplemented). Default: empty.
IP address to bind to when listening (no ip to disable). Default: empty.
Start to announce routes when the minutes in the hour is a modulo of this number. Default: 0.
Only perform one TCP connection attempt per peer, for debugging scripts. Default: false.
Port to bind to when listening. Default: 179.


/etc/exabgp/exabgp.env is the default file for setting the "environment" variables controlling the execution of . An alaternative "env" configuration file can be supplied via the --env env-config argument. The format of this file is "Windows INI format". All the default settings can be shown with the --test -full-init command, an example showing parts of this output is:
encoder = text
highres = false
respawn = false
openwait = 60

Additionally, the user will need to supply a configuration file controlling the BGP configuration of , in the format described in exabgp.conf5.


catches a few different signals to control specific actions. They are:

Restarts .
Causes to reload the configuration.
Causes to reload the configuration and restart any forked processes.
Terminates .
Also terminates (does not reload the configuration anymore).

Reloading large configurations using signals is currently not recommended, because the configuration parsing code is currently blocking. Therefore if you have a large configuration change, it could cause the peer to miss some keepalive and cause a session flap.


The --test argument is useful to validate the syntax of the configuration file. The --debug flag will provide copious debug output to whereever the various exabgp.log variable settings dictate.


A list of the standards implements which is indicative of the features implemented is:

RFC 4893
BGP Support for Four-octet AS Number Space
RFC 4760
Multiprotocol Extension for BGP-4
RFC 4659
BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN
RFC 4762
Virtual Private LAN Service (VPLS) Using Label Distribution Protocol (LDP) Signalling
RFC 5575
Dissemination of Flow Specification Rules
RFC 4724
Graceful Restart Mechanism for BGP
RFC 7313
Enhanced Route Refresh Capability for BGP-4
RFC 7311
The Accumulated IGP Metric Attribute for BGP
(draft-ietf-idr-flow-spec-v6-06), Dissemination of Flow Specification Rules for IPv6
draft-ietf-idr-flowspect-redirect-ip-00 (-02)
BGP Flow-Spect Redirect to IP Action
draft-ietf-idr-add-paths-08 (-10)
Advertisement of Multiple Paths in BGP
draft-ietf-idr-bgp-multisession-07 (??)
draft-scudder-bmp-01 (??)

A list of other more basic BGP-related standard entirely or partially implemented is:

RFC 1997
BGP Communities Attribute
RFC 2385
Protection of BGP Sessions via the TCP MD5 Signature
RFC 2545
Use of BGP-4 Multirptocol Extensions for IPv6 Inter-Domain Routing
RFC 2918
Route Refresh Capability for BGP-4
RFC 3107
Carrying Label Information in BGP-4
RFC 3765
NOPEER Community for Border Gateway Protocol (BGP) Route Scope Control
RFC 4271
A Border Gateway Protocol 4 (BGP-4)
RFC 4360
BGP Extended Communities Attribute
RFC 4364
Constrained Route Distribution for BGP/MPLS IP VPNs
RFC 4456
BGP Rotue Relection: An Alternative to Full Mesh Internal BGP (iBGP)
RFC 5396
Textual Representation of Autonomous System (AS) Numbers
RFC 5492
Capabilities Advertisement with BGP-4
RFC 6286
Autonomous-System-Wide Unique BGP Identifier for BGP-4
RFC 6608
Subcodes for BGP Finate State Machine Error