<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>how to 2020 Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/how-to-2020/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Fri, 14 Aug 2020 16:01:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.13</generator>
	<item>
		<title>Configuring Open vSwitch on CentOS &#124; RHEL &#124; Fedora</title>
		<link>https://www.osradar.com/configuring-open-vswitch-on-centos-rhel-fedora/</link>
					<comments>https://www.osradar.com/configuring-open-vswitch-on-centos-rhel-fedora/#respond</comments>
		
		<dc:creator><![CDATA[sabi]]></dc:creator>
		<pubDate>Mon, 17 Aug 2020 08:00:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos 8 how to tutorials]]></category>
		<category><![CDATA[configure vswitch]]></category>
		<category><![CDATA[Configuring Open vSwitch on CentOS | RHEL | Fedora]]></category>
		<category><![CDATA[guide to vswtich]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[how to 2020]]></category>
		<category><![CDATA[vswitch installation on centos 8]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=20893</guid>

					<description><![CDATA[<p>Today we are going to learn that how to configure Open vSwitch on CentOS/RHEL. In our previous lecture you&#8217;ve learned that how to install Open vSwitch on CentOS/RHEL. If you missed the previous article simply click the below link to read it first for the installation of Open vSwitch on CentOS/RHEL. How To Install Open [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/configuring-open-vswitch-on-centos-rhel-fedora/">Configuring Open vSwitch on CentOS | RHEL | Fedora</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Today we are going to learn that <a href="https://www.osradar.com/?p=20893" target="_blank" aria-label="undefined (opens in a new tab)" rel="noreferrer noopener">how to configure Open vSwitch on CentOS/RHEL</a>. In our previous lecture you&#8217;ve learned that how to install Open vSwitch on CentOS/RHEL. If you missed the previous article simply click the below link to read it first for the installation of Open vSwitch on CentOS/RHEL.</p>



<p><a href="https://www.osradar.com/?p=20895" target="_blank" aria-label="undefined (opens in a new tab)" rel="noreferrer noopener">How To Install Open vSwitch on CentOS 8 | RHEL 8</a></p>



<p>Here we&#8217;ll use the os-net-confi script for the configuration of Open vSwtich on CentOS/RHEL. So, follow the below steps to configure the Open vSwitch on your system.</p>



<h3><strong>Step 1: Install os-net-config Tool</strong></h3>



<p>To configure the Open vSwitch we need os-net-config tool as it will help us to perform configuration steps more easily. It provides the configuration of host networking using YAML or JSON files format.</p>



<p>By default, os-net-config use the YAML file that can be located under <strong>/etc/os-net-config/config.yaml</strong>. You can also customize this by &#8211;config-file(-c) CLI option.</p>



<h4><strong>Installing os-net-config by using OpenStack Repository</strong></h4>



<p>Hit the following command to install the os-net-config tool using OpenStack repository if you&#8217;ve already configured it.</p>



<pre class="wp-block-verse">sudo yum install os-net-config</pre>



<p>Find out more details about the package by typing</p>



<pre class="wp-block-verse">[sabi@localhost ~]$ <strong>rpm -qi os-net-config</strong>
Name : os-net-config
Version : 11.3.1
Release : 1.el8
Architecture: noarch
Install Date: Sat 08 Aug 2020 02:20:02 AM EDT
Group : Unspecified
Size : 3760703
License : ASL 2.0
Signature : RSA/SHA1, Sun 19 Apr 2020 12:34:05 PM EDT, Key ID f9b9fee7764429e6
Source RPM : os-net-config-11.3.1-1.el8.src.rpm
Build Date : Fri 28 Feb 2020 08:55:33 AM EST
Build Host : c1be.rdu2.centos.org
Relocations : (not relocatable)
Packager : CBS <a href="mailto:cbs@centos.org">cbs@centos.org</a>
Vendor : CentOS
URL : http://pypi.python.org/pypi/os-net-config
Summary : Host network configuration tool
Description :
Host network configuration tool for OpenStack.</pre>



<h4><strong>Installing os-net-config with the help of Pip</strong></h4>



<p>You can also install the os-net-config tool using pip or pip3 as it is distributed as python package.</p>



<h5><strong>CentOS 8</strong>:</h5>



<pre class="wp-block-verse">sudo dnf install python3-pip</pre>



<h5><strong>CentOS 7:</strong></h5>



<pre class="wp-block-verse">sudo yum install -y epel-release<br>sudo yum -y install python-pip<br>sudo pip install os-net-config</pre>



<p>Make sure to verify the PATH once the installation finished.</p>



<pre class="wp-block-verse">[sabi@localhost ~]$ <strong>which os-net-config</strong>
/usr/bin/os-net-config</pre>



<h3><strong>Step 2: Configuring Open vSwitch by using os-net-config</strong></h3>



<p>Let&#8217;s dive into the configuration of Open vSwitch by using os-net-config tool as we&#8217;ve already installed the Open vSwitch and the configuration tool.</p>



<p>Here we&#8217;ll see some example to understand that how we can configure.</p>



<h4><strong>Single Interface Configuration with Static IP Address</strong></h4>



<p>First create a YAML file to save configuration.</p>



<pre class="wp-block-verse">sudo nano ovs-interface.yml</pre>



<p>And then configure as shown below:</p>



<pre class="wp-block-verse">network_config:
- type: interface
 name: eth1
 use_dhcp: false
 use_dhcpv6: false
 addresses:
- ip_netmask: 172.11.101.10/24
routes:
- ip_netmask: 0.0.0.0/0
next_hop: 172.11.101.254
default: true</pre>



<h5><strong>Result:</strong></h5>



<p>It&#8217;ll configure the eth1 interface along with the static IP address as 172.11.101/24 and the gateway is 172.11.101.254.</p>



<p>Run the given command to apply the configuration changes.</p>



<pre class="wp-block-verse">sudo os-net-config -c ovs-interface.yml</pre>



<h4><strong>Configure OVS bridge With Single Attached Interface (Port)</strong></h4>



<p>First create the file for configuration and then do the changes as given below:</p>



<pre class="wp-block-verse">sudo nano ovs-bridge-single-interface.yml</pre>



<p>It&#8217;ll look like this:</p>



<pre class="wp-block-verse">network_config:
- type: ovs_bridge
 name: br-ex 
use_dhcp: false 
use_dhcpv6: false 
addresses:
 - ip_netmask: 172.11.101.10/24
routes:
- ip_netmask: 0.0.0.0/0
next_hop: 172.11.101.254
default: true
members:
-
type: interface
name: eth1</pre>



<p>Finally apply the configuration.</p>



<pre class="wp-block-verse">os-net-config -c ovs-bridge-single-interface.yml</pre>



<h4><strong>Configure OVS Bridge on OVS Bond</strong></h4>



<p>Follow the below configuration for OVS bridge.</p>



<pre class="wp-block-verse">network_config:
- type: 
ovs_bridge 
name: br-ex 
use_dhcp: true 
members: 
- type: ovs_bond 
name: bond1 
members: 
- type: interface
name: em1
- type: interface
name: em2</pre>



<p>Apply the changes in a file as done in above step.</p>



<h4><strong>Configure Tagged VLAN Interface On Top of OVS Bridge</strong></h4>



<p>Here&#8217;s the configuration sample.</p>



<pre class="wp-block-verse">network_config:
- type: ovs_bridge 
name: br-ctlplane
 use_dhcp: true 
members: 
- type: interface
name: em1
- type: vlan 
vlan_id: 20 
addresses:
- ip_netmask: 192.0.2.1/24</pre>



<h4><strong>Creating an OVS Bond</strong></h4>



<p>You can create OVS bond by doing the changes as given below:</p>



<pre class="wp-block-verse">network_config:
- type: ovs_bridge
 name: bond1 
use_dhcp: true
 members: 
- type: interface
name: eno1
- type: interface
name: eno2</pre>



<h4><strong>Checking OVS Configuration</strong></h4>



<p>Once the settings are applied, network config script will be added automatically to <strong>/etc/sysconfig/network-scripts/</strong> directory.</p>



<pre class="wp-block-verse">ls /etc/sysconfig/network-scripts/</pre>



<p>Verify the settings by hitting</p>



<pre class="wp-block-verse">ovs-vsctl show</pre>



<h3><strong>Step 3: Creating KVM Network with OVS</strong></h3>



<p>For users who are using Open vSwitch with KVM virutalization, need to define the network that Virtual Machine will use.</p>



<p>Create xml config file.</p>



<pre class="wp-block-verse">sudo nano kvm-ovs.xml</pre>



<p>Then add the bridge details in the file and save it.</p>



<pre class="wp-block-verse">&lt;network&gt;
&lt;name&gt;ovs-bridge &lt;/name&gt;
&lt;forward mode='bridge'/&gt;
&lt;bridge name='br-ex'/&gt;
&lt;virtualport type='openvswitch'/&gt;
&lt;network/&gt;</pre>



<p><strong>Note:</strong></p>



<p><strong>ovs-bridge: </strong>Name of the libvirt network<br><strong>br-ex: </strong>Name of OVS bridge</p>



<p>To define a network from the XML file, without starting it hit</p>



<pre class="wp-block-verse">sudo virsh net-define kvm-ovs.xml</pre>



<p>If you want to start the inactive network(previously defined) type</p>



<pre class="wp-block-verse">sudo virsh net-start ovs-bridge</pre>



<p>To start a network when service started, type the following command:</p>



<pre class="wp-block-verse">sudo virsh net-autostart ovs-bridge</pre>



<p>Verify that autostart flag is turned to yes.</p>



<pre class="wp-block-verse">sudo virsh net-list --all</pre>



<p>So, this is how you can configure the Open vSwitch on CentOS/RHEL.</p>



<p>Please share this post and join <a href="https://t.me/osradar" target="_blank" rel="noreferrer noopener">our Telegram Channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/configuring-open-vswitch-on-centos-rhel-fedora/">Configuring Open vSwitch on CentOS | RHEL | Fedora</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/configuring-open-vswitch-on-centos-rhel-fedora/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install Open vSwitch on CentOS 8 &#124; RHEL 8</title>
		<link>https://www.osradar.com/how-to-install-open-vswitch-on-centos-8-rhel-8/</link>
					<comments>https://www.osradar.com/how-to-install-open-vswitch-on-centos-8-rhel-8/#respond</comments>
		
		<dc:creator><![CDATA[sabi]]></dc:creator>
		<pubDate>Mon, 17 Aug 2020 06:15:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Centos 8]]></category>
		<category><![CDATA[how to 2020]]></category>
		<category><![CDATA[how to configure open vswitch]]></category>
		<category><![CDATA[How To Install Open vSwitch on CentOS 8 | RHEL 8]]></category>
		<category><![CDATA[how to tutorials]]></category>
		<category><![CDATA[Open vswitch installation]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=20895</guid>

					<description><![CDATA[<p>In this tutorial you&#8217;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&#8217;s have a short introduction about the Open vSwitch. Introduction: Safety appliance might permit packets among some interfaces to be forwarded in layer [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-open-vswitch-on-centos-8-rhel-8/">How To Install Open vSwitch on CentOS 8 | RHEL 8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this tutorial you&#8217;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&#8217;s have a short introduction about the Open vSwitch.</p>



<h3><strong>Introduction:</strong></h3>



<p>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). </p>



<p>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.</p>



<p>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.</p>



<p>Some of the important features of Open vSwitch are given below:</p>



<ul><li>Visibility into inter-VM communication via NetFlow, sFlow(R), IPFIX, SPAN, RSPAN, and GRE-tunneled mirrors</li><li>LACP (IEEE 802.1AX-2008)</li><li>Standard 802.1Q VLAN model with trunking</li><li>Multicast snooping</li><li>IETF Auto-Attach SPBM and rudimentary required LLDP support</li><li>BFD and 802.1ag link monitoring</li><li>STP (IEEE 802.1D-1998) and RSTP (IEEE 802.1D-2004)</li><li>Fine-grained QoS control</li><li>Support for HFSC qdisc</li><li>Multi-table forwarding pipeline with flow-caching engine</li><li>Forwarding layer abstraction to ease porting to new software and hardware platforms</li></ul>



<p>Now, we&#8217;ll move towards the installation process.</p>



<h3><strong>Step 1: Install Open vSwitch on CentOS 8 / RHEL 8</strong></h3>



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



<h4><strong>On CentOS 8:</strong></h4>



<pre class="wp-block-verse">sudo yum install -y epel-release<br>sudo yum install -y centos-release-openstack-train</pre>



<h4><strong>On RHEL 8</strong>:</h4>



<pre class="wp-block-verse">sudo subscription-manager repos --enable=openstack-16-for-rhel-8-x86_64-rpms<br>sudo subscription-manager repos --enable=fast-datapath-for-rhel-8-x86_64-rpms<br>sudo subscription-manager repos --enable=rhel-8-server-optional-rpms</pre>



<p>For those users having no Red Hat OpenStack subscription, can use RDO:</p>



<pre class="wp-block-verse">sudo subscription-manager repos --enable=rhel-8-server-optional-rpms<br>sudo sudo yum install https://rdoproject.org/repos/rdo-release.rpm</pre>



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



<pre class="wp-block-verse">sudo yum install openvswitch libibverbs</pre>



<p>Press<strong> &#8220;Y&#8221;</strong> when prompted.</p>



<h5><strong>CentOS 8:</strong></h5>



<pre class="wp-block-verse">[sabi@localhost ~]$<strong> sudo yum install openvswitch libibverbs</strong>
[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]: <strong>y</strong>
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) <a href="mailto:security@centos.org">security@centos.org</a>"
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]: <strong>y</strong></pre>



<h5><strong>RHEL 8:</strong></h5>



<pre class="wp-block-verse">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) <a href="mailto:security@centos.org">security@centos.org</a>"
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</pre>



<p>Then start &amp; enable the Open vSwitch services.</p>



<pre class="wp-block-verse">sudo systemctl enable --now openvswitch</pre>



<p>Now, verify the status by hitting.</p>



<pre class="wp-block-verse">sudo systemctl status openvswitch</pre>



<p><strong>Output:</strong></p>



<pre class="wp-block-verse">[sabi@localhost ~]$ sudo systemctl status openvswitch
[sudo] password for sabi:
● openvswitch.service - Open vSwitch
Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; enabled; vendor&gt;
Active:<strong> active (exited) </strong>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)</pre>



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



<pre class="wp-block-verse">[sabi@localhost ~]$ <strong>sudo ovs-vsctl show</strong>
b42363e3-4690-4b2c-83fd-f2e6dc44031e
ovs_version: "2.12.0"</pre>



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



<pre class="wp-block-verse">sudo yum install os-net-config</pre>



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



<p>After it in the next tutorial we&#8217;ll cover the <a href="https://www.osradar.com/?p=20893" target="_blank" rel="noreferrer noopener">configuraiton of Open vSwitch on CentOS 8 / RHEL 8</a>.</p>



<p>If you&#8217;ve any queries regarding this guide, feel free to ask in comment section. We&#8217;ll try to help you solve your problems ASAP!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-open-vswitch-on-centos-8-rhel-8/">How To Install Open vSwitch on CentOS 8 | RHEL 8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-open-vswitch-on-centos-8-rhel-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
