Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

This section describes the basic configuration of PicOS switches in OVS (Open vSwitch) mode.

Once users have access to the switch and have PicOS running in OVS mode, users need to configure the IP address and default gateway.

To configure the management IP address, users should use the picos_boot configuration script as described in PICOS Mode SelectionAn alternative to using the configuration script is to manually edit the PicOS configuration file.

For accessing the switch through a user interface, instead of the management interface, some OpenFlow flows need to be configured to redirect management traffic to the control plane. This is needed only if the switch cannot be managed through the management interface.

For example, users need to add the following flows to access the switch inband. The bridge br0 has the MAC address c8:0a:a9:04:49:19.

root@PicOS-OVS#ovs-ofctl add-flow br0 priority=65300,in_port=local,dl_src=c8:0a:a9:04:49:19,actions=all
root@PicOS-OVS#ovs-ofctl add-flow br0 priority=65300,dl_dst=c8:0a:a9:04:49:19,actions=local
root@PicOS-OVS#ovs-ofctl add-flow br0 priority=65300,dl_dst=FF:FF:FF:FF:FF:FF,actions=all,local

Understanding OVS Components

The OVS as several components:

  • ovsdb-server: A lightweight database server that provides switch level information (for example, information about switch ports).
  • ovs-vswitchd: It is the core system component, which stores OpenFlow rules and performs flow based switching along with a companion Linux kernel module.
  • openvswitch_mod.ko: It is a Linux kernel module doing most of the flow-based switching in PicOS OVS mode. This module is not loaded in the PicOS accelerated OVS, and is replaced by the ASIC (application-specific integrated circuit) for packet forwarding. 
  • CLI: The CLI (command-line interface) is used to control and manipulate other OVS components.

Understanding OVS CLI

The following three commands are used to control and monitor OVS:

  • ovs-vsctl Commands: ovs-vsctl commands are used to control the ovsdb-server to create bridges, add interfaces, and configure interfaces.
  • ovs-appctl Commands: ovs-appctl commands are used to control the ovs-vswitchd.
  • ovs-ofctl Commands: ovs-ofctl commands are used to send OpenFlow queries. This can be used to manipulate the flows in ovs-vswitchd.

Each of those commands have a main page that can be viewed from the Linux shell on users' PicOS switch.

admin@Leaf1$man ovs-ofctl
ovs-ofctl(8)                  Open vSwitch Manual                 ovs-ofctl(8)
       ovs-ofctl - administer OpenFlow switches
       ovs-ofctl [options] command [switch] [args...]
       The  ovs-ofctl program is a command line tool for monitoring and admin-
       istering OpenFlow switches.  It can also show the current state  of  an
       OpenFlow  switch, including features, configuration, and table entries.
       It should work with any OpenFlow switch, not just Open vSwitch.
   OpenFlow Switch Management Commands
       These commands allow ovs-ofctl to monitor and  administer  an  OpenFlow
       switch.   It  is  able to show the current state of a switch, including
       features, configuration, and table entries.
       Most of these commands take an argument that specifies the  method  for
       connecting to an OpenFlow switch.  The following connection methods are
<Some output omitted>
  • No labels