Skip to main content

Open vSwitch (OVS)

Here are the steps to get Open vSwitch loaded up.up from source (don't let that scare you, we are still going to use RPMs). 
There are other directions out there.  ThisNow, isthis will be one of them.

NOTE: I have included some cleanup actions and some manual dependency installs.  Just use what you need if not all of it.

# AddREMOVE CentOSOVS repoIF forINSTALL OpenWITH vSwitchDISTRO andPACKAGES
enablesystemctl itstop toopenvswitch autostart&& whensystemctl disable openvswitch
systemctl stop ovs-vswitchd && systemctl disable ovs-vswitchd
systemctl stop ovsdb-server boots&& systemctl disable ovsdb-server

dnf installremove openvswitch* *openvswitch -y

centos-release-nfv-rm -f /etc/sysconfig/openvswitch
dnf installrm -yfR openvswitch3.1/etc/openvswitch*
systemctlrm enable-fR openvswitch/var/run/openvswitch*
rm -fR /var/log/openvswitch*
# CLONE OVS SOURCE FROM GITHUB
cd /opt
git clone https://github.com/openvswitch/ovs.git

# EnableENABLE IPRoutingIPROUTING
cat > /etc/sysctl.d/iprouting.conf << "EOF"
net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter = 2
EOF

# Reboot server or manually activate routing and start openvswitch
sysctl --system
systemctl start openvswitch
# CheckCLEANED ifUP OLD PACKAGES, DNF CACHE, AND INSTALL DEPS
dnf autoremove
dnf clean all
dnf makecache

# REMOVED OLD KERNELS
dnf remove --oldinstallonly --setopt installonly_limit=2 kernel -y

# REINSTALLED LATEST KERNEL AND MODULES
dnf reinstall kernel kernel-core kernel-modules -y

# INSTALLED DEV TOOLS AND BUILD PACKAGES
dnf install @'Development Tools' dnf-plugins-core rpm-build make automake -y

# INSTALLED DEPS
dnf install python3-six python3-sphinx libunwind-devel unbound-devel \
libpfm-devel python3-libpfm libcap-ng libcap-ng-devel libpcap-devel \
bpf* libbpf* libnuma* numa*
# REBOOTED
reboot




NOTE:  If you want your RPM's to be compiled with DPDK, you will need to also go grab the databaseDPDK isversion good22.x source and build that as well.  Rocky 8.8 only has the 21.x packages available.  I opted to gonot ovs-vsctlcompile showit

in.
Open ShouldvSwitch lookwith something like this

image.png

Optional:DPDK

# DisableOVS IPv6CONFIGURE, catDEP CHECK AND RPM BUILD
cd /opt/ovs

./boot.sh
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc

sed -e 's/@VERSION@/3.2.90/' rhel/openvswitch-fedora.spec.in > /etc/sysctl.d/disable-ipv6-all.conftmp/ovs.spec
<<dnf builddep /tmp/ovs.spec
rm -f /tmp/ovs.spec

make rpm-fedora RPMBUILD_OPT="EOF"--with net.ipv6.conf.all.disable_ipv6check"

=ls 1-al net.ipv6.conf.default.disable_ipv6rpm/rpmbuild/RPMS/x86_64/
= 1 EOF
# DisableINSTALL IPv6OVS
Bridgecd catrpm/rpmbuild/RPMS/x86_64/

>dnf /etc/sysctl.d/disable-ipv6-bridge.confinstall <<\
"EOF"openvswitch-3.2.90-1.el8.x86_64.rpm net.bridge.bridge-nf-call-ip6tables=0\
net.bridge.bridge-nf-call-iptables=0network-scripts-openvswitch-3.2.90-1.el8.x86_64.rpm net.bridge.bridge-nf-call-arptables=0\
EOFopenvswitch-devel-3.2.90-1.el8.x86_64.rpm