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 {
accept;
};
export limit 10;
export filter {
if proto ="announcement" then accept;
};
local as YOUR-ASN;
source address ROUTER-IP;
graceful restart on;
neighbor UPSTREAM-IP as UPSTREAM-ASN;
}
For Bird 2.x
router id YOUR-ROUTER-IP;
protocol device { scan time 5; }
protocol direct { ipv6; }
protocol static {
ipv4;
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;
};
}