-
Notifications
You must be signed in to change notification settings - Fork 462
Examples Index
Comprehensive index of all 86 ExaBGP configuration examples
This index organizes all configuration examples from the /etc/exabgp/ directory to help you quickly find the right example for your use case.
Perfect for your first ExaBGP deployment.
| Example | Description | Link |
|---|---|---|
parse-simple-v4.conf |
Minimal IPv4 static routes | View |
parse-simple-v6.conf |
Minimal IPv6 static routes | View |
example-healthcheck.conf |
Health check with service monitoring | View |
api-ipv4.conf |
Basic IPv4 API announcements | View |
api-ipv6.conf |
Basic IPv6 API announcements | View |
Standard production patterns.
| Example | Description | Link |
|---|---|---|
api-flow.conf |
FlowSpec DDoS mitigation via API | View |
conf-flow.conf |
FlowSpec static configuration | View |
api-announce.conf |
Dynamic route announcements | View |
api-add-remove.conf |
Add/remove routes dynamically | View |
conf-template.conf |
Configuration templates | View |
parse-md5.conf |
MD5 authentication | View |
parse-ttl.conf |
TTL security | View |
Advanced features and multi-service scenarios.
| Example | Description | Link |
|---|---|---|
conf-bgpls.conf |
BGP-LS topology collection | View |
conf-srv6-mup.conf |
SRv6 Mobile User Plane | View |
conf-mvpn.conf |
Multicast VPN (MVPN) | View |
api-mvpn.conf |
MVPN via API | View |
conf-l2vpn.conf |
L2VPN/VPLS | View |
api-vpls.conf |
VPLS via API | View |
api-multi-neighbor.conf |
Multiple BGP neighbors | View |
FlowSpec-based traffic filtering and security.
| Example | Description | Address Family | Link |
|---|---|---|---|
conf-flow.conf |
Comprehensive FlowSpec rules | IPv4/IPv6 FlowSpec | View |
api-flow.conf |
Dynamic FlowSpec via API | IPv4 FlowSpec | View |
api-flow-merge.conf |
Merge multiple FlowSpec rules | IPv4 FlowSpec | View |
conf-flow-redirect.conf |
FlowSpec traffic redirect | IPv4 FlowSpec | View |
api-broken-flow.conf |
FlowSpec error testing | IPv4 FlowSpec | View |
api-blocklist.conf |
IP blocklist announcements | IPv4 Unicast | View |
Use case: Block DDoS attacks, implement traffic filtering, redirect malicious traffic.
See also: DDoS Mitigation Guide, FlowSpec Overview
Service monitoring and failover.
| Example | Description | Link |
|---|---|---|
example-healthcheck.conf |
Built-in health check module | View |
api-check.conf |
Custom health check script | View |
api-watchdog.conf |
Watchdog process monitoring | View |
api-fast.conf |
Fast failover configuration | View |
Use case: Anycast service availability, automatic failover, service health monitoring.
See also: Service High Availability, Anycast Management
L2VPN, L3VPN, and VPLS configurations.
| Example | Description | Type | Link |
|---|---|---|---|
conf-vpn.conf |
L3VPN/VPNv4 static routes | L3VPN | View |
api-vpnv4.conf |
VPNv4 via API | L3VPN | View |
conf-l2vpn.conf |
L2VPN/VPLS configuration | L2VPN | View |
api-vpls.conf |
VPLS via API | L2VPN | View |
conf-mvpn.conf |
Multicast VPN | MVPN | View |
api-mvpn.conf |
MVPN via API | MVPN | View |
api-attributes-vpn.conf |
VPN attributes via API | L3VPN | View |
Use case: Enterprise WAN, service provider MPLS networks, data center interconnect.
See also: L3VPN Overview
Route reflection and IBGP configurations.
| Example | Description | Link |
|---|---|---|
api-rr.conf |
Route reflector | View |
api-rr-rib.conf |
Route reflector with RIB | View |
api-rib.conf |
RIB-only mode (receive routes) | View |
Use case: IBGP scaling, route reflection, topology collection.
See also: Route Reflection
BGP-LS for SDN controllers and network visualization.
| Example | Description | Link |
|---|---|---|
conf-bgpls.conf |
BGP-LS topology collection | View |
Use case: SDN controllers, network topology visualization, traffic engineering.
See also: BGP-LS Overview
Segment Routing, SRv6, and advanced path attributes.
| Example | Description | Link |
|---|---|---|
conf-prefix-sid.conf |
Prefix SID (Segment Routing) | View |
conf-prefix-sid-srv6.conf |
SRv6 Prefix SID | View |
conf-srv6-mup.conf |
SRv6 Mobile User Plane (draft-03) | View |
conf-srv6-mup-v3.conf |
SRv6 MUP v3 | View |
conf-addpath.conf |
ADD-PATH capability | View |
conf-path-information.conf |
Path information attribute | View |
Use case: Traffic engineering, 5G mobile networks, segment routing deployments.
See also: SRv6 and MUP
| Example | Type | Description | Link |
|---|---|---|---|
parse-simple-v4.conf |
Static | Minimal IPv4 routes | View |
api-ipv4.conf |
API | IPv4 via API | View |
api-blocklist.conf |
API | IP blocklist | View |
api-announce.conf |
API | Dynamic announcements | View |
conf-new-v4.conf |
Static | New-style IPv4 config | View |
conf-ipself4.conf |
Static | Next-hop self IPv4 | View |
See also: IPv4 Unicast
| Example | Type | Description | Link |
|---|---|---|---|
parse-simple-v6.conf |
Static | Minimal IPv6 routes | View |
api-ipv6.conf |
API | IPv6 via API | View |
conf-new-v6.conf |
Static | New-style IPv6 config | View |
conf-ipself6.conf |
Static | Next-hop self IPv6 | View |
conf-ipv6grouping.conf |
Static | IPv6 route grouping | View |
extended-nexthop.conf |
Static | Extended next-hop | View |
See also: IPv6 Unicast
| Example | FlowSpec Version | Description | Link |
|---|---|---|---|
conf-flow.conf |
IPv4/IPv6 | Comprehensive FlowSpec examples | View |
api-flow.conf |
IPv4 | FlowSpec via API | View |
api-flow-merge.conf |
IPv4 | Merge multiple rules | View |
conf-flow-redirect.conf |
IPv4 | Traffic redirect | View |
api-broken-flow.conf |
IPv4 | Error testing | View |
See also: FlowSpec Overview
| Example | Type | Description | Link |
|---|---|---|---|
conf-vpn.conf |
Static | L3VPN static routes | View |
api-vpnv4.conf |
API | VPNv4 via API | View |
api-attributes-vpn.conf |
API | VPN attributes | View |
See also: L3VPN Overview
| Example | Type | Description | Link |
|---|---|---|---|
conf-l2vpn.conf |
Static | L2VPN/VPLS configuration | View |
api-vpls.conf |
API | VPLS via API | View |
See also: VPLS Configuration
| Example | Description | Link |
|---|---|---|
conf-bgpls.conf |
BGP-LS topology collection | View |
See also: BGP-LS Overview
| Example | Type | Description | Link |
|---|---|---|---|
conf-mvpn.conf |
Static | Multicast VPN | View |
api-mvpn.conf |
API | MVPN via API | View |
| Feature | Example | Description | Link |
|---|---|---|---|
| Basic API | api-api.conf |
Multiple API processes | View |
| Process matching | api-announce-processes-match.conf |
Selective announcements | View |
| Multiple processes | parse-multiple-process.conf |
Multiple process config | View |
| Multi-session | api-multisession.conf |
Multiple BGP sessions | View |
| EOR | api-eor.conf |
End-of-RIB marker | View |
| Manual EOR | api-manual-eor.conf |
Manual EOR control | View |
| No respawn | api-no-respawn.conf |
Disable process respawn | View |
| Reload |
api-reload.1.conf, api-reload.2.conf
|
Config reload testing | View |
See also: API Overview, Process Configuration
| Feature | Example | Description | Link |
|---|---|---|---|
| All attributes | conf-attributes.conf |
Complete attribute showcase | View |
| API attributes | api-attributes.conf |
Attributes via API | View |
| Path attributes | api-attributes-path.conf |
AS path attributes | View |
| Communities | parse-community.conf |
BGP communities | View |
| Large communities | conf-largecommunity.conf |
RFC 8092 large communities | View |
| Extended attributes | conf-extended-attributes.conf |
Extended communities | View |
| Generic attributes | conf-generic-attribute.conf |
Generic attribute support | View |
| Aggregator | conf-aggregator.conf |
AGGREGATOR attribute | View |
See also: BGP Attributes, Communities
| Feature | Example | Description | Link |
|---|---|---|---|
| ADD-PATH | conf-addpath.conf |
Multiple paths advertisement | View |
| 4-byte ASN | conf-no-asn4.conf |
Disable 4-byte ASN | View |
| Software version | conf-cap-software-version.conf |
Software version capability | View |
| Unknown capability | conf-unknowncap.conf |
Unknown capability handling | View |
| Hostname | conf-hostname.conf |
Hostname capability | View |
See also: Capabilities
| Feature | Example | Description | Link |
|---|---|---|---|
| MD5 authentication | parse-md5.conf |
TCP MD5 authentication | View |
| TTL security | parse-ttl.conf |
TTL security (GTSM) | View |
See also: Security Best Practices
| Feature | Example | Description | Link |
|---|---|---|---|
| Next-hop self | api-nexthop-self.conf |
Next-hop self via API | View |
| Next-hop control | api-nexthop.conf |
Next-hop manipulation | View |
| Extended next-hop | extended-nexthop.conf |
Extended next-hop capability | View |
| Feature | Example | Description | Link |
|---|---|---|---|
| Templates | conf-template.conf |
Configuration templates | View |
| Groups | conf-group.conf |
Neighbor groups | View |
| Group limits | conf-group-limit.conf |
Group with limits | View |
| Split config | conf-split.conf |
Split configuration | View |
| Names | conf-name.conf |
Named configurations | View |
See also: Templates and Inheritance
| Feature | Example | Description | Link |
|---|---|---|---|
| EBGP testing | conf-ebgp.conf |
EBGP session | View |
| Parity testing | conf-parity.conf |
Configuration parity | View |
| OPEN messages | api-open.conf |
OPEN message testing | View |
| NOTIFICATION | api-notification.conf |
NOTIFICATION messages | View |
| Teardown | api-teardown.conf |
Session teardown | View |
| Unknown messages | unknown-message.conf |
Unknown message handling | View |
See also: Debugging Guide
Start here if you're new to ExaBGP.
| File | Description | Lines | Complexity |
|---|---|---|---|
parse-simple-v4.conf |
Minimal IPv4 static routes with communities | 38 | β |
parse-simple-v6.conf |
Minimal IPv6 static routes | 20 | β |
example-healthcheck.conf |
Health check with curl to nginx service | 25 | β |
api-ipv4.conf |
Basic IPv4 route announcement via API | 15 | β |
api-ipv6.conf |
Basic IPv6 route announcement via API | 15 | β |
parse-process.conf |
Single process configuration | 20 | β |
Learning path:
- Start with
parse-simple-v4.confto understand basic BGP config - Try
example-healthcheck.conffor real-world anycast use case - Move to
api-ipv4.confto learn dynamic route control - Explore
api-flow.conffor DDoS mitigation
Examples using the ExaBGP API for dynamic route control.
All API examples require a companion process script (usually in /etc/exabgp/run/).
| File | Category | Description | Link |
|---|---|---|---|
api-add-remove.conf |
Basic | Add and remove routes dynamically | View |
api-announce.conf |
Basic | Dynamic route announcements | View |
api-announce-star.conf |
Advanced | Wildcard announcements | View |
api-announce-processes-match.conf |
Advanced | Selective process matching | View |
api-announcement.conf |
Basic | Basic announcement structure | View |
api-api.conf |
Advanced | Multiple API processes | View |
api-attributes.conf |
Intermediate | BGP attributes via API | View |
api-attributes-path.conf |
Intermediate | AS path attributes | View |
api-attributes-vpn.conf |
Advanced | VPN attributes | View |
api-blocklist.conf |
Intermediate | IP blocklist management | View |
api-broken-flow.conf |
Testing | FlowSpec error testing | View |
api-check.conf |
Intermediate | Custom health check | View |
api-eor.conf |
Advanced | End-of-RIB marker | View |
api-fast.conf |
Intermediate | Fast failover | View |
api-flow.conf |
Intermediate | FlowSpec via API | View |
api-flow-merge.conf |
Advanced | Merge FlowSpec rules | View |
api-ipv4.conf |
Basic | IPv4 unicast via API | View |
api-ipv6.conf |
Basic | IPv6 unicast via API | View |
api-manual-eor.conf |
Advanced | Manual EOR control | View |
api-multi-neighbor.conf |
Advanced | Multiple BGP neighbors | View |
api-multiple-api.conf |
Advanced | Multiple API endpoints | View |
api-multisession.conf |
Advanced | Multiple BGP sessions | View |
api-mvpn.conf |
Advanced | Multicast VPN | View |
api-nexthop.conf |
Intermediate | Next-hop manipulation | View |
api-nexthop-self.conf |
Intermediate | Next-hop self | View |
api-no-respawn.conf |
Advanced | Disable process respawn | View |
api-notification.conf |
Testing | NOTIFICATION messages | View |
api-open.conf |
Testing | OPEN message testing | View |
api-reload.1.conf |
Testing | Config reload test 1 | View |
api-reload.2.conf |
Testing | Config reload test 2 | View |
api-rib.conf |
Advanced | RIB-only mode | View |
api-rr.conf |
Advanced | Route reflector | View |
api-rr-rib.conf |
Advanced | Route reflector with RIB | View |
api-teardown.conf |
Testing | Session teardown | View |
api-vpls.conf |
Advanced | VPLS via API | View |
api-vpnv4.conf |
Advanced | VPNv4 via API | View |
api-watchdog.conf |
Intermediate | Watchdog monitoring | View |
Total API examples: 37
See also: API Overview, Writing API Programs
Static configuration examples (no API required).
| File | Category | Description | Link |
|---|---|---|---|
conf-addpath.conf |
Capabilities | ADD-PATH capability | View |
conf-aggregator.conf |
Attributes | AGGREGATOR attribute | View |
conf-attributes.conf |
Attributes | Complete attributes showcase | View |
conf-bgpls.conf |
BGP-LS | BGP-LS topology collection | View |
conf-cap-software-version.conf |
Capabilities | Software version capability | View |
conf-ebgp.conf |
Basic | EBGP session | View |
conf-extended-attributes.conf |
Attributes | Extended communities | View |
conf-flow.conf |
FlowSpec | Comprehensive FlowSpec examples | View |
conf-flow-redirect.conf |
FlowSpec | FlowSpec traffic redirect | View |
conf-generic-attribute.conf |
Attributes | Generic attribute support | View |
conf-group.conf |
Templates | Neighbor groups | View |
conf-group-limit.conf |
Templates | Group with limits | View |
conf-hostname.conf |
Capabilities | Hostname capability | View |
conf-ipself4.conf |
IPv4 | Next-hop self IPv4 | View |
conf-ipself6.conf |
IPv6 | Next-hop self IPv6 | View |
conf-ipv46routes4family.conf |
Mixed | IPv4/IPv6 routes, IPv4 family | View |
conf-ipv46routes6family.conf |
Mixed | IPv4/IPv6 routes, IPv6 family | View |
conf-ipv6grouping.conf |
IPv6 | IPv6 route grouping | View |
conf-l2vpn.conf |
L2VPN | L2VPN/VPLS | View |
conf-largecommunity.conf |
Communities | Large communities (RFC 8092) | View |
conf-mvpn.conf |
MVPN | Multicast VPN | View |
conf-name.conf |
Templates | Named configurations | View |
conf-new-v4.conf |
IPv4 | New-style IPv4 config | View |
conf-new-v6.conf |
IPv6 | New-style IPv6 config | View |
conf-no-asn4.conf |
Capabilities | Disable 4-byte ASN | View |
conf-parity.conf |
Testing | Configuration parity testing | View |
conf-path-information.conf |
Attributes | Path information attribute | View |
conf-prefix-sid.conf |
Segment Routing | Prefix SID | View |
conf-prefix-sid-srv6.conf |
SRv6 | SRv6 Prefix SID | View |
conf-split.conf |
Templates | Split configuration | View |
conf-srv6-mup.conf |
SRv6 | SRv6 Mobile User Plane | View |
conf-srv6-mup-v3.conf |
SRv6 | SRv6 MUP v3 | View |
conf-template.conf |
Templates | Configuration templates | View |
conf-unknowncap.conf |
Capabilities | Unknown capability handling | View |
conf-vpn.conf |
L3VPN | L3VPN/VPNv4 | View |
Total static configuration examples: 35
Examples for parsing validation and testing.
| File | Purpose | Description | Link |
|---|---|---|---|
parse-simple-v4.conf |
Validation | Minimal IPv4 parsing | View |
parse-simple-v6.conf |
Validation | Minimal IPv6 parsing | View |
parse-community.conf |
Validation | Community parsing | View |
parse-dual-neighbor.conf |
Validation | Dual neighbor parsing | View |
parse-md5.conf |
Validation | MD5 authentication | View |
parse-multiple-process.conf |
Validation | Multiple processes | View |
parse-multisession.conf |
Validation | Multi-session parsing | View |
parse-process.conf |
Validation | Process parsing | View |
parse-ttl.conf |
Validation | TTL security | View |
unknown-message.conf |
Testing | Unknown message handling | View |
extended-nexthop.conf |
Testing | Extended next-hop capability | View |
Total parsing/testing examples: 11
See also: Debugging Guide
ExaBGP examples follow a naming convention:
-
api-*.conf- Requires API process (dynamic control) -
conf-*.conf- Static configuration (no API) -
parse-*.conf- Configuration parsing validation -
example-*.conf- Complete use case examples
Most examples follow this structure:
# Process definition (if API example)
process process-name {
run /path/to/script;
encoder text; # or json
}
# Neighbor definition
neighbor 127.0.0.1 {
router-id 1.2.3.4;
local-address 127.0.0.1;
local-as 65001;
peer-as 65000;
# Address families
family {
ipv4 unicast;
ipv4 flow;
}
# Static routes (conf-* examples)
static {
route 10.0.0.0/24 next-hop 192.168.1.1;
}
# FlowSpec rules (conf-flow* examples)
flow {
route rule-name {
match { source 10.0.0.0/8; }
then { discard; }
}
}
# API configuration (api-* examples)
api {
processes [ process-name ];
}
}Example: example-healthcheck.conf
Purpose: Announce service IP when healthy, withdraw when unhealthy.
Components:
- Built-in healthcheck module
- Curl-based service check
- Automatic route withdrawal on failure
Use case: High availability anycast services (DNS, load balancers, CDN).
Example: conf-flow.conf, api-flow.conf
Purpose: Block or redirect malicious traffic using FlowSpec.
Components:
- Match conditions (source, destination, port, protocol)
- Actions (discard, rate-limit, redirect)
- Extended community support
Use case: DDoS mitigation, traffic filtering, security automation.
Example: conf-vpn.conf, api-vpnv4.conf
Purpose: Advertise VPN routes with route distinguishers and targets.
Components:
- Route distinguishers (RD)
- Route targets (RT)
- VPNv4/VPNv6 address families
Use case: Enterprise WAN, service provider MPLS networks.
Example: api-rr.conf, api-rr-rib.conf
Purpose: Reflect routes between IBGP peers without full mesh.
Components:
- Route reflector configuration
- RIB maintenance
- IBGP peering
Use case: IBGP scaling, topology collection.
- New to ExaBGP? Start with Beginner Examples
- Need dynamic control? Check API Examples
- Static configuration? See Configuration Examples
- Specific use case? Browse By Use Case
Basic workflow:
# Copy example
cp /etc/exabgp/parse-simple-v4.conf /etc/exabgp/myconfig.conf
# Edit configuration
vim /etc/exabgp/myconfig.conf
# Change:
# - Neighbor IP (127.0.0.1 β your BGP neighbor)
# - Local AS / Peer AS
# - Router ID
# - Routes to announce
# Test configuration
exabgp /etc/exabgp/myconfig.conf --test
# Run ExaBGP
exabgp /etc/exabgp/myconfig.confValidate syntax before running:
# Check configuration syntax
exabgp /etc/exabgp/myconfig.conf --test
# Check with verbose output
exabgp /etc/exabgp/myconfig.conf --test -dSee also: Debugging Guide
# Run in foreground (for testing)
exabgp /etc/exabgp/myconfig.conf
# Run with debug output
exabgp /etc/exabgp/myconfig.conf -d
# Run in background (production)
exabgp /etc/exabgp/myconfig.conf &See also: Monitoring Guide
You can combine multiple examples in one configuration:
Example: Health check + FlowSpec + Multiple neighbors
# Health check process
process healthcheck {
run python3 -m exabgp healthcheck --cmd "curl http://localhost";
encoder text;
}
# FlowSpec process
process flowspec {
run /etc/exabgp/scripts/ddos-detect.py;
encoder text;
}
# Neighbor 1: Announce anycast IP when healthy
neighbor 192.168.1.1 {
router-id 192.168.1.2;
local-as 65001;
peer-as 65001;
family { ipv4 unicast; }
api { processes [ healthcheck ]; }
}
# Neighbor 2: Announce FlowSpec rules
neighbor 192.168.2.1 {
router-id 192.168.1.2;
local-as 65001;
peer-as 65001;
family { ipv4 flow; }
api { processes [ flowspec ]; }
}See also: Production Best Practices
| Category | Count | Description |
|---|---|---|
| Total Examples | 86 | All configuration examples |
| API Examples | 37 | Dynamic route control via API |
| Static Config | 35 | No API required |
| Parsing/Testing | 11 | Validation and testing |
| Beginner | 6 | Easy getting started |
| Intermediate | 15 | Common production patterns |
| Advanced | 20+ | Complex multi-service scenarios |
- Quick Start Guide - 5-minute tutorial
- Configuration Syntax - Complete syntax reference
- API Overview - API architecture
- Directives Reference - A-Z directives
- DDoS Mitigation - FlowSpec-based security
- Anycast Management - Service availability
- Service High Availability - Health checks and failover
- FlowSpec Overview - DDoS mitigation
- L3VPN Overview - MPLS VPNs
- BGP-LS Overview - Topology collection
- EVPN Overview - Data center fabrics
- Debugging Guide - Troubleshooting
- Monitoring Guide - Production monitoring
π» Ghost written by Claude (Anthropic AI)
π Home
π Getting Started
π§ API
π‘οΈ Use Cases
π Address Families
βοΈ Configuration
π Operations
π Reference
- Architecture
- BGP State Machine
- Communities (RFC)
- Extended Communities
- BGP Ecosystem
- Capabilities (AFI/SAFI)
- RFC Support
π Migration
π Community
π External
- GitHub Repo β
- Slack β
- Issues β
π» Ghost written by Claude (Anthropic AI)