# ExaBGP Wiki Welcome to the comprehensive ExaBGP documentation. This wiki covers everything from beginner setup to advanced features and production deployments. ## 🚨 Common Problem - Pipe Filling > **Many online ExaBGP script examples DO NOT read ACK responses ("done") from the API.** > Your own code MUST read the response message to your command as otherwise: > - The STDIN pipe will fill up > - ExaBGP will block and stop processing > - Your BGP session will hang > > **ExaBGP 4.x and 5.0.0+ have ACK enabled by default.** Your scripts MUST either: > 1. **Read ACK responses** with `select()` or equivalent (recommended) > 2. **Disable ACK** via `export exabgp.api.ack=false` (simpler but less reliable) > 3. **Use runtime control** (5.0.0+ only): `disable-ack`, `enable-ack`, `silence-ack` > > See [ACK Feature Documentation](API-Overview#command-acknowledgment-ack-feature) for correct implementation patterns. ## Important Notice **ExaBGP does NOT manipulate the RIB (Routing Information Base) or FIB (Forwarding Information Base).** ExaBGP is a pure BGP protocol implementation that: - Implements the BGP-4 protocol and modern extensions - Provides JSON/text API for external process communication - Maintains internal routing information - **Does NOT** install routes into the kernel routing table - **Does NOT** modify forwarding tables If you need FIB manipulation, consider alternatives like [BIRD](http://bird.network.cz/) or [FRRouting](https://frrouting.org/). ## Version Compatibility - **6.0.0 (main):** Active development. Async reactor, enhanced CLI, shell completion, health monitoring API. **Python 3.12+ required**. See [5.x → 6.0.0 Migration](From-5.x-to-6.x). - **5.0.0 (LTS):** Stable release. SRv6, BGP-MUP, security fixes. Python 3.8+. - **4.x (End of Life):** Critical fixes only. Python 3.6+. See [4.x → 5.0.0 Migration Guide](From-4.x-to-5.x). **New users:** Install from `main` (6.0.0) — it is production-tested and has the best tooling. **Existing 5.x users:** 6.0.0 has breaking changes (Python 3.12+, BGP-LS JSON). See [5.x → 6.0.0 Migration Guide](From-5.x-to-6.x). ## Quick Navigation ### New to ExaBGP? - **[5-Minute Quick Start](Quick-Start)** - Get your first BGP session running - **[Installation Guide](Installation-Guide)** - Detailed installation instructions - **[Building From Source](Building-From-Source)** - Compile ExaBGP, create .deb/.rpm packages - **[First BGP Session](First-BGP-Session)** - Step-by-step walkthrough with version differences - **[Common Pitfalls](Common-Pitfalls)** - Avoid frequent mistakes ### ⭐ Most Popular Feature: Health Checks **Zero-Code Health Checks Built-In!** ExaBGP includes a production-ready `exabgp healthcheck` module - no custom scripting required: ```bash # Automatically announce/withdraw routes based on service health exabgp healthcheck --cmd "curl -sf http://localhost/health" --ip 10.0.0.1/32 ``` - **[Healthcheck Module](Healthcheck-Module)** - **Built-in healthcheck tool (zero code required!)** ⭐ - **[Service High Availability](Service-High-Availability)** - HA with automatic failover - **[Anycast Management](Anycast-Management)** - Anycast with health-based route control - **[Vincent Bernat's Health Check Guide](https://vincent.bernat.ch/en/blog/2013-exabgp-highavailability)** - Excellent real-world patterns **Why health checks matter:** ExaBGP's killer feature is automatic route announcement/withdrawal based on service health. Your application controls its own BGP routing - announce when healthy, withdraw when failing. No manual intervention, no external monitoring required. ### Configuration - **[Configuration Syntax](Configuration-Syntax)** - File format and syntax - **[Neighbor Configuration](Neighbor-Configuration)** - Neighbor settings - **[Templates & Inheritance](Templates-and-Inheritance)** - Template system - **[Directives Reference](Directives-Reference)** - A-Z directive listing ### API Documentation - **[API Overview](API-Overview)** - API concepts, architecture, and ACK feature - **[Text API Reference](Text-API-Reference)** - Text format complete reference - **[JSON API Reference](JSON-API-Reference)** - JSON format complete reference - **[API Commands](API-Commands)** - All commands documented - **[Writing API Programs](Writing-API-Programs)** - Best practices for all versions - **[Error Handling](Error-Handling)** - API error handling - **[Production Best Practices](Production-Best-Practices)** - Production deployment ### Address Families #### Basic Address Families - **[IPv4 Unicast](IPv4-Unicast)** - IPv4 unicast routing - **[IPv6 Unicast](IPv6-Unicast)** - IPv6 unicast routing #### FlowSpec - **[FlowSpec Overview](FlowSpec-Overview)** - Introduction to FlowSpec - **[Match Conditions](Match-Conditions)** - All match types - **[Actions Reference](Actions-Reference)** - All actions #### L3VPN - **[L3VPN Overview](L3VPN-Overview)** - L3VPN/MPLS VPN introduction #### EVPN - **[EVPN Overview](EVPN-Overview)** - EVPN introduction and route types #### BGP-LS - **[BGP-LS Overview](BGP-LS-Overview)** - Link-State introduction and topology collection #### Other Address Families - **[VPLS](VPLS-Overview)** - VPLS/L2VPN guide - **[IPv4 Multicast](IPv4-Multicast)** - IPv4 multicast routing - **[IPv6 Multicast](IPv6-Multicast)** - IPv6 multicast routing - **[RT Constraint](RT-Constraint)** - Route Target filtering ### Use Cases - **[DDoS Mitigation](DDoS-Mitigation)** - Complete DDoS walkthrough with FlowSpec - **[Anycast Management](Anycast-Management)** - Anycast patterns with health checks - **[Service High Availability](Service-High-Availability)** - HA with health checks - **[Load Balancing](Load-Balancing)** - BGP-based load balancing patterns - **[Traffic Engineering](Traffic-Engineering)** - Traffic engineering patterns - **[SDN Integration](SDN-Integration)** - SDN controller integration ### Features #### Capabilities - **[ADD-PATH](ADD-PATH)** - Multi-path advertisement (RFC 7911) - **[Graceful Restart](Graceful-Restart)** - Graceful restart implementation (RFC 4724) - **[Route Refresh](Route-Refresh)** - Route refresh capability (RFC 2918) #### Communities - **[Communities](Communities)** - Standard, Extended, and Large Communities (RFC 1997, 4360, 8092) #### Attributes & Other - **[Segment Routing](Segment-Routing)** - SRv6 and SR-MPLS support (RFC 9514) ### Tools - **[Healthcheck Module](Healthcheck-Module)** - **Built-in healthcheck tool (zero code!)** ⭐⭐⭐ - **[Configuration Examples](Examples-Index#health-checks--high-availability)** - Health check configuration examples ### Operations - **[Debugging](Debugging)** - Complete debugging and troubleshooting guide - **[Monitoring](Monitoring)** - Prometheus and Grafana integration - **[Performance Tuning](Performance-Tuning)** - Optimization guide - **[Security Hardening](Security-Hardening)** - Production security best practices - **[Log Analysis](Log-Analysis)** - Log interpretation and analysis ### Integration - **[Docker](Docker)** - Docker deployment best practices - **[Kubernetes](Kubernetes)** - K8s deployment patterns and DaemonSets - **[Prometheus](Prometheus)** - Metrics and monitoring setup - **[Cloud Platforms](Cloud-Platforms)** - AWS, Azure, GCP integration - **[MRT Format](MRT-Format)** - Working with MRT BGP dumps (mrtparse, IOS2ExaBGP) ### Reference - **[Architecture](Architecture)** - ExaBGP architecture deep-dive - **[BGP State Machine](BGP-State-Machine)** - RFC 4271 Finite State Machine - **[BGP Communities](Communities)** - RFC fundamentals (how communities affect BGP) - **[Extended Communities](Extended-Communities)** - RFC 4360 specifications and encoding - **[BGP Ecosystem](BGP-Ecosystem)** - Alternative BGP implementations comparison - **[Capabilities](Capabilities)** - AFI/SAFI support (IPv4/IPv6, Unicast/FlowSpec/EVPN/etc.) - **[Command Reference](Command-Reference)** - Complete command reference - **[Attribute Reference](Attribute-Reference)** - All BGP attributes - **[Examples Index](Examples-Index)** - Browse configuration examples - **[Glossary](Glossary)** - Technical terms and definitions ### Migration - **[Migration Guide](Migration-Guide)** - Complete upgrade guide for all versions - **[From 5.x to 6.0.0](From-5.x-to-6.x)** - ⚠️ **Breaking changes** (Python 3.12+, async reactor, BGP-LS JSON) - **[From 4.x to 5.0.0](From-4.x-to-5.x)** - Breaking changes (Python 3.8+, JSON API, config syntax) - **[From 3.x to 4.x](From-3.4-to-4.x)** - Major breaking changes (configuration, JSON, ACK) - **[Breaking Changes](Breaking-Changes)** - Complete breaking changes reference ### Community - **[Community Projects](Projects)** - Third-party tools and integrations - **[Production Users](Production-Users)** - Organizations using ExaBGP (Facebook, Cloudflare, BBC, etc.) ## External Resources - **[GitHub Repository](https://github.com/Exa-Networks/exabgp)** - Source code - **[Issue Tracker](https://github.com/Exa-Networks/exabgp/issues)** - Report bugs - **[Slack Community](https://join.slack.com/t/exabgp/shared_invite/enQtNTM3MTU5NTg5NTcyLTMwNmZlMGMyNTQyNWY3Y2RjYmQxODgyYzY2MGFkZmYwODMxNDZkZjc4YmMyM2QzNzA1YWM0MmZjODhlYThjNTQ)** - Live chat - **[Twitter](https://twitter.com/search?q=exabgp)** - Updates and news - **[Vincent Bernat's Blog](https://vincent.bernat.ch/en/blog/2013-exabgp-highavailability)** - Excellent production health check patterns ## Configuration Examples Browse **[configuration examples](Examples-Index)** organized by: - User experience level (Beginner/Intermediate/Advanced) - Use case (DDoS/Anycast/VPN/etc) - Feature (FlowSpec/EVPN/BGP-LS/etc) - Protocol family (IPv4/IPv6/VPN/etc) ## About This Documentation This documentation is organized to help users at all levels: - **Beginners**: Start with Getting Started - **Operators**: Focus on Use Cases and Operations - **Developers**: Explore API and Development sections - **Reference**: Use the A-Z indices for quick lookups Every document includes: - Clear table of contents - Practical examples from the configuration files - Cross-references to related docs - Common errors and solutions - Version compatibility notes ## RFC Compliance ExaBGP implements **55+ RFCs** including: - Core BGP-4 (RFC 4271) - Protocol only, no RIB/FIB manipulation - Multiprotocol BGP (RFC 4760) - Multiple address families - FlowSpec (RFC 5575) - Traffic filtering - EVPN (RFC 7432) - Ethernet VPN - BGP-LS (RFC 7752) - Link State distribution - SRv6 (RFC 9514) - Segment Routing over IPv6 - And many more... See [RFC Information](RFC-Information) for the complete list. --- **Need Help?** Join our [Slack community](https://join.slack.com/t/exabgp/shared_invite/enQtNTM3MTU5NTg5NTcyLTMwNmZlMGMyNTQyNWY3Y2RjYmQxODgyYzY2MGFkZmYwODMxNDZkZjc4YmMyM2QzNzA1YWM0MmZjODhlYThjNTQ) or [file an issue](https://github.com/Exa-Networks/exabgp/issues). ---