After completing this section, you should be able to describe software defined networking, Open Virtual Networking switch architecture, and table-driven flow concepts.
OVN is an open source project, launched by the Open vSwitch team. The idea was to create a vendor neutral protocol for the virtualization of virtual switching. It provides layer 2 and layer 3 networking, where other Software-defined Network (SDN) solutions commonly provide only layer 2 or layer 3. OVN allows for the implementation of security groups, and includes a DHCP service, layer 3 routing, and NAT. In Red Hat OpenStack, OVN exclusively uses the GENEVE tunnel overlay network.
The OVN metadata agent spawns the HAProxy instances. These instances manage the OVS interfaces, network namespaces and HAProxy processes.
The OVN database is installed in a central location. It can be installed on a physical node, a virtual node, or on a cluster. The choice of location depends on various factors, including the size of the cloud infrastructure, the geographic dispersion of the cloud, the volume of traffic, and the performance required. The hypervisors must run Open vSwitch for OVN to work.
The OVN Southbound database is the center of the entire system. It also has two clients, the ovn-northd and the ovn-controller services. Each hypervisor has its own ovn-controller. The database contains three types of data:
Physical Network tables specifying how to reach the overcloud nodes
Logical Network tables specifying the logical data path flows
Binding tables linking the location of logical network components to the physical network
The Physical Network tables and Binding tables are populated by the hypervisors. The Logical Network tables are populated by ovn-northd.
The OVN Gateway links the overlay network, managed by ovn-northd, to the physical network. There are two ways to link the overlay and physical networks: a layer 2 bridge from an OVN logical switch into a VLAN, or a layer 3 connection between an OVN router and the physical network.
OVN implements DHCPv4 support, which removes the need for a DHCP agent. Virtual networks no longer require a DHCP namespace or a dnsmasq process. DHCPv4 options are configured on each compute node running ovn-controller. This means that DHCP support is fully distributed. DHCP requests from the instances are also handled by ovn-controller. The database creates a new entry when a subnet is created. The ovn-northd service adds the logical flows for each logical port where DHCP options are defined.
In previous OpenStack versions, security groups were implemented by OVS and ML2 using iptables. The iptables rules could only be applied using a Linux bridge, and were connected into the kernel using a tap device. The Linux bridge connected to the OVS bridge using a veth pair. These extra layers were unnecessarily complex. Instead, OVN uses the conntrack module to implement security groups. When an instance is created, logical flows are automatically created for each rule in the security group. Those rules are stored on each compute node.
OpenFlow is a network protocol designed to manage and direct traffic among routers and switches, both virtual and physical. Devices wanting to communicate to the SDN Controllers must support the OpenFlow protocol.
OVN is managed with the OpenFlow protocol. The OpenFlow protocol is used to program an Open vSwitch pipeline, and defines how traffic should be handled. A series of flow tables exist, where each flow has a priority, a match, and a set of actions. The flow with the highest priority is executed first. OpenFlow is capable of dynamically rewriting flow tables, allowing it to add and remove network functions as required.
OVN Logical Flows are a representation of the system's configuration. Manually programming OpenFlow pipelines, or flows, would be virtually impossible to manage. OVN's SDN controller creates flows automatically across all switches and network components.
As mentioned, OVN uses logical flows for all communication. In the past, a qdhcp namespace running dnsmasq provided the DHCP service. This is now provided by OpenFlow and the ovn-controller daemon. The service is distributed across compute nodes. The OVN flows are stored in OVN tables on br-int.
All networks are managed using OpenFlow logical flows. OVN provides a private IP address for each instance created. This is true for networks using DHCP and networks created with an allocation pool. OVN does not distinguish between the two; it creates the necessary flows and stores them in the OVN tables.
A newly designed metadata server uses one HAProxy instance for each tenant provider network resulting in multiple metadata instances with namespaces. This is true only for networks where there are instances deployed. If a network has no instances, or the instances have been removed, the metadata instance will not exist. Unlike other services implemented in OVN, HAProxy is a service daemon and therefore requires namespaces for network isolation.
OVN logical flows are created and removed automatically each time the infrastructure changes. This is one of the primary benefits of OVN. For example, when a router is created all flows pertaining to that network element are created and stored in the OVN tables on the required bridges on each required node. If that router is removed all flows pertaining to that router are removed from all OVN tables on all nodes.
Further information is available in the Networking with Open Virtual Network for Red Hat OpenStack Platform at https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.0/html-single/networking_guide/index/