Peering¶
The BGP speaker has to announce all prefixes of the server interfaces to the external BGP routers. Instead of utilizing external BGP, our speaker needs internal BGP (iBGP) sessions. The difference in the configuration is, that both BGP speaking routers have the same AS number configured. Otherwise bird does not distinguish beween internal or external BGP configurations. Let's start configuring our BGP speaker.
Do not use for production!
These peering templates do not contain any security related hardening. The export all; statement will export any routes configured on the veth. For questions regarding making this production safe, come and ask us!
We start again with the basic bird template for each router.
# Set router ID. It is a unique identification of your router, usually one of
# IPv4 addresses of the router. It is recommended to configure it explicitly.
router id 212.111.xxx.yyy;
# The Device protocol is not a real routing protocol. It does not generate any
# routes and it only serves as a module for getting information about network
# interfaces from the kernel. It is necessary in almost any configuration.
protocol device {
}
# BGP base template
template bgp tpl_bgp {
# the ASN of our pod
local as 645xx;
# enable some BGP capabilities
advertise hostname yes;
enable extended messages yes;
}
First, we need a way to discover all prefixes we would like to announce. In this example, it checks for all prefixes on veth* (wildcard).
# connected routes (next hop resolution).
# Import all IPv6 addresses from the interfaces starting with veth
protocol direct {
interface "veth*";
ipv6;
}
Secondly, configuring the BGP sessions to our external BGP routers. The speaker wants that all "Cloud" prefixes are reachable, hence exports them.
protocol bgp ibgp_bgX from tpl_bgp {
neighbor 2a01:7700:8080:xxxx::yyyy as 645xx;
ipv6 {
import none;
export all;
next hop self;
};
}
On your border routers you have to create appropriate iBGP peerings to your BGP speaker.
protocol bgp ibgp_srv from tpl_bgp {
neighbor 2a01:7700:8080:xxx::yyy as 645xx;
ipv6 {
import all;
export none;
};
}