Difference between ovs-vsctl and ovs-dpctl
If I configure a switch device to be managed via OpenFlow, what are the conditions for using ovs-dpctl versus ovs-vsctl ? The man page for ovs-dpctl says ovs-vsctl is used if ovs-vswitchd is used .
Under what circumstances would you use ovs-dpctl ? What does he do that you cannot do otherwise?
One follow up question is where the OF-datapath value comes from. This will be the 64-bit number in the OF specification that the OF controller uses to identify the OF switches. Is this value automatically calculated or do you need to enter it?
Thanks for any help with this.
source to share
ov-dpctl:
Tool for creating, modifying and deleting open vSwitch data paths. Here are some examples (the commands are random):
β ovs-dpctl add-dp dp1
β ovs-dpctl add-if dp1 eth0
β ovs-dpctl show
β ovs-dpctl dump-flows
ovs-vsctl:
A utility for querying and updating the ovs-vswitchd configuration (using the ovsdb server). Port configuration, bridge add / remove, VLAN binding and tagging are just some of the options available with this command.
Here are some examples (the commands are random):
β ovs-vsctl βV : Prints the current version of openvswitch.
β ovs-vsctl show : Prints a brief overview of the switch database configuration.
β ovs-vsctl list-br : Prints a list of configured bridges
β ovs-vsctl list-ports <bridge> : Prints a list of ports on a specific bridge.
β ovs-vsctl list interface : Prints a list of interfaces.
β ovs-vsctl add-br <bridge> : Creates a bridge in the switch database.
ovs-ofctl:
I think this tool is worth mentioning as well. Command line tool for monitoring and managing OpenFlow switches. It is used to display the implemented threads in the OVS kernel module.- ovs-ofctl add-flow <bridge> <flow>
- ovs-ofctl add-flow <bridge> <match-field> actions=all
- ovs-ofctl del-flows <bridge> <flow>
It seems to me to be ovs-vsctl
used to configure the most open source vswitch like setting up ports, bridges, etc. Although ovs-dpctl
used to work with datapaths and interfaces.
Sources:
Your second question -> OF datapath: To me, datapath in openflow context is an object that denotes a connection between a controller and a switch. I suppose the controller data is above but controller specific.
source to share
ovs-vsctl
is used to control openvswitch and ovs-dpctl
can be used to control datapaths in openvswitch.
A related comment explaining datapaths can be found at dpif-provider.h
:
A datapath is a collection of physical or virtual ports that are
exposed over OpenFlow as a single switch. Datapaths and the
collections of ports that they contain may be fixed or dynamic.
Openvswitch provides capabilities for different data implementations. The following diagram of the OVS manual shows how the various Datapaths fit into the OVS architecture.
_
| +-------------------+
| | ovs-vswitchd |<-->ovsdb-server
| +-------------------+
| | ofproto |<-->OpenFlow controllers
| +--------+-+--------+ _
| | netdev | |ofproto-| |
userspace | +--------+ | dpif | |
| | netdev | +--------+ |
| |provider| | dpif | |
| +---||---+ +--------+ |
| || | dpif | | implementation of
| || |provider| | ofproto provider
|_ || +---||---+ |
|| || |
_ +---||-----+---||---+ |
| | |datapath| |
kernel | | +--------+ _|
| | |
|_ +--------||---------+
||
physical
NIC
source to share