Home Linux & Systems Cybersecurity Cloud & DevOps Networks & Infrastructure SIEM & Monitoring DFIR & Threat Intel Development & Other All categories Projects About Tools

Install and configure Open vSwitch

Leer en espanol
Install and configure Open vSwitch

Table of contents

Open vSwitch, abbreviated OVS, is open source software, designed to be used as a virtual switch in virtualized server environments. He is in charge of reen ===

What is Open vSwitch?

Open vSwitch, abbreviated OVS, is open source software, designed to be used as a virtual switch in virtualized server environments. It is responsible for forwarding traffic between different virtual machines (VMs) on the same physical host and also forwarding traffic between virtual machines and the physical network.

We install dependencies:

Bash
apt-get install build-essential module-assistant  linux-headers-`uname -r` fakeroot gcc

 We install Open vSwitch

From repositories:

Bash
apt-get install openvswitch-common openvswitch-switch

We configure the database.

text
ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema

From source

We download, unzip and access the folder.

Bash
wget http://openvswitch.org/releases/openvswitch-2.3.1.tar.gz

tar xvf openvswitch-2.3.1.tar.gz

cd openvswitch-2.3.1

We install Open vSwitch

Bash
./boot.sh

./configure –prefix=/usr –with-linux=/lib/modules/`uname -r`/build

make && make install

make modules_install

depmod -a

mkdir -p /usr/local/etc/openvswitch

We configure the database.

text
ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema

ovsdb-server -v –remote=punix:/usr/local/var/run/openvswitch/db.sock \

–remote=db:Open_vSwitch,Open_vSwitch,manager_options \

–private-key=db:Open_vSwitch,SSL,private_key \

–certificate=db:Open_vSwitch,SSL,certificate \

–pidfile –detach –log-file

We start the service

Bash
root@docker:~# /etc/init.d/openvswitch-switch start

Starting ovsdb-server.

Configuring Open vSwitch system IDs.

Starting ovs-vswitchd.

Enabling remote OVSDB managers.

We create a bridge interface br0

text
ovs-vsctl add-br br0

We incorporate an ethernet port.

text
ovs-vsctl add-port br0 eth0

We configure the br0 interface

text
auto br0

allow-ovs br0

iface br0 inet static

address 192.168.1.80

netmask 255.255.255.0

gateway 192.168.1.1

# bridge info

ovs_type OVSBridge

ovs_ports eth0

bridge-ports eth0

bridge-maxwait 1

Regards, rokitoh

:wq!

Comments