EXABGP(1)

πŸ“¦
version 5.0.9 Β· 2 versions
, in fedora 44, ubuntu resolute, ubuntu stonking

πŸ¦‹ exabgp β€” NAME πŸ¦‹

okay so hi bestie, welcome to the manual page for exabgp (that's the <pink>exabgp(1)</pink> page, section 1, iykyk) and its whole entire vibe is: Influence or control network using BGP. that's it. that's the whole pitch. πŸ’–


🌸 SYNOPSIS 🌸

exabgp [--help | -h] [--version | -v] [--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] [--validate]
       [--test | -t] [--decode hex-message | -x hex-message]
       [configuration ...]

πŸ’… DESCRIPTION πŸ’…

so exabgp lets engineers control their network from commodity servers. like, normal servers. not fancy router hardware. iconic behavior honestly. ✨

the ways people use it, fr fr:

  • DDoS mitigation
  • network visualisation
  • service high availability
  • implementing anycast

big important thing though bestie: exabgp does not perform any FIB manipulation on the system it runs on. if that's what you need, this is not the program for you. no cap. πŸ™ˆ

and ALSO, exabgp can print received BGP messages into readable plain text or JSON formatted text. cute and useful, we love a dual threat. πŸ’œ

πŸŽ€ the arguments, one by one

  • --env env-config | -e env-config β€” tell it where the environment configuration file can be found. πŸ“
  • --full-env | --fe β€” print the full environment configuration on stdout, using the env format.
  • --diff-env | --de β€” print only the non-default environment configuration on stdout, using the env format.
  • --full-ini | --fi β€” print the full environment configuration used on stdout, using the ini format.
  • --diff-ini | --di β€” print the non-default environment configuration on stdout, using the ini format.
  • --debug | -d β€” start the python debugger on serious logging and on reception of the SIGTERM signal. this implies 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, so don't be cute with it.
  • --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. nothing else, just the vibe check. βœ…
  • --validate β€” validate the configuration file format only.
  • --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 exabgp version number and exit. 🫢

🌈 ENVIRONMENT 🌈

okay so the configuration of exabgp is split in two, bestie, keep up:

  • 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.

🧚 how you can set the environment config (priority order, lowkey important)

you can specify the environment configuration a number of different ways, and they have 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-separated notation.
  5. The values from the ini configuration file, /etc/exabgp/exabgp.env
  6. The built-in default values.
so yeah, number 1 wins over everything, and number 6 is the fallback when nobody else showed up to the party. periodt.

πŸ’– the environment variables (all of them, no skipping, we don't do that here)

  • exabgp.api.ack β€” Acknowledge api commands and report issues. Default: true.
  • exabgp.api.chunk β€” Maximum number of lines to print before yielding in "show routes" api. Default: 1.
  • exabgp.api.cli β€” Determines if exabgp should create a named pipe for the CLI. Default: true.
  • exabgp.api.compact β€” Determines whether exabgp should use shorter JSON encoding for IPv4/IPv6 unicast NLRI. Default: false.
  • exabgp.api.encoder β€” (experimental) default encoder to use with external API (text or json). Default: text.
  • exabgp.api.pipename β€” Base name to be used for the exabgp pipe for the CLI interface. Default: exabgp.
  • exabgp.api.respawn β€” Controls whether to respawn a helper process if it dies. Default: false.
  • exabgp.api.terminate β€” Controls whether to exit if any helper process 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, next-hops are always cached) Default: true.
  • exabgp.daemon.daemonize β€” Controls whether exabgp should run in the background. Default: false.
  • exabgp.daemon.drop β€” Determines if exabgp should drop privileges before forking processes. Default: true.
  • exabgp.daemon.pid β€” Where to save the PID of exabgp if we manage it. Default: '' (not set).
  • exabgp.daemon.umask β€” Controls umask to set, controls permissions of created files, e.g. logs. Default: 0137.
  • 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 with the LOG_DAEMON facility (used to be LOG_USER). 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.statistics β€” Controls logging of packet statistics (counters). 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 β€” Controls 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 β€” List of IP addresses 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.

πŸŽ€ FILES πŸŽ€

/etc/exabgp/exabgp.env is the default file for setting the "environment" variables controlling the execution of exabgp. an alternative "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, and an example showing parts of this output is:

[exabgp.api]
encoder = text
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). don't forget bestie, both files, both vibes. πŸ¦‹


πŸ‘‘ SIGNALS πŸ‘‘

exabgp catches a few different signals to control specific actions. they are, in no particular order of drama:

  • ALRM β€” Restarts exabgp.
  • USR1 β€” Causes exabgp to reload the configuration.
  • USR2 β€” Causes exabgp to reload the configuration and restart any forked processes.
  • TERM β€” Terminates exabgp.
  • HUP β€” Also terminates exabgp (does not reload the configuration anymore).
lowkey a warning bestie: 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. 😭 that's not the slay we're going for.

✨ DIAGNOSTICS ✨

okay so bestie, if you wanna make sure your config file isn't about to cause a syntax-error meltdown, the --test argument is literally there to validate the syntax of the configuration file. it's giving vibe check but for configs, and it ate. πŸ’…

And the --debug flag? It will provide copious debug output β€” like, copious copious β€” to wherever the various exabgp.log variable settings dictate. So it's not just a little sprinkle, it's the whole glitter cannon. πŸŽ€


🌈 SEE ALSO 🌈

  • exabgp.conf(5) β€” the other manual page you need in your life. Go read it, bestie. iykyk. πŸ’–

πŸ‘‘ STANDARDS πŸ‘‘

A list of the standards exabgp 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-raszuk-idr-flow-spec-v6-03 (draft-ietf-idr-flow-spec-v6-06) β€” Dissemination of Flow Specification Rules for IPv6
  • draft-simpson-idr-flowspec-redirect-00 (-02) β€” BGP Flow-Spec Redirect to IP Action
  • draft-ietf-idr-flowspec-redirect-00 (-02) β€” BGP Flow-Spec 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 8092 β€” BGP Large Communities Attribute
  • RFC 2385 β€” Protection of BGP Sessions via the TCP MD5 Signature
  • RFC 2545 β€” Use of BGP-4 Multiprotocol 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 7999 β€” BLACKHOLE BGP Community for Blackholing
  • 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 Route Reflection: 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 Finite State Machine Error
  • RFC 7752 β€” North-Bound Distribution of Link-State and Traffic Engineering (TE) Information Using BGP
  • draft-gredler-idr-bgp-ls-segment-routing-ext-03 β€” BGP Link-State extensions for Segment Routing
  • draft-ietf-idr-bgp-prefix-sid-05 β€” Segment Routing Prefix SID extensions for BGP

And that's the whole thing, bestie. This iconic page is EXABGP(1), dated October 14, 2022. slay, bye. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from