How To Install Open vSwitch on CentOS 8 | RHEL 8

Posted on 96 views

Open vSwitch is a multilayer software switch created to provide an open source, production quality switch platform that supports standard management interfaces and opens the forwarding functions to programmatic extension and control. Open vSwitch is widely used as a virtual switch in Virtual Machines environments such as OpenStack implementation. In this article we will install Open vSwitch on CentOS 8 | RHEL 8.

These are the core features provided by Open vSwitch.

  • Visibility into inter-VM communication via NetFlow, sFlow(R), IPFIX, SPAN, RSPAN, and GRE-tunneled mirrors
  • LACP (IEEE 802.1AX-2008)
  • Standard 802.1Q VLAN model with trunking
  • Multicast snooping
  • IETF Auto-Attach SPBM and rudimentary required LLDP support
  • BFD and 802.1ag link monitoring
  • STP (IEEE 802.1D-1998) and RSTP (IEEE 802.1D-2004)
  • Fine-grained QoS control
  • Support for HFSC qdisc
  • Per VM interface traffic policing
  • NIC bonding with source-MAC load balancing, active backup, and L4 hashing
  • OpenFlow protocol support (including many extensions for virtualization)
  • IPv6 support
  • Multiple tunneling protocols (GRE, VXLAN, STT, and Geneve, with IPsec support)
  • Remote configuration protocol with C and Python bindings
  • Kernel and user-space forwarding engine options
  • Multi-table forwarding pipeline with flow-caching engine
  • Forwarding layer abstraction to ease porting to new software and hardware platforms

Installation on Rocky / AlmaLinux 8:

Install Open vSwitch on CentOS 8/RHEL 8

We’re going to use OpenStack repository to pull Open vSwitch rpm packages.

Add OpenStack repository to CentOS Stream 8

sudo dnf install -y https://repos.fedorapeople.org/repos/openstack/openstack-yoga/rdo-release-yoga-1.el8.noarch.rpm

Add OpenStack repository to RHEL 8

For RHEL 8, you can use Red Hat OpenStack 16 repositories if you have active subscriptions:

sudo subscription-manager repos --enable=openstack-16-for-rhel-8-x86_64-rpms
sudo subscription-manager repos --enable=fast-datapath-for-rhel-8-x86_64-rpms
sudo subscription-manager repos --enable=rhel-8-server-optional-rpms

If you don’t have Red Hat OpenStack subscription, use RDO:

sudo subscription-manager repos --enable=rhel-8-server-optional-rpms
sudo sudo yum install https://rdoproject.org/repos/rdo-release.rpm

Install Open vSwitch on CentOS Stream 8 / RHEL 8

Then install Open vSwitch on CentOS 8 | RHEL 8:

sudo yum install openvswitch libibverbs

Accept installation prompts that comes your way.

Transaction Summary
======================================================================================================================================================================================================
Install  9 Packages

Total download size: 16 M
Installed size: 48 M
Is this ok [y/N]: y

Once the packages are installed you can disable repositories used:

sudo dnf config-manager --set-disabled centos-rabbitmq-38 ceph-pacific openstack-yoga centos-nfv-openvswitch

Start and enable openvswitch service:

sudo systemctl enable --now openvswitch

Confirm service status:

$ systemctl status openvswitch
● openvswitch.service - Open vSwitch
   Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; enabled; vendor preset: disabled)
   Active: active (exited) since Fri 2020-06-05 23:24:15 CEST; 24s ago
  Process: 9704 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 9704 (code=exited, status=0/SUCCESS)

Jun 05 23:24:15 centos.computingpost.com systemd[1]: Starting Open vSwitch...
Jun 05 23:24:15 centos.computingpost.com systemd[1]: Started Open vSwitch.

Check if ovs-vsctl command is usable.

$ sudo ovs-vsctl show
2b6b3af2-7d50-4156-a4f6-c86b8f45f2ad
    ovs_version: "2.15.6"

Optionally install os-net-config if you plan on configuring Open vSwitch with it.

sudo yum install os-net-config

Updating Open vSwitch

To update the packages first enable disabled repositories:

sudo dnf config-manager --set-enabled centos-rabbitmq-38 ceph-pacific openstack-yoga centos-nfv-openvswitch
sudo dnf update openvswitch libibverbs

Configure and use Open vSwitch

The next article below covers configurations of Open vSwitch bridges and network interfaces for use in your actual virtualization environments such as KVM.

coffee

Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.