15.6 C
Amsterdam

How To Install Open vSwitch on CentOS 8 | RHEL 8

In this tutorial you’ll cover the installation of Open vSwitch on CentOS 8/REHL 8. Follow the complete guide to learn that how to install Open vSwtich on CentOS 8. Before proceeding further let’s have a short introduction about the Open vSwitch.

Introduction:

Safety appliance might permit packets among some interfaces to be forwarded in layer 2 (referred to as transparent mode), and packets among some interfaces to be forwarded in layer three (referred to as routing mode), in particular depending on specific requirement. To facilitate a flexible configuration of hybrid mode of layer 2 and layer3, gadget introduces the concept of Virtual Switch (vswitch).

By default system ships with a vswitch called vswitch1. each time you create a vswitch, gadget will create a corresponding vswitch interface (vswitchIF) for the vswitch mechanically. You could bind an interface to a vswitch by binding that interface to a safety sector, and then binding the security zone to the vswitch.

A vSwitch acts as a layer 2 forwarding zone, and every vswitch has its personal independent MAC address, so the packets of various interfaces in a single vswitch might be forwarded in line with layer 2 forwarding rules. You can configure policy regulations without problems in a vswitch. A vswitchif virtually acts as a switch uplink interface, allowing packets forwarding among layer 2 and layer 3.

- Advertisement -

Some of the important features of Open vSwitch are given below:

  • 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
  • Multi-table forwarding pipeline with flow-caching engine
  • Forwarding layer abstraction to ease porting to new software and hardware platforms

Now, we’ll move towards the installation process.

Step 1: Install Open vSwitch on CentOS 8 / RHEL 8

Add OpenStack Repository to install the Open vSwtich on CentOS 8 / REHL 8. Type the below command in your terminal.

On CentOS 8:

sudo yum install -y epel-release
sudo yum install -y centos-release-openstack-train

On RHEL 8:

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

For those users having no Red Hat OpenStack subscription, can use RDO:

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

Finally hit the below command to install the Open vSwitch on CentOS 8 / REHL 8.

sudo yum install openvswitch libibverbs

Press “Y” when prompted.

CentOS 8:
[sabi@localhost ~]$ sudo yum install openvswitch libibverbs
[sudo] password for sabi:
Last metadata expiration check: 0:05:07 ago on Sat 08 Aug 2020 01:21:33 AM EDT.
Package libibverbs-26.0-8.el8.x86_64 is already installed.
Dependencies resolved.
Package Arch Version Repository Size
Installing:
openvswitch x86_64 2.12.0-1.1.el8 centos-openstack-train 2.0 M
Transaction Summary
Install 1 Package
Total download size: 2.0 M
Installed size: 5.7 M
Is this ok [y/N]: y
Downloading Packages:
openvswitch-2.12.0-1.1.el8.x86_64.rpm 264 kB/s | 2.0 MB 00:07
Total 238 kB/s | 2.0 MB 00:08
warning: /var/cache/dnf/centos-openstack-train-ceeb4cd59b18ee21/packages/openvswitch-2.12.0-1.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) security@centos.org"
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) security@centos.org"
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

Then start & enable the Open vSwitch services.

sudo systemctl enable --now openvswitch

Now, verify the status by hitting.

sudo systemctl status openvswitch

Output:

[sabi@localhost ~]$ sudo systemctl status openvswitch
[sudo] password for sabi:
● openvswitch.service - Open vSwitch
Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; enabled; vendor>
Active: active (exited) since Sat 2020-08-08 01:39:42 EDT; 17min ago
Process: 136991 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 136991 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 15464)
Memory: 0B
CGroup: /system.slice/openvswitch.service
Aug 08 01:39:42 localhost.localdomain systemd[1]: Starting Open vSwitch…
Aug 08 01:39:42 localhost.localdomain systemd[1]: Started Open vSwitch.
lines 1-11/11 (END)

And then type the below command to verify that if it is usable or not.

[sabi@localhost ~]$ sudo ovs-vsctl show
b42363e3-4690-4b2c-83fd-f2e6dc44031e
ovs_version: "2.12.0"

If you want to configure the Open vSwitch type the following command in your terminal to install os-net-config .

sudo yum install os-net-config

So, this is how you can install Open vSwitch on CentOS 8 / RHEL 8.

After it in the next tutorial we’ll cover the configuraiton of Open vSwitch on CentOS 8 / RHEL 8.

If you’ve any queries regarding this guide, feel free to ask in comment section. We’ll try to help you solve your problems ASAP!

- Advertisement -

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Donate to Osradar

Latest article