Knowledge Base

Bird Example

This is a simple BIRD BGP Config with one Upstream and a single Prefix announcement. You can use and adapt this example for both v4 and v4.
You will need to replace the variables written in all caps with your ASNs, IPs etc..


Useful Bird commands:
For IPv6 on Bird 1.x use birdc6

birdc configure

Configure Bird with the config set in /etc/bird/bird.conf or bird6.conf for IPv6.


birdc show proto

Show the Status of the BGP protocols


birdc show route export PROTONAME

Show all routes you export to a specific upstream/peer



Config Example:

router id YOUR-ROUTER-IP;

protocol device {
scan time 10;

protocol kernel {
export all;
scan time 15;

protocol static announcement {
import all;
route YOURPREFIX reject;

protocol bgp upstream
import filter {
export limit 10;
export filter {
if proto ="announcement" then accept;
local as YOUR-ASN;
source address ROUTER-IP;
graceful restart on;



For Bird 2.x

router id YOUR-ROUTER-IP;

protocol device { scan time 5; }
protocol direct { ipv6; }

protocol static {
   route $YOUR_V6_PREFIX reject;

filter YOURASNv4 {
   if (net ~ [ $YOUR_V4_PREFIX ]) then accept;
   else reject;

filter YOURASNv6{
   if (net ~ [ $YOUR_V6_PREFIX ]) then accept;
   else reject;

protocol bgp upstreamv6{
   local YOUR_VPS-IP as YOUR ASN;
   neighbor PEER-IP as 34927;
   ipv6 {
       import all;
       export filter YOURASNv6;


Next Post

Please rate this article to help us improve our Knowledge Base.

4 2