2

I have installed Mininet and openvswitch under Ubuntu 14.04. Trying to issue vSwitch datapath commands (to the Vswitch) using dpctl. When issuing a dpctl command at the bash prompt, the return is always "command not found". This is true when using sudo and even in the openvswitch directory. What is preventing this command from being found? Seems it is part of the openvswitch distribution. Also running the NOX controller, FYI. Thanks!

Kovalick
  • 51
  • 1
  • 1
  • 4

4 Answers4

2

I think the command you are looking for is ovs-dpctl. It is part of the openvswitch-switch package

nik
  • 726
  • 2
  • 12
  • 28
2

The Mininet walkthrough uses the old dpctl command (from the original reference OpenFlow implementation) to display flows, from within an xterm. More recently it is easier to use the Open vSwitch tool, ovs-ofctl. For instance display the flows installed in the switch from the switch xterm, use:source

ovs-ofctl dump-flows tcp:127.0.0.1:6634

dr34m3r
  • 135
  • 1
  • 1
  • 10
1

The differences are that:

ovs-dpctl - administer Open vSwitch datapaths ovs-ofctl - administer OpenFlow switches

I think you can use either but the usage is a little different, as far as I can see these two achieve the same thing:

ovs-dpctl dump-flows or ovs-ofctl dump-flows tcp:127.0.0.1:6634

screenshot of command outputs

Eric Chou
  • 11
  • 1
0

ovs-ofctl and ovs-dpctl are for totally two different purposes. ovs-ofctl always represents openflow flows. So you can see all different flows for all different tables. It will be always same flows whatever are added by controller. But dpctl shows ovs datapath flows aka megaflows. Ovs has a concept of megaflows which is combination of multiple pipeline flows. e.g, if you have 3 openflows flows like:

table=0, ip, action=dec_ttl, goto_table:1

table=1, ip, nw_src=10.0.0.0/8, action=goto_table:2

table=2, in_port=1, action=output:2

And if a packet hits all 3 flows, then you may see one megaflow combining all 3 openflow rules at datapath for that packet. If you use dpctl, you may see a flows similar to this:

table=0, in_port=1, ip, nw_src=10.0.0.1, action=dec_ttl, output:2

Remember OVS generates the megaflow in such a way that a single type of packet will never hit 2 different megaflows at datapath. And the megaflow mechanism in ovs is to increase the performance of packet processing in ovs.

If you want to understand more on ovs architecture then see the below paper: http://openvswitch.org/support/papers/nsdi2015.pdf

Subrata Paul
  • 86
  • 1
  • 3