Introduction to Open vSwitch

Open vSwitch, sometimes abbreviated as OVS, is an open-source multilayer virtual switch. Open vSwitch can operate both as a soft switch running within the hypervisor and as the control stack for switching silicon. Learn more about Open vSwitch here.

Open vSwitch is already included in the Pica8 PicOS software and runs as a process in PicOS.

The Open vSwitch version available on a PicOS switch can be determined using the ovs-appctl version command from the Linux shell.

admin@Switch$ovs-appctl version
ovs-vswitchd (Open vSwitch) 2.3.0
Compiled May 24 2015 21:37:14

Open vSwitch Components

The main components of Open vSwitch are:

  1. Kernel Module
  2. Open vSwitch Database
  3. Open vSwitch Daemon

Kernel Module

Kernel modules are pieces of code that can be loaded and unloaded into the kernel on demand. They extend the functionality of the kernel without having to reboot the system. Without modules, new functionality would have to be added directly into the kernel image, resulting in monolithic, larger kernels. 

The kernel module handles switching and tunneling. It is designed to be fast and simple. When a packet is received and a match is found, associated actions are executed and counters are updated. Otherwise, packets are sent to userspace.

To manage the kernel module, use the ovs-dpctl command-line tool.

Open vSwitch Database

The Open vSwitch Database (OVSDB) holds switch configuration including bridge, interface, and tunnel definitions. The OVSDB and OpenFlow controller addresses are also held by the OVSDB. The OVSDB, and hence switch configuration, is stored on persistent storage and survives a reboot.

The ovsdb-server communicates with ovs-vswitchd and the controller using the OVSDB management protocol, defined in RFC 7047.

To manage ovsdb-server, use the ovsdb-tool and ovs-vsctl command-line tools.

Open vSwitch Daemon

The Open vSwitch daemon (ovs-vswitchd) is the core component of an Open vSwitch incarnation. It communicates with the controller using OpenFlow. It communicates with the Open vSwitch Database Server (ovsdb-server) using the Open vSwitch Database (OVSDB) management protocol, defined in RFC 7047. The ovs-vswitchd communicates with the kernel module over netlink - a Linux kernel interface used for communication between userspace processes and the kernel.

The ovs-vswitchd supports multiple independent data paths, known as bridges.

To manage ovs-vswtichd, use the ovs-ofctl and ovs-appctl command-line tools.

Copyright © 2024 Pica8 Inc. All Rights Reserved.