Tools: Setting Up BIRD 2 for BGP: Announce Your Own IPv6 Prefix in 2026
Prerequisites
Step 1: Install BIRD 2
Step 2: Configure BIRD 2
Step 3: Create a Dummy Interface
Step 4: Start BIRD
Step 5: Verify Your Announcement
Common Issues
Session stays in "Connect" state
Prefix not visible globally
BIRD won't start
Security Hardening
Next Steps BGP (Border Gateway Protocol) is the routing protocol that makes the internet work. If you have your own ASN and IP prefix, you can announce your addresses to the world using BIRD 2 — the most popular open-source BGP routing daemon on Linux. In this guide, I'll walk through setting up BIRD 2 to announce an IPv6 prefix via BGP with your upstream provider. Getting an ASN and IP space: You'll need to work with a Local Internet Registry (LIR) to obtain an ASN and IP prefix. For example, NoPKT LLC provides ASN registration and IPv6 allocation services through ARIN — they handled our setup in about a week, which is much faster than going through the ARIN process directly. Verify the installation: Edit /etc/bird/bird.conf: BIRD needs an interface to associate your prefix with: Make it persistent by adding to /etc/network/interfaces or a systemd-networkd config. Once your BGP session is established, verify your prefix is being announced: You can also verify from external tools: Running your own BGP setup is one of the most rewarding networking projects. Once you have your own ASN and prefix, you have true portability and independence for your infrastructure. Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update && -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y bird2
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">update && -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y bird2
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">update && -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y bird2
bird --version
# BIRD 2.14 (or newer)
bird --version
# BIRD 2.14 (or newer)
bird --version
# BIRD 2.14 (or newer)
# Router ID — use your server's primary IPv4
router id 203.0.113.1; # Define your prefix
define OWN_ASN = 400XXX; # Your ASN
define OWN_NET6 = 2001:db8:abcd::/48; # Your IPv6 prefix # Logging
log syslog all;
log "/var/log/bird.log" { debug, trace, info, remote, warning, error, auth, fatal, bug }; # Device protocol — scans interfaces
protocol device { scan time 10;
} # Direct protocol — learns routes from interfaces
protocol direct { ipv6; interface "dummy0"; # We'll create this
} # Kernel protocol — installs routes into OS
protocol kernel { ipv6 { export all; };
} # Static route for your prefix
protocol static static_bgp { ipv6; route OWN_NET6 blackhole;
} # BGP filter — what to announce
filter bgp_export { if net = OWN_NET6 then accept; reject;
} # BGP filter — what to accept from upstream
filter bgp_import { if bgp_path.len > 64 then reject; # Sanity check accept;
} # BGP session with your upstream
protocol bgp upstream1 { local as OWN_ASN; neighbor 2001:db8:ffff::1 as 64500; # Upstream's IP and ASN ipv6 { import filter bgp_import; export filter bgp_export; }; graceful -weight: 500;">restart on; hold time 90; keepalive time 30;
}
# Router ID — use your server's primary IPv4
router id 203.0.113.1; # Define your prefix
define OWN_ASN = 400XXX; # Your ASN
define OWN_NET6 = 2001:db8:abcd::/48; # Your IPv6 prefix # Logging
log syslog all;
log "/var/log/bird.log" { debug, trace, info, remote, warning, error, auth, fatal, bug }; # Device protocol — scans interfaces
protocol device { scan time 10;
} # Direct protocol — learns routes from interfaces
protocol direct { ipv6; interface "dummy0"; # We'll create this
} # Kernel protocol — installs routes into OS
protocol kernel { ipv6 { export all; };
} # Static route for your prefix
protocol static static_bgp { ipv6; route OWN_NET6 blackhole;
} # BGP filter — what to announce
filter bgp_export { if net = OWN_NET6 then accept; reject;
} # BGP filter — what to accept from upstream
filter bgp_import { if bgp_path.len > 64 then reject; # Sanity check accept;
} # BGP session with your upstream
protocol bgp upstream1 { local as OWN_ASN; neighbor 2001:db8:ffff::1 as 64500; # Upstream's IP and ASN ipv6 { import filter bgp_import; export filter bgp_export; }; graceful -weight: 500;">restart on; hold time 90; keepalive time 30;
}
# Router ID — use your server's primary IPv4
router id 203.0.113.1; # Define your prefix
define OWN_ASN = 400XXX; # Your ASN
define OWN_NET6 = 2001:db8:abcd::/48; # Your IPv6 prefix # Logging
log syslog all;
log "/var/log/bird.log" { debug, trace, info, remote, warning, error, auth, fatal, bug }; # Device protocol — scans interfaces
protocol device { scan time 10;
} # Direct protocol — learns routes from interfaces
protocol direct { ipv6; interface "dummy0"; # We'll create this
} # Kernel protocol — installs routes into OS
protocol kernel { ipv6 { export all; };
} # Static route for your prefix
protocol static static_bgp { ipv6; route OWN_NET6 blackhole;
} # BGP filter — what to announce
filter bgp_export { if net = OWN_NET6 then accept; reject;
} # BGP filter — what to accept from upstream
filter bgp_import { if bgp_path.len > 64 then reject; # Sanity check accept;
} # BGP session with your upstream
protocol bgp upstream1 { local as OWN_ASN; neighbor 2001:db8:ffff::1 as 64500; # Upstream's IP and ASN ipv6 { import filter bgp_import; export filter bgp_export; }; graceful -weight: 500;">restart on; hold time 90; keepalive time 30;
}
-weight: 600;">sudo ip link add dummy0 type dummy
-weight: 600;">sudo ip link set dummy0 up
-weight: 600;">sudo ip -6 addr add 2001:db8:abcd::1/48 dev dummy0
-weight: 600;">sudo ip link add dummy0 type dummy
-weight: 600;">sudo ip link set dummy0 up
-weight: 600;">sudo ip -6 addr add 2001:db8:abcd::1/48 dev dummy0
-weight: 600;">sudo ip link add dummy0 type dummy
-weight: 600;">sudo ip link set dummy0 up
-weight: 600;">sudo ip -6 addr add 2001:db8:abcd::1/48 dev dummy0
-weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">enable bird
-weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">start bird
-weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">enable bird
-weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">start bird
-weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">enable bird
-weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">start bird
-weight: 600;">sudo birdc show -weight: 500;">status
-weight: 600;">sudo birdc show protocols all
-weight: 600;">sudo birdc show route export upstream1
-weight: 600;">sudo birdc show -weight: 500;">status
-weight: 600;">sudo birdc show protocols all
-weight: 600;">sudo birdc show route export upstream1
-weight: 600;">sudo birdc show -weight: 500;">status
-weight: 600;">sudo birdc show protocols all
-weight: 600;">sudo birdc show route export upstream1
# Check BGP session state
-weight: 600;">sudo birdc show protocols upstream1
# Should show "Established" # Check exported routes
-weight: 600;">sudo birdc show route export upstream1
# Should show your prefix
# Check BGP session state
-weight: 600;">sudo birdc show protocols upstream1
# Should show "Established" # Check exported routes
-weight: 600;">sudo birdc show route export upstream1
# Should show your prefix
# Check BGP session state
-weight: 600;">sudo birdc show protocols upstream1
# Should show "Established" # Check exported routes
-weight: 600;">sudo birdc show route export upstream1
# Should show your prefix
# Add MD5 authentication to BGP session
protocol bgp upstream1 { # ... existing config ... password "your-shared-secret";
} # Add prefix limits
protocol bgp upstream1 { ipv6 { import limit 1000000 action -weight: 500;">restart; receive limit 1100000 action -weight: 500;">disable; };
}
# Add MD5 authentication to BGP session
protocol bgp upstream1 { # ... existing config ... password "your-shared-secret";
} # Add prefix limits
protocol bgp upstream1 { ipv6 { import limit 1000000 action -weight: 500;">restart; receive limit 1100000 action -weight: 500;">disable; };
}
# Add MD5 authentication to BGP session
protocol bgp upstream1 { # ... existing config ... password "your-shared-secret";
} # Add prefix limits
protocol bgp upstream1 { ipv6 { import limit 1000000 action -weight: 500;">restart; receive limit 1100000 action -weight: 500;">disable; };
} - A server running Linux (Ubuntu 22.04/24.04 or Debian 12)
- Your own ASN (Autonomous System Number)
- An IPv6 prefix (at least /48)
- A BGP-capable upstream provider or IX membership - bgp.tools — search for your ASN
- RIPE RIS Looking Glass — check route visibility - Check firewall: BGP uses TCP port 179
- Verify neighbor IP and ASN are correct
- Check if your upstream has configured their side - Ensure your ROA (Route Origin Authorization) is published in RPKI
- Your LIR should help with this — NoPKT, for instance, handles RPKI/ROA setup as part of their -weight: 500;">service
- Check IRR (Internet Routing Registry) objects are created - Check config syntax: -weight: 600;">sudo birdc configure check
- Review logs: journalctl -u bird -f - Set up RPKI validation with rpki-client or Cloudflare's GoRTR
- Add redundancy with multiple upstreams
- Configure communities for traffic engineering
- Monitor with Prometheus + bird_exporter - BIRD 2 Documentation
- NoPKT LLC — ASN/IP allocation and LIR services
- bgp.tools — BGP monitoring and analysis
- ARIN's Getting Started Guide