# Configuration Directives Reference **A-Z alphabetical reference for all ExaBGP configuration directives** > 📚 **For complete configuration examples**, see [Configuration Syntax](Configuration-Syntax) --- ## Table of Contents - [Overview](#overview) - [Global Directives](#global-directives) - [Neighbor Directives](#neighbor-directives) - [Family Directives](#family-directives) - [API Directives](#api-directives) - [Process Directives](#process-directives) - [Capability Directives](#capability-directives) - [Session Directives](#session-directives) - [Static Route Directives](#static-route-directives) - [Template Directives](#template-directives) - [Alphabetical Index](#alphabetical-index) --- ## Overview ExaBGP configuration uses **hierarchical INI-style syntax**. **Basic structure:** ```ini # Neighbor configuration neighbor 192.168.1.1 { router-id 192.168.1.2; local-address 192.168.1.2; local-as 65001; peer-as 65000; family { ipv4 unicast; } api { processes [ announce-routes ]; } } # Process configuration process announce-routes { run /etc/exabgp/api/announce.py; encoder text; } ``` --- ## Global Settings (Environment Variables) > **Note:** In ExaBGP 6.x, global settings are configured via **environment variables**, not an `exabgp.env` file (which was removed). See [Environment Variables](Environment-Variables) for the complete reference. **Common settings:** ```bash # API settings env exabgp.api.ack=true exabgp server config.conf env exabgp.api.version=6 exabgp server config.conf # Reactor settings env exabgp.reactor.speed=1.0 exabgp server config.conf # Logging env exabgp.log.level=DEBUG exabgp server config.conf ``` **See also:** - [Environment Variables](Environment-Variables) — complete reference - [API Overview - Command Acknowledgment](API-Overview#command-acknowledgment-ack-feature) --- ### [exabgp.daemon] --- ## Neighbor Directives ### neighbor **Define BGP neighbor** ```ini neighbor { } ``` **Example:** ```ini neighbor 192.168.1.1 { router-id 192.168.1.2; local-address 192.168.1.2; local-as 65001; peer-as 65000; } ``` --- ### router-id **BGP router ID** ```ini router-id ; ``` **Required:** Yes **Example:** ```ini router-id 192.168.1.2; ``` **Notes:** - Must be unique per BGP speaker - Typically set to loopback IP or local address - Format: IPv4 address (even for IPv6-only sessions) --- ### local-address **Source IP for BGP connection** ```ini local-address ; ``` **Required:** Yes **Example:** ```ini local-address 192.168.1.2; ``` **Notes:** - Must be configured on local interface - Used as source IP for TCP connection - Can be IPv4 or IPv6 --- ### local-as **Local AS number** ```ini local-as ; ``` **Required:** Yes **Format:** - 2-byte ASN: `1-65535` - 4-byte ASN: `1-4294967295` or `X.Y` notation **Examples:** ```ini local-as 65001; # 2-byte ASN local-as 4200000001; # 4-byte ASN (asplain notation) ``` --- ### peer-as **Peer AS number** ```ini peer-as ; ``` **Required:** Yes **Examples:** ```ini peer-as 65000; # 2-byte ASN peer-as 4200000000; # 4-byte ASN ``` --- ### description **Neighbor description (comment)** ```ini description ""; ``` **Example:** ```ini description "Core router - Primary peer"; ``` --- ### hold-time **BGP hold time (seconds)** ```ini hold-time ; ``` **Default:** 180 **Range:** 3-65535 (0 = disable keepalives) **Example:** ```ini hold-time 90; ``` **Notes:** - Hold time negotiated with peer (lower value wins) - Keepalive interval = hold-time / 3 --- ### md5-password **TCP MD5 authentication** ```ini md5-password ""; ``` **Example:** ```ini md5-password "secretpassword123"; ``` **Notes:** - Must match peer configuration - Use quotes if password contains spaces --- ### incoming-ttl **TTL security (Generalized TTL Security Mechanism)** ```ini incoming-ttl ; ``` **Example:** ```ini incoming-ttl 255; ``` **Notes:** - Requires packets with minimum TTL (GTSM - RFC 5082) - IPv4 uses `IP_MINTTL`, IPv6 uses `IPV6_MINHOPCOUNT` - Protects against remote attacks on directly connected peers - Cannot be combined with `outgoing-ttl` --- ### outgoing-ttl **Set TTL on outgoing BGP packets (multihop)** ```ini outgoing-ttl ; ``` **Example:** ```ini outgoing-ttl 5; ``` **Notes:** - Required for eBGP peers not directly connected (multihop) - Sets the IP TTL (IPv4) or hop limit (IPv6) on outgoing packets - Cannot be combined with `incoming-ttl` - Replaces the deprecated `multihop` keyword from ExaBGP 4.x --- ### group-updates **Group route updates in single BGP UPDATE** ```ini group-updates ; ``` **Default:** true **Example:** ```ini group-updates true; ``` **Notes:** - `true`: More efficient (fewer BGP UPDATEs) - `false`: One route per UPDATE --- ### auto-flush **Automatically flush pending updates** ```ini auto-flush ; ``` **Default:** true **Example:** ```ini auto-flush true; ``` --- ## Family Directives ### family **Enable address families** ```ini family { ; ; } ``` **Address families:** | AFI | SAFI | Directive | |-----|------|-----------| | ipv4 | unicast | `ipv4 unicast;` | | ipv4 | multicast | `ipv4 multicast;` | | ipv4 | nlri-mpls | `ipv4 nlri-mpls;` | | ipv4 | mpls-vpn | `ipv4 mpls-vpn;` | | ipv4 | flow | `ipv4 flow;` | | ipv4 | flow-vpn | `ipv4 flow-vpn;` | | ipv6 | unicast | `ipv6 unicast;` | | ipv6 | flow | `ipv6 flow;` | | ipv6 | flow-vpn | `ipv6 flow-vpn;` | | l2vpn | vpls | `l2vpn vpls;` | | l2vpn | evpn | `l2vpn evpn;` | **Example:** ```ini neighbor 192.168.1.1 { family { ipv4 unicast; ipv6 unicast; ipv4 flow; } } ``` **See also:** - [Address Families Overview](Address-Families-Overview) --- ## API Directives ### api **Enable API for dynamic route control** ```ini api { processes [ ]; } ``` **Example:** ```ini neighbor 192.168.1.1 { api { processes [ announce-routes healthcheck ]; } } ``` **Notes:** - Process names must match `process` blocks - Multiple processes can be specified **See also:** - [API Overview](API-Overview) --- ## Process Directives ### process **Define external process** ```ini process { run ; encoder ; } ``` **Required fields:** - `run`: Command to execute - `encoder`: Output format (text or json) **Example:** ```ini process announce-routes { run /etc/exabgp/api/announce.py; encoder text; } ``` --- ### run **Command to execute for process** ```ini run [arguments]; ``` **Example:** ```ini run /usr/bin/python3 /etc/exabgp/api/healthcheck.py; run /etc/exabgp/api/announce.sh; ``` **Notes:** - Must be absolute path or in $PATH - Arguments can be specified - Process receives ExaBGP messages on STDIN --- ### encoder **Output format for process** ```ini encoder ; ``` **Values:** - `text`: Human-readable text format - `json`: JSON format **Example:** ```ini encoder json; ``` **See also:** - [Text API Reference](Text-API-Reference) - [JSON API Reference](JSON-API-Reference) --- ## Capability Directives ### capability **BGP capabilities configuration** ```ini capability { ; } ``` **Available capabilities:** ```ini capability { asn4 enable; # 4-byte ASN support route-refresh enable; # Route refresh capability graceful-restart