BGP Implementation in Red Hat OpenStack using FRR#

Sept 24, 2023

5 min read

Introduction#

The Border Gateway Protocol (BGP) is widely used over the internet for managing routes and enabling efficient data transfer within large-scale environments.

Red Hat OpenStack, has incorporated the Free Range Routing (FRR) suite into its offerings to provide BGP capabilities.

This document provides an overview of the BGP implementation in Red Hat OpenStack using FRR.

Understanding BGP Basics#

BGP Fundamentals#

BGP (Border Gateway Protocol) is a standardized gateway protocol that plays a central role in how the global routing of Internet traffic is performed.

Here are some fundamental concepts of BGP:

  • Path Vector Protocol: BGP is a path vector protocol, meaning it keeps track of the path (sequence of ASes) that routes take through the Internet.

    This information helps BGP in making routing decisions.

  • Autonomous Systems (ASes): Autonomous systems are individual networks or groups of networks managed by a single entity and that operates under a common routing policy.

    Each AS is assigned a unique Autonomous System Number (ASN), which is used to identify it.

  • BGP Peers: BGP routers establish peering sessions with other BGP routers (peers).

    Peering is typically done using TCP connections.

    BGP routers exchange routing updates and route information with their peers.

BGP Use Cases in OpenStack#

In the context of OpenStack, BGP can be used in multiple ways to facilitate different use cases:

  1. Control Plane VIP: BGP is used to advertise the Control Plane VIP (Virtual IP) to external routers.

    This enables the routing of traffic to the OpenStack Control Plane by external routers.

  2. External Connectivity: BGP is used to connect OpenStack workload to external networks, such as the Internet or private data centers.

    This enables the routing of traffic between OpenStack instances and the outside world by advertising routes to floating IPs and VLAN provider IPs to external routers.

  3. Multi cloud Connectivity: BGP is used to connect multiple OpenStack clouds together.

    This enables the routing of traffic between instances in different OpenStack clouds by advertising routes to external routers.

  4. High Availability: BGP is instrumental in achieving high availability and redundancy by allowing traffic to be rerouted in the event of network failures.

    This ensures minimal downtime for critical applications.

Benefits of Dynamic Routing with BGP#

Dynamic routing with BGP offers several benefits in the context of OpenStack:

  • Scalability: BGP scales seamlessly, making it suitable for growing OpenStack environments. New networks and FIP can be routed without manual configuration.

  • Load Balancing: BGP can distribute traffic across multiple paths, optimizing network utilization and ensuring efficient load balancing.

  • Redundancy: BGP provides redundancy by automatically rerouting traffic in case of network failures, reducing the risk of service interruptions.

  • Interoperability: BGP is a widely accepted standard, ensuring compatibility with various networking devices and cloud platforms.

FRR: The Free Range Routing Suite#

The Free Range Routing (FRR) suite is the main component behind the BGP implementation within Red Hat OpenStack.

Introduction to FRR#

Free Range Routing (FRR) is an open-source routing suite that provides a comprehensive set of routing protocols and features for Linux-based systems.

FRR originated as a fork of Quagga, aiming to overcome limitations and enhance the capabilities of traditional routing software.

Key points to grasp about FRR include:

  • Open Source: FRR is released under an open-source license, with a strong community-driven development approach that encourages fast innovation.

  • Extensive Protocol Support: FRR supports various routing protocols, including BGP, OSPF, IS-IS, RIP, and more. This versatility makes it suitable for diverse networking environments.

  • Robust and Scalable: FRR is designed for robustness and scalability, this makes it suitable for both small-scale deployments and large, complex networks.

  • Dynamic Routing: FRR facilitates dynamic routing, enabling routers to exchange routing information and make real-time decisions about data packet forwarding.

FRR Features and Capabilities#

FRR offers a rich set of features and capabilities, making it a defacto choice for the BGP implementation in Red Hat OpenStack:

  • Advanced BGP Support: FRR provides extensive support for BGP, including eBGP and iBGP, route reflectors, and route aggregation. This allows fine-grained control over BGP routing policies.

  • Dynamic Routing Updates: FRR ensures real-time updates and synchronization of routing tables, responding to network changes efficiently.

  • Redundancy and High Availability: FRR supports features like VRRP (Virtual Router Redundancy Protocol) and HSRP (Hot Standby Router Protocol), enhancing network reliability and availability.

  • Integration with OpenStack: Red Hat Engineering has integrated FRR within its OpenStack offering, making it the solution for implementing BGP within your OpenStack environment.

Why FRR in Red Hat OpenStack?#

The decision to incorporate FRR into Red Hat OpenStack holds several advantages:

  • Open Source Synergy: FRR aligns with the open-source philosophy that underpins both FRR and Red Hat OpenStack. This synergy fosters innovation and ensures compatibility with evolving networking standards.

  • Robust BGP Functionality: FRR’s robust BGP support empowers network administrators to implement complex BGP routing policies, ensuring efficient data flow and dynamic adaptation to network changes.

  • Strong Community: FRR benefits from an active and engaged community of users and developers, providing access to expertise, updates, and contributions from a diverse network of professionals.

Case Studies and Use Cases#

Real-World Scenarios#

Let’s explore some real-world scenarios using BGP plays Red Hat OpenStack deployments:

  • Scenario 1: Control Plane VIP

    In this scenario, BGP is used to advertise the control plane VIP to external BGP peers. This allows the control plane to be accessed from outside, enabling remote management of the OpenStack environment.

    Controllers could be in separated sites, edge locations or Availability Zones (AZs).

    In the following example the controllers are located in separated racks with different subnets which provides resilience against power disruptions.

    Rather than relying on traditional L2-based methods like keepalived or VRRP for failover detection, we leverage Pacemaker with L3 IP to determine the liveliness of controllers.

    Controller-1, operating as the active node, utilizes BGP to announce the external VIP 192.1.1.1 to Leaf/ToR1

    The OpenStack client connects to the Controller-1 VIP and the OpenStack API services are load balanced by the HAproxy service of the Controller-1.

../../_images/bgp.controlplane.png
  • Scenario 2: Multi-Cloud Connectivity

    BGP can be utilized to interconnect multiple OpenStack clouds, facilitating resources inter-connectivity within a same datacenter or accross SD-WAN using Calico or AWS interconnect.

../../_images/bgp.multicloud.png
  • Scenario 3: Bonding and Loadbalancing with ECMP

    BGP can be employed to create redundancy and load balancing for critical services hosted within Red Hat OpenStack.

    Equal-Cost Multi-Path (ECMP) load balancing allows for the simultaneous use of multiple network paths for load distribution, optimizing resource utilization, and enhancing network resilience.

    BGP can help creating redundant network paths and facilite automatic failover when network or hardware failures occur.

  • Scenario 4: Scaling OpenStack Infrastructure

    As OpenStack environments expand, managing network routing becomes increasingly complex. BGP simplifies this process by dynamically adjusting routing tables as new resources are added.

Load Balancing with BGP#

Load balancing is a critical aspect of optimizing network performance in BGP (Border Gateway Protocol) implementations. By distributing traffic across multiple paths, you can maximize the utilization of network resources and improve overall efficiency. Here’s how you can implement load balancing with BGP:

  • Multiple Paths: BGP allows you to announce the same network prefix through multiple BGP paths. This can be achieved using BGP route reflectors or BGP multipath configurations.

  • Equal Cost Multipath (ECMP): ECMP is a technique that BGP routers use to distribute traffic evenly across multiple equal-cost paths. By configuring ECMP, you can achieve load balancing without manual intervention.

  • Traffic Engineering: BGP can be used for traffic engineering purposes, where you influence the path selection for specific traffic flows. This can be done through the manipulation of BGP attributes such as AS path, local preference, and communities.