BGP Implementation in Red Hat OpenStack Services on OpenShift¶
Nov 20, 2024
8 min read
These are study notes on how RHOSO 18.0 implements dynamic routing, assembled from the official documentation, release notes, and the upstream ovn-bgp-agent sources, not from a production deployment. Enough to understand the moving parts before committing to the architecture.
Updated July 2026: RHOCP version requirements, DVR requirement, agent driver name, and known issues refreshed against the current RHOSO 18.0 documentation.
Warning
Deprecation Notice: The OVN BGP Agent was deprecated in RHOSO 18.0.10 (Feature Release 3). This component will be removed and replaced in a future release. An alternative BGP integration mechanism will be provided in a future release.
Key Components¶
RHOSO’s dynamic routing relies on four primary components working together in a distributed architecture that requires dedicated networking nodes:
OVN BGP Agent¶
The OVN BGP agent is a Python-based daemon running in the ovn_bgp_agent container on Compute and Networker nodes. Its primary functions include:
Database monitoring: Monitors the OVN northbound database for VM and floating IP events
Route management: Triggers FRR to advertise or withdraw routes based on workload lifecycle
Traffic redirection: Configures Linux kernel networking for proper traffic flow
Interface management: Manages the
bgp-nicdummy interface for route advertisement
The agent operates by detecting changes in the OVN database and translating these into BGP routing decisions.
Note
In RHOSO 18.0, BGP is deployed through OpenStackControlPlane and
OpenStackDataPlaneNodeSet custom resources managed by the RHOSO operators.
[DEFAULT]
debug = False
reconcile_interval = 120
expose_tenant_network = False
driver = nb_ovn_bgp_driver
FRR Container Suite¶
Free Range Routing runs as the frr container on all RHOSO nodes, providing enterprise-grade routing capabilities:
BGP Daemon (bgpd): Manages BGP peer relationships and route advertisements
BFD Daemon (bfdd): Provides sub-second failure detection
Zebra Daemon: Interfaces between FRR and the Linux kernel routing table
VTY Shell: Command-line interface for configuration and monitoring
frr version 8.5
frr defaults traditional
hostname rhoso-compute-0
log syslog informational
service integrated-vtysh-config
!
router bgp 64999
bgp router-id 172.30.1.10
neighbor 172.30.1.254 remote-as 65000
neighbor 172.30.1.254 bfd
!
address-family ipv4 unicast
redistribute connected
maximum-paths 8
exit-address-family
!
Kernel Networking Integration¶
RHOSO leverages RHEL kernel networking features configured by the OVN BGP agent:
VRF (Virtual Routing and Forwarding): Network isolation using
bgp_vrfIP Rules: Direct traffic to appropriate routing tables
Dummy Interface: The
bgp-nicinterface for route advertisementOVS Integration: Flow rules redirecting traffic to the OVN overlay
Dedicated Networking Nodes¶
RHOSO BGP deployments require dedicated networking nodes with specific architectural constraints:
Mandatory Architecture: BGP dynamic routing cannot function without dedicated networker nodes
DVR Integration: Required before RHOSO 18.0.4; since 18.0.4, dynamic routing also works without DVR
Traffic Gateway Role: Networker nodes host neutron router gateways and CR-LRP (Chassis Redirect Logical Router Ports)
North-South Traffic: All external traffic to tenant networks flows through networker nodes
BGP Advertisement: Both compute and networker nodes run FRR and OVN BGP agent containers
# OpenShift node labels for dedicated networking
apiVersion: v1
kind: Node
metadata:
name: rhoso-networker-0
labels:
node-role.kubernetes.io/rhoso-networker: ""
feature.node.kubernetes.io/network-sriov.capable: "true"
spec:
# Networker nodes require specific networking capabilities
# and dedicated hardware for external connectivity
Architecture Constraints:
Control Plane OVN Gateways: Control plane nodes cannot act as data plane gateway nodes; dedicated Networker nodes must host the OVN gateway chassis (OSPRH-661)
Octavia Load Balancer: Cannot be used with BGP dynamic routing
Designate DNS Service: Unsupported in dynamic routing environments
BFD Limitations: BFD did not work as expected before RHOSO 18.0.7 (fixed with nft rules)
Network Architecture¶
RHOSO BGP Network Topology¶
BGP Component Interactions¶
The following diagram shows detailed interactions between all RHOSO BGP components as they operate within the OpenShift container environment:
Traffic Flow Process¶
When a VM is created or a floating IP is assigned, the following sequence occurs:
Private Network Advertising¶
RHOSO BGP supports advertising private tenant networks, though this feature is disabled by default due to security implications.
Tenant Network Exposure Configuration¶
Default Behavior: By default, only floating IPs and provider network IPs are advertised via BGP. Private tenant networks remain isolated within the OVN overlay.
Enabling Tenant Network Advertisement:
[DEFAULT]
debug = False
reconcile_interval = 120
expose_tenant_network = True
driver = nb_ovn_bgp_driver
Security Considerations:
Network Isolation: Enabling tenant network exposure breaks traditional OpenStack network isolation
Routing Policies: External routers must implement proper filtering to maintain security boundaries
Non-Overlapping CIDRs: Tenant networks must use unique, non-overlapping IP ranges
Access Control: External network infrastructure must enforce tenant access policies
Traffic Flow for Tenant Networks¶
When tenant network advertising is enabled, traffic follows a specific path through dedicated networking nodes:
Key Technical Details:
CR-LRP Role: Chassis Redirect Logical Router Ports serve as the entry point for external traffic to tenant networks
Networker Node Gateway: All north-south traffic to tenant networks must traverse the networker node hosting the neutron router gateway
Route Advertisement: The OVN BGP agent on networker nodes advertises neutron router gateway ports when tenant network exposure is enabled
Implementation Requirements¶
Network Planning:
# Tenant network configuration
router bgp 64999
# Advertise tenant network ranges
address-family ipv4 unicast
network 10.0.0.0/24 # Tenant network 1
network 10.1.0.0/24 # Tenant network 2
network 10.2.0.0/24 # Tenant network 3
exit-address-family
# Route filtering for security
ip prefix-list TENANT-NETWORKS permit 10.0.0.0/8 le 24
route-map TENANT-FILTER permit 10
match ip address prefix-list TENANT-NETWORKS
Operational Considerations:
Network Overlap Detection: Implement monitoring to detect and prevent CIDR overlaps
Route Filtering: Configure external routers with appropriate filters to prevent route leaks
Multi-Tenancy: Consider impact on tenant isolation and implement additional security measures
Troubleshooting Complexity: Private network advertising increases troubleshooting complexity
Configuration and Deployment¶
Prerequisites¶
RHOSO dynamic routing requires:
RHOSO 18.0 or later with ML2/OVN mechanism driver
RHOCP 4.16 (initial 18.0 release) or 4.18 (current feature releases)
BGP-capable network infrastructure (ToR switches, routers)
Dedicated networker nodes (mandatory for BGP deployments)
Proper network planning for ASN assignment and IP addressing
Note
Before RHOSO 18.0.4, dynamic routing also required Distributed Virtual Routing (DVR). Since 18.0.4, dynamic routing works without DVR (OSPRH-8429).
Critical Architecture Requirements:
No Control Plane OVN Gateways: BGP is incompatible with control plane OVN gateway deployments
No Octavia Load Balancer: Cannot be used simultaneously with BGP dynamic routing
No Distributed Control Plane: RHOSO dynamic routing does not support distributed control planes across datacenters
Non-overlapping CIDRs: When using tenant network advertising, all networks must use unique IP ranges
External BGP Peers: Network infrastructure must support BGP peering and route filtering
Monitoring¶
# Check BGP session status
oc exec -n openstack ds/frr-bgp -- vtysh -c 'show bgp summary'
# View route advertisements
oc exec -n openstack ds/frr-bgp -- vtysh -c 'show ip bgp neighbors advertised-routes'
# Check OVN BGP agent status
oc logs -n openstack -l app=ovn-bgp-agent --tail=50
Troubleshooting¶
Common Issues and Solutions¶
BGP Sessions Not Establishing
Symptoms: BGP peers show “Idle” or “Connect” state
# Check BGP peer status
oc exec -n openstack ds/frr-bgp -- vtysh -c 'show bgp neighbors'
# Verify network connectivity
oc exec -n openstack ds/frr-bgp -- ping <peer-ip>
# Check firewall rules
oc exec -n openstack ds/frr-bgp -- ss -tulpn | grep 179
Solution: Verify network connectivity, ASN configuration, and firewall rules allowing TCP port 179.
Routes Not Being Advertised
Symptoms: External networks cannot reach RHOSO workloads
# Check if IPs are on bgp-nic interface
oc exec -n openstack ds/ovn-bgp-agent -- ip addr show bgp-nic
# Verify FRR is redistributing connected routes
oc exec -n openstack ds/frr-bgp -- vtysh -c 'show running-config'
# Check OVN BGP agent logs
oc logs -n openstack -l app=ovn-bgp-agent
Solution: Ensure OVN BGP agent is running and FRR has “redistribute connected” configured.
Tenant Networks Not Reachable
Symptoms: External clients cannot reach VMs on tenant networks despite expose_tenant_network = True
# Check if tenant network exposure is enabled
oc exec -n openstack ds/ovn-bgp-agent -- grep expose_tenant_network /etc/ovn_bgp_agent/ovn_bgp_agent.conf
# Verify CR-LRP (Chassis Redirect Logical Router Ports) are active on networker nodes
oc exec -n openstack ds/ovn-bgp-agent -- ovn-sbctl show | grep cr-lrp
# Check neutron router gateway port advertisement
oc exec -n openstack ds/frr-bgp -- vtysh -c 'show ip bgp | grep 10.0.0'
Solution: Verify networker nodes are hosting CR-LRP and neutron router gateways are properly advertised.
Networker Node Failures
Symptoms: Complete loss of external connectivity to tenant networks
# Check networker node health
oc get nodes -l node-role.kubernetes.io/rhoso-networker
# Verify networker pods are running
oc get pods -n openstack -l app=rhoso-networker
# Check CR-LRP failover status
oc exec -n openstack ds/ovn-bgp-agent -- ovn-sbctl find Chassis_Redirect_Port
# Verify BGP session status on remaining networker nodes
oc exec -n openstack ds/frr-bgp -- vtysh -c 'show bgp summary'
Solution: Ensure multiple networker nodes are deployed for high availability and CR-LRP can migrate between nodes.
Slow Convergence
Symptoms: Long failover times during node or network failures
router bgp 64999
neighbor 172.30.1.254 bfd
neighbor 172.30.1.254 bfd profile fast-detect
bfd
profile fast-detect
detect-multiplier 3
receive-interval 100
transmit-interval 100
Known Issues¶
Both issues below were originally filed against RHOSP 17.1 but are still listed in the RHOSO 18.0 dynamic routing documentation:
Floating IP port forwarding: Port forwarding with floating IPs fails when BGP dynamic routing is enabled (BZ 2160481)
Multicast routing: Multicast routing is not supported with BGP dynamic routing (BZ 2163477, CLOSED WONTFIX)
DNS service (designate): Unsupported in dynamic routing environments; the designate-worker pods cannot configure the BIND backend
Performance Tuning¶
ECMP Configuration
router bgp 64999
maximum-paths 8
maximum-paths ibgp 8
bestpath as-path multipath-relax
BGP Timers Optimization
router bgp 64999
neighbor 172.30.1.254 timers 10 30
neighbor 172.30.1.254 capability extended-nexthop