exabgp.api.encoder
(experimental) default encoder to use with external API (text or json). Default: text.
Influence or control network using bgp
exabgp [{--help | -h}]
[{--version | -v}]
[{--root | -f}]
[{--env
env-config | -e
env-config}]
[{--full-ini | --fi}]
[{--diff-ini | --di}]
[{--full-env | --fe}]
[{--diff-env | --de}]
[--run
helper]
[{--debug | -d}]
[--validate]
[--signal
time]
[{--once | -1}]
[{--pdb | -p}]
[{--memory | -s}]
[--profile
profile]
[{--test | -t}]
[{--decode
hex-message | -x
hex-message}]
[configuration ...]
exabgp allows engineers to control their network from commodity servers. Possible uses include DDoS mitigation, network visualisation, service high availability and implementing anycast. exabgp does not perform any FIB manipulation on the system it runs on; if you need that this is not the program for you. exabgp can also print received BGP messages into readable plain text or JSON formatted text.
The arguments are as follows:
--help | -h
Display summary of usage and configuration of exabgp.
--version | -v
Display the exabgp version number and exit.
--root folder | -f folderRoot folder where etc, bin, sbin are located.
--env env-config | -e env-configSpecify 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.
--run helper
Do not run ExaBGP but one of its helper programs, options are: healthcheck and cli
--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.
--validate
Validate the configuration file format only.
--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-messageDecode a raw route packet in hexadecimal string.
The configuration of exabgp is split in two:
The environment configuration which controls the basic execution of exabgp 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:
Command line values using dot-separated notation.
Environment variables using dot-separated notation.
Command line values using underscore-separated notation.
Environment variables using underscore-seprated notation.
The values from the ini configuration file, /etc/exabgp/exabgp.env
The built-in default values.
The following environment variables can be used to configure the basic execution of exabgp:
exabgp.api.encoder
(experimental) default encoder to use with external API (text or json). Default: text.
exabgp.api.highres
Controls whether to use high-resolution timestamps in JSON. Default: false.
exabgp.api.respawn
Controls whether to respawn a helper process if it dies. Default: false.
exabgp.bgp.openwait
Controls how many seconds we should wait for a BGP open message once the TCP session is established. Default: 60 seconds.
exabgp.cache.attributes
Controls whether all attributes (configuration and wire) should be cached for faster parsing. Default: true.
exabgp.cache.nexthops
(deprecated) Controls whether route next-hops are cached. Default: true.
exabgp.daemon.daemonize
Controls whether exabgp should run in the background. Default: false.
exabgp.daemon.pid
Where to save the PID of exabgp if we manage it. Default: '' (not set).
exabgp.daemon.user
The user to run exabgp as. Should be an unprivileged user. Default: nobody.
exabgp.log.all
Controls whether debug logging should be done for everything. Default: false.
exabgp.log.configuration
Controls whether logging should be done for the configuration and command parsing. Default: true.
exabgp.log.daemon
Controls whether logging should be done for PID change, forking, etc. Default: true.
exabgp.log.destination
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.
exabgp.log.enable
Controls whether logging should be done. Default: true.
exabgp.log.level
Sets the minimum severity level to log. Default: INFO.
exabgp.log.message
Controls logging of changes in route announcement in config reload. Default: false.
exabgp.log.network
Controls logging of networking information (TCP/IP state, network state etc.). Default: true.
exabgp.log.packets
Controls logging of BGP packets sent and received. Default: false.
exabgp.log.parser
Controls logging of BGP message parsing details. Default: false.
exabgp.log.processes
Controls logging of forked processes. Default: true.
exabgp.log.reactor
Controls logging of signals received and command reload. Default: true.
exabgp.log.rib
Controls logging of changes in locally configured routes. Default: false.
exabgp.log.routes
Controls logging of received routes. Default: false.
exabgp.log.short
Coontrols whether to use long or short log format (not prepended with time, level, pid and source). Default: false.
exabgp.log.timers
Controls logging of keepalive timers. Default: false.
exabgp.pdb.enable
Controls whether pdb, the python interactive debugger should be started on program faults. Default: false.
exabgp.profile.enable
Controls whether profiling of the code should be done. Default: false.
exabgp.profile.file
Controls where profiling results should be written. None/empty means stdout. Default: empty.
exabgp.reactor.speed
Controls the time of one reactor loop. Use only if you understand the code. Default: 1.0.
exabgp.tcp.acl
(experimental, unimplemented). Default: empty.
exabgp.tcp.bind
IP address to bind to when listening (no ip to disable). Default: empty.
exabgp.tcp.delay
Start to announce routes when the minutes in the hour is a modulo of this number. Default: 0.
exabgp.tcp.once
Only perform one TCP connection attempt per peer, for debugging scripts. Default: false.
exabgp.tcp.port
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 exabgp. 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 exabgp --test --full-init command, an example showing parts of this output is:
[exabgp.api] encoder = text highres = false respawn = false [exabgp.bgp] openwait = 60
Additionally, the user will need to supply a configuration file controlling the BGP configuration of exabgp, in the format described in exabgp.conf(5).
exabgp catches a few different signals to control specific actions. They are:
Restarts exabgp.
Causes exabgp to reload the configuration.
Causes exabgp to reload the configuration and restart any forked processes.
Terminates exabgp.
Also terminates exabgp (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.
6 releases since Debian 7 (Wheezy); the text changed 4 times.
--de since Debian 9 (Stretch);
--debug since Debian 9 (Stretch);
--di since Debian 9 (Stretch);
--diff-env since Debian 9 (Stretch);
--diff-ini since Debian 9 (Stretch);
--fe since Debian 9 (Stretch);
--fi since Debian 9 (Stretch);
--full-env since Debian 9 (Stretch);
--full-ini since Debian 9 (Stretch);
--help since Debian 9 (Stretch);
--memory since Debian 9 (Stretch);
--once since Debian 9 (Stretch);
--pdb since Debian 9 (Stretch);
--profile since Debian 9 (Stretch);
--run since Debian 12 (Bookworm);
--signal since Debian 9 (Stretch);
--test since Debian 9 (Stretch);
--validate since Debian 12 (Bookworm);
--version since Debian 9 (Stretch);
-1 since Debian 9 (Stretch);
-d since Debian 9 (Stretch);
-h since Debian 9 (Stretch);
-p since Debian 9 (Stretch);
-s since Debian 9 (Stretch);
-t since Debian 9 (Stretch);
-v since Debian 9 (Stretch).