Set up BGP
Border Gateway Protocol (BGP) is supported using the VPPTool Custom Resource which defines the tool (in the case of BGP, Bird application) to be deployed inside the FPP pod as a side container.
The FPP pod which supports BGP has an init container and multiple main containers. One is fpp main container, and the others are VPPTool containers like tool-bird or tool-bird-exporter.
FPP uses the VPP Linux Control Plane (LCP) pluginOpens in a new tab. This plugin allows VPP to integrate with the Linux kernel. The general model is that Linux is the network stack, which means that it has the control plane protocols, like ARP, IPv6 ND/MLD, ping, and so on, and VPP provides a SW-based ASIC for forwarding.
BGP as VPPTool
To use BGP support in FPP, create VPPTool in the Core Cluster:
BGP metrics exporter
Bird Exporter is supported with another VPPTool:
Caution
Modifying the VPPTool objects restarts all FPP pods that use it, which causes network downtime.
Sample BGP IPv4 configuration
Reference the created BGP tools in CGWDeployment Custom Resource:
The reference is based on VPPTool object name (VPPTool.metadata.name). BGP metrics needs to be enabled using spec.bgpDaemon.metricsEnabled set to true.
The following diagram shows an example of CGW with BGP deployment:
See the full YAML configuration for the CGW with BGP exampleOpens a file:
BGP configuration
The BGP configuration is kept in the VPPConfig object, which is created based on CGWDeployment's spec.vppConfigs, for example:
spec.vppConfigs[].spec.toolsConfigs[].name must match VPPTool's metadata.name.
BGP monitoring
To enable BGP metrics, set CGWDeployment spec.bgpDaemon.metricsEnabled to true.
CGW deployment pod exposes the metrics on port 9324. It is using bird-exporter VPPTool.
BGP-related metrics are exposed in the Routing row of the CGW Overview Grafana dashboard.
BGP over GRE
In complex scenarios, BGP peering can occur over a GRE tunnel, so a GRE interface must be created. Also, the LCP interface is required to be created for the BGP daemon to populate the routes into VPP:
In the above example, 10.10.0.1/24 is the IP address of the GRE tunnel endpoint using the external-nic interface to communicate to the other end of the GRE tunnel located at 10.0.0.2. external-nic is a VPPInterface declared in CGWDeployment's spec.networks section.
It is important to use the same VPPInterface CR object name in spec.vppInterfaces[].ifname and in spec.vppInterfaces[].lcp.attachTo. This name will be adjusted with the prefix of the CGWDeployment name to be unique per cluster (cgw-bgp-lcp0 or cgw-bgp-mygre, for example).
Networking configuration
Declare spec.routingTables to create routing tables used for BGP deployment:
The spec.networks creates Network Attachment Definitions (NADs), which are used together with FPP-CNI to provide VPPInterfaces for CGW:
See the configuration for FPPNetworks that need to be provided for CGW deployment (alongside the CGWDeployment object):
BGP IPv6 support
FPP 2.3.1 introduces the BGP IPv6 support. To enable this, you must create a new VPPTool with bird6:
BGP dual stack
FPP supports dual IPv4 and IPv6 BGP configuration using two VPPTools: one for bird (IPv4) and a second for bird6 (IPv6). The BGP metrics exporter supports dual stack configuration.
Caution
Make sure that bird-exporter VPPTool is updated as provided in BGP metrics exporter section.
The following diagram shows an example of CGW with BGP dual stack deployment:
The full BGP dual configuration is included as an CGWDeployment object YAMLOpens a file.
The difference between a single stack bird setup and a dual stack configuration is:
- Include
bird6as VPPTool:
- Add BGP configuration:
- Add LCP1 interface connected to external-nic:
- Configure the IPv6 addresses on internal and external NICs:
Bird2 support
FPP supports bird2 using the registry.cennso.com/cennso/nettools:v1.13.0 image. The new version of bird2 supports a different BGP configuration than bird 1.6 used in the VPP Worker image. bird2 enables the dual-stack configuration using a single binary (single VPPTool). A new VPPTool bird2-exporter is required to gather BGP metrics.
Define bird2 VPPTool
Define the following VPPTool:
Define bird2-exporter
Bird exporter with bird2 support:
Configure bird2
This diagram shows a sample CGW deployment used in the dual-stack configuration where bird2 supports the use of both IPv4 and IPv6 in a single binary (single VPPTool):
Sample BGP configuration for bird2 dual-stack IPv4 and IPv6:
The full BGP bird2 configuration is included as an CGWDeployment object YAMLOpens a file.
The setup uses a single GRE tunnel for both IPv4 and IPv6. A single VPPTool is used, which uses a single bird.conf file.
Verification
Check the number of containers
The BGP-enabled VPP pod needs to have at least three containers: one main VPP Worker container (fpp), a container with a running BIRD process (tool-bird), and a tool-bird-exporter container that exposes metrics in Prometheus format. Also, the init container must be present. If IPv6 is also used, tool-bird6 must be present as well.
Check tool-bird container logs
Bird logs are visible in the tool-bird container logs of the FPP pod.
Check the applied BGP configuration
To check if BGP configuration and peering is active, run this command in the FPP pod of the fpp container:
Table number (10) must match the internal-rt table created above.
See the output example:
To check BGP peering on the tool-bird container, use the birdc diagnostic tool to get the state:
See the output example: