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
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 8
sudo yum install -y epel-release
sudo yum install -y centos-release-openstack-train
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
Then install Open vSwitch on CentOS 8 | RHEL 8:
sudo yum install openvswitch libibverbs
Accept installation:
CentOS 8:
CentOS-8 - RabbitMQ 38 234 kB/s | 80 kB 00:00
CentOS- 8 - OpenStack train 3.1 MB/s | 2.0 MB 00:00
CentOS-8 - Advanced Virtualization 330 kB/s | 72 kB 00:00
CentOS-8 - Ceph Nautilus 614 kB/s | 180 kB 00:00
Dependencies resolved.
========================================================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================================================
Installing:
openvswitch x86_64 2.12.0-1.el8 centos-openstack-train 2.0 M
Installing dependencies:
dpdk x86_64 18.11.2-3.el8 AppStream 1.8 M
Transaction Summary
========================================================================================================================================================
Install 2 Packages
Total download size: 3.8 M
Installed size: 14 M
Is this ok [y/N]: y
....
Total 3.3 MB/s | 3.8 MB 00:01
warning: /var/cache/dnf/centos-openstack-train-ceeb4cd59b18ee21/packages/openvswitch-2.12.0-1.el8.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 764429e6: NOKEY
CentOS- 8 - OpenStack train 1.0 MB/s | 1.0 kB 00:00
Importing GPG key 0x764429E6:
Userid : "CentOS Cloud SIG (http://wiki.centos.org/SpecialInterestGroup/Cloud) <[email protected]>"
Fingerprint: 736A F511 6D9C 40E2 AF6B 074B F9B9 FEE7 7644 29E6
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
Is this ok [y/N]: y
RHEL 8:
Updating Subscription Management repositories.
RDO CentOS-7 - QEMU EV 208 kB/s | 18 kB 00:00
OpenStack Train Repository 23 MB/s | 3.9 MB 00:00
Dependencies resolved.
========================================================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================================================
Installing:
openvswitch x86_64 1:2.12.0-1.el7 openstack-train 2.0 M
Installing dependencies:
compat-openssl10 x86_64 1:1.0.2o-3.el8 rhel-8-for-x86_64-appstream-rpms 1.1 M
dpdk x86_64 18.11.2-3.el8 rhel-8-for-x86_64-appstream-rpms 1.8 M
make x86_64 1:4.2.1-10.el8 rhel-8-for-x86_64-baseos-rpms 498 k
python2 x86_64 2.7.17-1.module el8.2.0 4561 f4e0d66a rhel-8-for-x86_64-appstream-rpms 108 k
python2-libs x86_64 2.7.17-1.module el8.2.0 4561 f4e0d66a rhel-8-for-x86_64-appstream-rpms 6.0 M
python2-pip-wheel noarch 9.0.3-16.module el8.2.0 5478 b505947e rhel-8-for-x86_64-appstream-rpms 1.2 M
python2-setuptools-wheel noarch 39.0.1-11.module el8.1.0 3446 c3d52da3 rhel-8-for-x86_64-appstream-rpms 289 k
Installing weak dependencies:
python2-pip noarch 9.0.3-16.module el8.2.0 5478 b505947e rhel-8-for-x86_64-appstream-rpms 1.9 M
python2-setuptools noarch 39.0.1-11.module el8.1.0 3446 c3d52da3 rhel-8-for-x86_64-appstream-rpms 643 k
Enabling module streams:
python27 2.7
Transaction Summary
========================================================================================================================================================
Install 10 Packages
Total download size: 15 M
Installed size: 54 M
Is this ok [y/N]: y
...
1.0 MB/s | 1.0 kB 00:00
Importing GPG key 0x764429E6:
Userid : "CentOS Cloud SIG (http://wiki.centos.org/SpecialInterestGroup/Cloud) <[email protected]>"
Fingerprint: 736A F511 6D9C 40E2 AF6B 074B F9B9 FEE7 7644 29E6
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
Is this ok [y/N]: y
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.computingforgeeks.com systemd[1]: Starting Open vSwitch...
Jun 05 23:24:15 centos.computingforgeeks.com systemd[1]: Started Open vSwitch.
Check if ovs-vsctl command is usable.
# ovs-vsctl show
fc82c4af-4f2c-433d-a442-d260304da97c
ovs_version: "2.12.0"
Optionally install os-net-config if you plan on configuring Open vSwitch with it.
sudo yum install os-net-config
Our next articles will cover configurations of Open vSwitch bridges and network interfaces for use in your actual virtualization environments such as KVM.
Other articles to checkout:
Run CentOS 8 VM using Vagrant on KVM / VirtualBox / VMWare / Parallels