OVS/linuxbridge 驱动 (bagpipe)¶
介绍¶
适用于 BGPVPN 服务插件的 BaGPipe 驱动程序设计用于与 openvswitch 和 linuxbridge ML2 机制驱动程序协同工作。
它依赖于在计算节点上使用 bagpipe-bgp BGP VPN 实现,以及在 OpenVSwitch 和/或 linuxbridge 中的 MPLS 实现。
架构概述¶
BGPVPN 服务插件的 bagpipe 驱动程序与每个计算节点上的 Neutron agent 交互,该 agent 扩展了对新的 RPC 的支持,以触发计算节点上 BGP VPN 实例及其 MPLS 数据平面的本地配置。
OpenVSwitch 机制驱动程序和 agent 的示例
限制¶
在 DHCP 端口、路由器接口端口、外部网络端口等¶
对于 DHCP 端口或路由器接口端口,或其他网络特定端口,将不会建立与 BGP VPN 的连接。 这通过避免它们导入/导出大量路由来降低网络节点的负载,而不会限制 BGP VPN 部署场景,因为与关联到 BGP VPN 的网络的路由器或 DHCP 接口之间不会交换有用的流量。
类似地,驱动程序不会绑定到外部网络上的端口。 一旦明确了用例,将重新评估此行为。
bagpipe_v2 驱动程序¶
对于 Queens 版本,此驱动程序用于 RPC 的机制已更改。
v1 驱动程序 networking_bgpvpn.neutron.services.service_drivers.bagpipe.bagpipe.BaGPipeBGPVPNDriver 与 Queens 之前的 neutron agent 具有向后兼容性,可以在滚动升级期间使用,例如从 Pike 到 Queens。
v2 驱动程序 networking_bgpvpn.neutron.services.service_drivers.bagpipe.bagpipe_v2.BaGPipeBGPVPNDriver 不再生成旧的 RPC,并且可以使用
在全新部署中
在升级后
在非滚动升级期间(一些 BGPVPN 操作在仍然运行 Queens 之前的 agent 的时间里会被中断)
未来的开发可能只在 v2 驱动程序上进行,并且 v1 驱动程序最终将被放弃。
如何使用?¶
使用此驱动程序的步骤通常是
在控制节点和计算节点上安装 networking-bagpipe 包
在控制节点上,配置 neutron 以使用 bagpipe 驱动程序
在计算节点上,配置 neutron agent 以使用 bagpipe_bgpvpn 扩展,并配置 bagpipe-bgp
当然,通常情况下,所有这些都由自动化的 Openstack 安装程序处理。
在 devstack 中¶
遵循 README.rst 中的说明
local.conf:添加以下内容以启用 BGPVPN 服务插件的 BaGPipe 驱动程序
NETWORKING_BGPVPN_DRIVER="BGPVPN:BaGPipe:networking_bgpvpn.neutron.services.service_drivers.bagpipe.bagpipe_v2.BaGPipeBGPVPNDriver:default"
启用 networking-bagpipe,其中包含 agent 扩展的代码
enable_plugin networking-bagpipe https://opendev.org/openstack/networking-bagpipe.git # enable_plugin networking-bagpipe https://opendev.org/openstack/networking-bagpipe.git stable/pike # enable_plugin networking-bagpipe https://opendev.org/openstack/networking-bagpipe.git stable/queens
在控制节点上,如果您想在那里运行 Fake Route-Reflector(仅适用于多节点设置)
enable_service b-fakerr
在计算节点上
计算节点 Neutron agent 是 Neutron openvswitch 或 linuxbridge agent,带有
bagpipe_bgpvpnagent 扩展安装 networking-bagpipe(与
bagpipe-bgp交互的代码来自那里)enable_plugin networking-bagpipe https://opendev.org/openstack/networking-bagpipe.git # enable_plugin networking-bagpipe https://opendev.org/openstack/networking-bagpipe.git stable/queens # enable_plugin networking-bagpipe https://opendev.org/openstack/networking-bagpipe.git stable/pike
devstack 插件会自动将
bagpipe_bgpvpnagent 扩展添加到 agent 配置中
bagpipe-bgp 将自动安装(自 Pike 以来的 networking-bagpipe 的一部分,或者之前作为子模块)
您需要启用并配置 bagpipe-bgp,通常与 BGP Route-Reflector 或 BGP 路由器(s) 建立对等关系
enable_service b-bgp BAGPIPE_DATAPLANE_DRIVER_IPVPN=ovs BAGPIPE_DATAPLANE_DRIVER_EVPN=ovs # IP of your route-reflector or BGP router, or fakeRR # BAGPIPE_BGP_PEERS defaults to $SERVICE_HOST, which will point to the controller in a # multi-node devstack setup #BAGPIPE_BGP_PEERS=1.2.3.4,2.3.4.5