Tuesday, December 8, 2015

Openvswitch - Overview

In this Openvswitch series, I will talk about mostly configuring openvswitch for different use cases. This is as much a tutorial as a personal reference for me. Today we will go through the openvswitch main components.

Before reading, first go to http://openvswitch.org/ . This is the official site, though not too many resources to get in-depth knowledge about openvswitch, it will be a good start.

As we know, Openvswitch( Called OVS from now) is a software switch or you can say a virtual switch. We will not go into Why OVS and where exactly it fits into the modern networking needs. Focus of this series will be to understand openvswitch configuration or to act as config reference.

To this end, first lets begin with going over various components of openvswitch. There are many resources on net about how to Install and Run openvswitch. Please go through them first.


Openvswitch Components

Openvswitch is compromised of three main components. i.e ovsdb-server, ovs-vswitchd and openvswitch kernel module. Lets look at each of these in brief

ovsdb-server -- maintain openvswitch configuration tables and configuration is preserved across restarts.

ovs-vswitchd -- This is the main deamon controlling all instances of OVS switches in the host. On startup, loads the configuration from ovsdb-server by connecting to it. Connection can be over a network or in same host. This is also the brain of openvswitch. Vswitchd stores the flow configuration received from the controller, acts on packet received from datapath and configures flows into the datapath.

openvswitch.ko -- This is the datapath of openvswitch. caches flows configured from ovs-vswitchd. processes packets based on flows and incase of flow miss, forwards the packets to the vswitchd. Note: this module is not valid when dpdk-netdev or userspace netdev is used. we will talk about this at some in future.


Openvswitch utilities

As with any other network component, Openvswitch comes with a set of utilities used to configure and manage openvswitch. we will go through them in brief

ovs-vsctl -- Main utility to do configuration changes in ovsdb-server. Any changes in ovsdb-server are synced to ovs-vswitchd

ovs-ofctl -- Utility to send openflow commands to the vswitchd.

ovs-appctl -- This utility can control or query both ovsdb-server or ovs-vswitchd

ovs-dpctl -- This ultility can create,modify,delete or query openvswitch datapaths. Note: this wont work when datapath is dpdk-netdev or userspace netdev


Next in this series we will look at various constructs of openvswitch and configuring them.

No comments:

Post a Comment