Basic Configuration in OVS Mode
This section describes the basic configuration of PicOS switches in OVS (Open vSwitch) mode.
Once users have /wiki/spaces/PicOS44sp/pages/4293502 and have /wiki/spaces/PicOS44sp/pages/4293634, 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 /wiki/spaces/PicOS44sp/pages/4293634. An alternative to using the configuration script is to manually edit the /wiki/spaces/PicOS44sp/pages/4293741.
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: /wiki/spaces/PicOS44sp/pages/4295677 are used to control the ovsdb-server to create bridges, add interfaces, and configure interfaces.
- ovs-appctl Commands: /wiki/spaces/PicOS44sp/pages/4295789 are used to control the ovs-vswitchd.
- ovs-ofctl Commands: /wiki/spaces/PicOS44sp/pages/4295766 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) NAME ovs-ofctl - administer OpenFlow switches SYNOPSIS ovs-ofctl [options] command [switch] [args...] DESCRIPTION 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 supported: <Some output omitted>
Copyright © 2024 Pica8 Inc. All Rights Reserved.