<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Raymond P. Burkholder - Things I Do - Open vSwitch</title>
    <link>http://blog.raymond.burkholder.net/</link>
    <description>In And Around Technology and The Arts</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.7.2 - http://www.s9y.org/</generator>
    <pubDate>Wed, 12 Feb 2020 17:20:50 GMT</pubDate>

    <image>
        <url>http://blog.raymond.burkholder.net/templates/bulletproof/img/s9y_banner_small.png</url>
        <title>RSS: Raymond P. Burkholder - Things I Do - Open vSwitch - In And Around Technology and The Arts</title>
        <link>http://blog.raymond.burkholder.net/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Programmatic Open vSwitch</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/1051-Programmatic-Open-vSwitch.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/1051-Programmatic-Open-vSwitch.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=1051</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1051</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Quite some ago, there was a discussion around &lt;a href=&quot;https://mail.openvswitch.org/pipermail/ovs-dev/2016-January/307473.html&quot; target=_blank&gt;[ovs-dev] Creating a libopenvswitch-dev package&lt;/a&gt;, back in 2016.  Since then libraries have been updated for C++ inclusion, plus other improvements.

&lt;p&gt;From somewhere, I don&#039;t have the reference, maybe my own blog, but since I have this in a note on my desktop, I&#039;ll include it here:

&lt;blockquote&gt;
&lt;ul&gt;
  &lt;li&gt;Build a string formatted as the “ovs-ofctl” command would do, 
         for example “table=1,cookie=0xdeadbeef,in_port=1,actions=resubmit(,2)”
  &lt;li&gt;Pass this to parser_ofp_flow_mod_str().  The parser will magically parse the string in to a rich struct.
  &lt;li&gt;Pass the struct to ofputil_encode_flow_mod().  This returns a struct with a serialized OpenFlow message buffer.
  &lt;li&gt;Send this buffer on the wire either via a socket you manage yourself or let OpenVswitch do it for you.
  &lt;/ul&gt;
&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Wed, 12 Feb 2020 17:20:50 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/1051-guid.html</guid>
    
</item>
<item>
    <title>open vSwitch Commands</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/974-open-vSwitch-Commands.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/974-open-vSwitch-Commands.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=974</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=974</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Because ovsdb is a generic database tool, some one may have build other schemas.  But for a native open vswitch install, this is the default state:
&lt;blockquote&gt;&lt;pre&gt;
# ovsdb-client list-dbs
Open_vSwitch
_Server
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;It is possible to add a tcp connection to gain access to the database:

&lt;blockquote&gt;&lt;pre&gt;
# ovs-appctl -t ovsdb-server ovsdb-server/add-remote ptcp:6640
# netstat -antp |grep ovs
tcp        0      0 0.0.0.0:6640            0.0.0.0:*               LISTEN      746/ovsdb-server
tcp        0      0 127.0.0.1:57424         127.0.0.1:6633          ESTABLISHED 397/ovs-vswitchd
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;But on linux, there is an existing linux stream available:
&lt;blockquote&gt;&lt;pre&gt;
# lsof|grep ovsdb|grep STREAM
ovsdb-ser   746                   root    5u     unix 0x000000001740f722        0t0   59425581 /var/run/openvswitch/db.sock type=STREAM
ovsdb-ser   746                   root   16u     unix 0x0000000021edd23e        0t0      12914 /var/run/openvswitch/db.sock type=STREAM
ovsdb-ser   746                   root   19u     unix 0x000000001b392a81        0t0      20287 /var/run/openvswitch/ovsdb-server.746.ctl type=STREAM
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;pre&gt;
# ovs-vsctl list open_vswitch
_uuid               : 8cfeb1c0-34ca-4f91-a162-7e9aef141344
bridges             : [e65f5e97-36ec-45e3-b83e-64129dae61d3]
cur_cfg             : 65
datapath_types      : [netdev, system]
db_version          : &quot;7.16.1&quot;
dpdk_initialized    : false
dpdk_version        : none
external_ids        : {hostname=&quot;nuc8i7hvk01.burkholder.net&quot;, rundir=&quot;/var/run/openvswitch&quot;, system-id=&quot;02700cd5-96f5-4b4e-90b4-5e67fe06abf7&quot;}
iface_types         : [erspan, geneve, gre, internal, &quot;ip6erspan&quot;, &quot;ip6gre&quot;, lisp, patch, stt, system, tap, vxlan]
manager_options     : []
next_cfg            : 65
other_config        : {}
ovs_version         : &quot;2.10.1&quot;
ssl                 : []
statistics          : {}
system_type         : debian
system_version      : []
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;pre&gt;
# ovs-appctl dpif/show
system@ovs-system: hit:50661581 missed:207452
  ovsbr0:
    eno1 5/3: (system)
    enp5s0 2/1: (system)
    ovsbr0 65534/2: (internal)
    veth-nvpn-v90 6/6: (system)
    vlan110 4/5: (internal)
    vlan90 3/4: (internal)
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;pre&gt;
# ovs-appctl dpctl/show -s
system@ovs-system:
  lookups: hit:50661616 missed:207458 lost:0
  flows: 6
  masks: hit:211426886 total:10 hit/pkt:4.16
  port 0: ovs-system (internal)
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1428 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:0  TX bytes:177489 (173.3 KiB)
  port 1: enp5s0
    RX packets:19439356 errors:0 dropped:0 overruns:0 frame:0
    TX packets:30374161 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:10608677166 (9.9 GiB)  TX bytes:29950322693 (27.9 GiB)
  port 2: ovsbr0 (internal)
    RX packets:333032 errors:0 dropped:29829 overruns:0 frame:0
    TX packets:1428 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:23060625 (22.0 MiB)  TX bytes:177489 (173.3 KiB)
  port 3: eno1
    RX packets:6037565 errors:0 dropped:0 overruns:0 frame:0
    TX packets:5719808 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:4726094728 (4.4 GiB)  TX bytes:3277870100 (3.1 GiB)
  port 4: vlan90 (internal)
    RX packets:0 errors:0 dropped:274558 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:0  TX bytes:0
  port 5: vlan110 (internal)
    RX packets:0 errors:0 dropped:274101 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:0  TX bytes:0
  port 6: veth-nvpn-v90
    RX packets:5000388 errors:0 dropped:0 overruns:0 frame:0
    TX packets:5788139 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:3055006377 (2.8 GiB)  TX bytes:4647166781 (4.3 GiB)
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;pre&gt;
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;pre&gt;
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;pre&gt;
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;pre&gt;
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;pre&gt;
&lt;/pre&gt;&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Thu, 15 Nov 2018 00:50:18 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/974-guid.html</guid>
    
</item>
<item>
    <title>More Open vSwitch Commands ...</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/920-More-Open-vSwitch-Commands-....html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/920-More-Open-vSwitch-Commands-....html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=920</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=920</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;... from the mailing list:

&lt;blockquote&gt;&lt;pre&gt;
//You can verify that OVS supports deletion by cookie specification by checking these tests:

 932: ofproto.at:1746    ofproto - del flows based on cookie
 933: ofproto.at:1767    ofproto - del flows based on cookie mask

// Run the tests using “make check” like this:
sudo make check TESTSUITEFLAGS=&#039;932-933&#039; -C _gcc

//Look at what is being tested here:
tests/ofproto.at
&lt;/pre&gt;&lt;/blockquote&gt;

and

&lt;blockquote&gt;&lt;pre&gt;
Maybe you want to check what Ryu is sending the switch

http://www.openvswitch.org//support/dist-docs/ovs-ofctl.8.pdf

“OpenFlow Switch Monitoring Commands:
monitor switch [miss-len] [invalid_ttl] [watch:[spec...]]
Connects to switch and prints to the console all OpenFlow messages received. Usually, switch
should specify the name of a bridge in the ovs−vswitchd database.“

eg) ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2&amp;gt; ofctl_monitor.log
&lt;/pre&gt;&lt;/blockquote&gt;
 
    </content:encoded>

    <pubDate>Tue, 24 Apr 2018 22:55:22 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/920-guid.html</guid>
    
</item>
<item>
    <title>libvirt, ovs, and vlans</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/860-libvirt,-ovs,-and-vlans.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/860-libvirt,-ovs,-and-vlans.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=860</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=860</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Since I plan on using this similar combination in some upcoming configurations, I&#039;ll keep the reference here, and hopefully add details once I&#039;ve worked through them.

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://blog.scottlowe.org/2012/11/07/using-vlans-with-ovs-and-libvirt/&quot; target=_blank&gt;Using VLANs with OVS and libvirt&lt;/a&gt; by Scott Lowe back in 2012, referenced in an &lt;a href=&quot;https://mail.openvswitch.org/pipermail/ovs-discuss/2017-November/045661.html&quot; target=_blank&gt;Replace Linux Bridge with Openvswitch on Ubuntu&lt;/a&gt; (an OVS mailing list entry).
  &lt;/ul&gt; 
    </content:encoded>

    <pubDate>Mon, 13 Nov 2017 22:18:39 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/860-guid.html</guid>
    
</item>
<item>
    <title>Capacity/Quota in ovs/openflow</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/853-CapacityQuota-in-ovsopenflow.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/853-CapacityQuota-in-ovsopenflow.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=853</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=853</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;The question:

&lt;blockquote&gt;
What is the best way to model quota through ovs? Right now the best thing we could come up with is to periodically poll a flow stat and install a drop flow when the flow stat goes past the quota.
&lt;/blockquote&gt;

&lt;p&gt;The answer given (which provides some food for thought on better mechanisms):

&lt;blockquote&gt;
&lt;p&gt;Open vSwitch includes sFlow / NetFlow instrumentation. Using flow data to drive your quota controller reduces the complexity of the OpenFlow rules since you no longer need granular rules to provide the traffic measurements. 

&lt;p&gt;The following article describes building a quota controller using sFlow:

&lt;p&gt;&lt;a href=&quot;http://blog.sflow.com/2017/09/real-time-visibility-and-control-of.html&quot; target=_blank&gt;Real Time Visibility and Control&lt;a/&gt;
&lt;/blockquote&gt;
 
    </content:encoded>

    <pubDate>Tue, 07 Nov 2017 00:34:26 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/853-guid.html</guid>
    
</item>
<item>
    <title>open vswitch newsgroup notes</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/842-open-vswitch-newsgroup-notes.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/842-open-vswitch-newsgroup-notes.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=842</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=842</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Bypassing OpenFlow controller and injecting flow table entries via a code call:
&lt;blockquote&gt;&lt;pre&gt;
&gt; Can someone refer to the code where a  new flow is inserted to
&gt; openflow tables in the OVS, as a consequence action of a received
&gt; message from a controller?

handle_flow_mod() in ofproto.c
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Another similar request:

&lt;blockquote&gt;&lt;pre&gt;
&gt; My project was previously calling system commands like ‘ovs-ofctl add-flow’ directly from C, 
&gt; but we would like to do this programmatically now, by calling into the openvswitch library. 
&gt; After looking at this for a bit and what methods I would have to call, I’ve realized this is 
&gt; non trivial, and I can’t find any easily exposed methods to add and delete flows. 
&gt; Does anyone have an example anywhere of calling into openvswitch methods 
&gt; directly to add/remove flows? So far the best way I can find is calling into 
&gt; ovn/controller/ofctrl.h:ofctrl_add_flow(…), but this will require quite a bit of legwork.

One way:

There are plenty of controllers out there, including a couple in C - libfluid

Another way:

Here’s how I do it.  It’s essentially the same as what the ‘ovs-ofctl add-flow’ command does under the hood.

1. Build a string formatted as the “ovs-ofctl” command would do, 
         for example “table=1,cookie=0xdeadbeef,in_port=1,actions=resubmit(,2)”
2. Pass this to parser_ofp_flow_mod_str().  The parser will magically parse the string in to a rich struct.
3. Pass the struct to ofputil_encode_flow_mod().  This returns a struct with a serialized OpenFlow message buffer.
4. Send this buffer on the wire either via a socket you manage yourself or let OpenVswitch do it for you.

&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Added 2017/11/13, the second link shows a terrific example usage for ovs-dpctl

&lt;blockquote&gt;&lt;pre&gt;
&gt; I have a problem that when i use the ovs-dpctl to add a flow into datapath, 
&gt; it occurs &quot;ovs-dpctl: parsing flow key (Invalid argument)&quot;
&gt;
&gt;     example:
&gt;    root@jlt:~# ovs-dpctl add-flow system@myDP &quot;in_port(1),eth_type(0x800),ipv4
&gt; (src=172.31.110.4,dst=172.31.110.5)&quot; 2
&gt; ovs-dpctl: parsing flow key (Invalid argument)

You may be able to use &#039;dmesg&#039; to see which key is missing.

See the talk by Joe Stringer:
&lt;a href=&quot;https://www.youtube.com/watch?v=8ieoUQI7X88&quot; target=_blank&gt;Youtube&lt;/a&gt;

And the blogpost (shameless plug for myself):
&lt;a href=&quot;https://developers.redhat.com/blog/2017/04/06/direct-kernel-open-vswitch-flow-programming/&quot; target=_blank&gt;Direct Kernel OVS Flow Programming&lt;/a&gt;
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;A follow up from Ben indicated though:

&lt;blockquote&gt;
I believe that this particular error comes from the userspace parser,
not the kernel.&lt;/blockquote&gt;

&lt;p&gt;Another addition on 2017/11/13:

&lt;blockquote&gt;&lt;pre&gt;
&gt; For us, newbies, examples are extremely valuable, more than a thousand
&gt; words.
&gt; If some kind soul has an example on how to insert a new interface (s1-eth3)
&gt; in a single switch (s1) with two interfaces (s1-eth2 and s1-eth3) please
&gt; share with me.

If you run something like this:
        ovs-vsctl -vjsonrpc -- add-bond s1 s1-eth3 s1-eth2 s1-eth3
then you will see what ovs-vsctl does to insert such a bond, logged as
the jsonrpc module.&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;2017/11/25 Addition 1:

&lt;blockquote&gt;&lt;pre&gt;
ovs-save is a shell script, using `ovs-ofctl dump-flows br` to write flows
into a file, and then use `ovs-ofctl add-flows br FILE` to add them.
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;2017/11/25 Addition 2:

&lt;blockquote&gt;
&lt;p&gt;The OpenFlow Spec does not directly provide the mechanism for the multi-path load balancing and
also Ryu does not provide it.
I guess it is depending on your application design...

&lt;p&gt;But for the beginning, how about using the Group action(the &quot;select&quot; type)?
The selection algorithm is depending on your switch though, it provides an easy way to do load
balancing.
&lt;p&gt;Please refer to the section &quot;5.6.1 Group Types&quot; in the OpenFlow Spec 1.3.5 for the details:
  https://www.opennetworking.org/wp-content/uploads/2014/10/openflow-switch-v1.3.5.pdf
&lt;/blockquote&gt;

&lt;p&gt;2017/12/07 dpctl: Support flush conntrack by 5-tuple

&lt;p&gt;With this patch, &quot;flush-conntrack&quot; in ovs-dpctl and ovs-appctl accept a conntrack 5-tuple to delete the conntrack entry specified by the 5-tuple.
For example, user can use the following command to flush a conntrack entry in zone 5.

&lt;blockquote&gt;&lt;pre&gt;
$ ovs-dpctl flush-conntrack zone=5 \
    &#039;ct_nw_src=10.1.1.2,ct_nw_dst=10.1.1.1,ct_nw_proto=17,ct_tp_src=2,ct_tp_dst=1&#039;
$ ovs-appctl dpctl/flush-conntrack zone=5 \
    &#039;ct_nw_src=10.1.1.2,ct_nw_dst=10.1.1.1,ct_nw_proto=17,ct_tp_src=2,ct_tp_dst=1&#039;
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;2018/06/11: &quot;I suggest using ofproto/trace to figure out what&#039;s going on.  See
ovs-vswitchd(8) if you&#039;re not already familiar with it.&quot;

&lt;p&gt;2018/06/11: &quot;You can see the history of the configuration database by running
&quot;ovsdb-tool -mm show-log&quot; on it.  This might reveal what is happening,
too.&quot;

&lt;blockquote&gt;
&quot;ovs-vsctl --may-exist add-port {{ info.ovs_bridge }} {{ interface }} {{ info.ovs_options }} -- set interface {{ interface }} type=internal&quot;
&lt;/blockquote&gt;

&lt;p&gt;2018/11/25 - &lt;a href=&quot;https://github.com/openvswitch/ovs/blob/master/utilities/ovs-testcontroller.c&quot; target=_blank&gt;ovs-testcontroller&lt;/a&gt; 
    </content:encoded>

    <pubDate>Sun, 29 Oct 2017 13:22:46 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/842-guid.html</guid>
    
</item>
<item>
    <title>Open vSwitch Commands</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/822-Open-vSwitch-Commands.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/822-Open-vSwitch-Commands.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=822</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=822</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;port number with port name:

&lt;pre&gt;# ovs-ofctl dump-ports-desc &amp;lt;ovs bridge&amp;gt;&lt;/pre&gt;

&lt;p&gt;dump flows:

&lt;pre&gt;# ovs-ofctl dump-flows &amp;lt;ovs bridge&amp;gt;&lt;/pre&gt;

&lt;p&gt;Dump OVSDB table:

&lt;pre&gt;# ovsdb-client dump &lt;/pre&gt;

&lt;p&gt;Obtain schema of OVSDB:

&lt;pre&gt;# ovsdb-client get-schema --pretty&lt;/pre&gt;

&lt;p&gt;Some background info on OVSDB from Brent Salisbury&#039;s Blog: &lt;a href=&quot;http://networkstatic.net/getting-started-ovsdb/&quot; target=_blank&gt;Getting Started with OVSDB&lt;/a&gt;  As &lt;a href=&quot;https://keepingitclassless.net/2013/10/introduction-to-open-vswitch/&quot; target=_blank&gt;Introduction to Open vSwitch &lt;/a&gt; says:

&lt;blockquote&gt;&lt;p&gt;Like OSPF, OpenFlow directly influences the forwarding behavior of a networking devices (albeit way differently than OSPF) but isn’t able to actually change the configuration of that device. OSPF cannot disable a router’s interface, or create a GRE tunnel, for instance. For that, we need a management plane protocol.

&lt;p&gt;In the world of OVS, this role is filled by OVSDB. This allows us to use well-understood wire protocols (namely JSON-RPC) to send commands to an OVS instance to do things like create tunnels, turn on/off certain features, get configuration data, and more.
&lt;/blockquote&gt;

&lt;p&gt;I have wondered about the &#039;tcp&#039; vs &#039;ptcp&#039; syntax.  Well the answer:

&lt;blockquote&gt;&lt;p&gt;“Manager” refers to an OVSDB client. The “ptcp::&quot; syntax means that OVS is passively listening on that port and local address for incoming JSON-RPC data.
&lt;p&gt;“Controller” refers to an OpenFlow controller. The “tcp:&quot; syntax means that OVS proactively reaches out to a controller at that address  to establish the relationship. (Standard port of 6633)
&lt;/blockquote&gt;

&lt;p&gt;2018/01/20: 
&lt;blockquote&gt;&lt;pre&gt;

ovs-vsctl get Interface &amp;lt;iface&amp;gt; status
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;2018/03/29

&lt;blockquote&gt;&lt;pre&gt;
ovsdb-client -f list dump 
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;2018/06/11

&lt;blockquote&gt;&lt;pre&gt;
# ovs-appctl dpctl/show
system@ovs-system:
        lookups: hit:393756304 missed:4746333 lost:0
        flows: 31
        masks: hit:1365293746 total:4 hit/pkt:3.43
        port 0: ovs-system (internal)
        port 1: ovsbr0 (internal)
        port 2: enp5s0
        port 3: vlan20 (internal)
        port 4: enp1s0
        port 5: enp2s0
        port 6: enp3s0
        port 7: vlan30 (internal)
        port 8: wlp4s0
        port 9: vlan40 (internal)
        port 10: vlan50 (internal)
&lt;pre&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;pre&gt;
# ovs-ofctl show ovsbr0
OFPT_FEATURES_REPLY (xid=0x2): dpid:0000000ec4d20451
n_tables:254, n_buffers:0
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
 1(enp5s0): addr:00:0e:c4:d2:04:54
     config:     0
     state:      0
     current:    100MB-FD COPPER AUTO_NEG
     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE
     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE
     speed: 100 Mbps now, 1000 Mbps max
 2(vlan20): addr:a2:58:96:ce:5c:40
     config:     0
     state:      0
     speed: 0 Mbps now, 0 Mbps max
 3(enp1s0): addr:00:0e:c4:d2:04:51
     config:     0
     state:      0
     current:    100MB-FD COPPER AUTO_NEG
     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE
     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE
     speed: 100 Mbps now, 1000 Mbps max
....
....
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;2018/06/21 

&lt;blockquote&gt;&lt;pre&gt;
# ovs-appctl dpif/dump-flows ovsbr0
recirc_id(0),in_port(9),eth(src=e6:64:dc:6f:7d:87,dst=44:80:eb:1c:1b:69),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:54, used:8.756s, flags:R., actions:8
recirc_id(0),in_port(13),eth(src=0a:00:40:50:00:ce,dst=b6:4d:8d:6b:37:5a),eth_type(0x0806), packets:0, bytes:0, used:never, actions:10
recirc_id(0),in_port(2),eth(src=84:2b:2b:47:2e:4f,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=199.68.195.98,tip=199.68.195.107,op=1/0xff), packets:2, bytes:120, used:0.836s, actions:push_vlan(vid=20,pcp=0),1,pop_vlan,3
recirc_id(0),in_port(7),eth(src=7e:00:6a:f3:12:91,dst=80:fa:5b:43:c6:db),eth_type(0x0800),ipv4(frag=no), packets:2341, bytes:1954768, used:0.008s, flags:SFPR., actions:5
recirc_id(0),in_port(5),eth(src=80:fa:5b:43:c6:db,dst=7e:00:6a:f3:12:91),eth_type(0x0806), packets:0, bytes:0, used:never, actions:7
....
&lt;/pre&gt;&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Sat, 14 Oct 2017 14:23:49 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/822-guid.html</guid>
    
</item>
<item>
    <title>OVS and QinQ (aka 802.1ad)</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/820-OVS-and-QinQ-aka-802.1ad.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/820-OVS-and-QinQ-aka-802.1ad.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=820</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=820</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Redhat has an excellent entry on &lt;a href=&quot;https://developers.redhat.com/blog/2017/06/06/open-vswitch-overview-of-802-1ad-qinq-support/&quot; target=_blank&gt;Open vSwitch: Overview of 802.1ad (QinQ) Support&lt;/a&gt;.

&lt;p&gt;A key point raised is:

&lt;blockquote&gt;
Enabling QinQ support in OVS is a simple configuration change. You must set the vlan-limit option to a value of 0 (unlimited) or 2. By default vlan-limit has a value of 1, which means only one VLAN tag will be inspected. This preserves backward compatibility with older OVS releases.

&lt;pre&gt;
$ ovs-vsctl set Open_vSwitch . other_config:vlan-limit=2
&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;The article continues with ovs-ofctl and ovs-vsctl examples. 
    </content:encoded>

    <pubDate>Mon, 09 Oct 2017 02:13:43 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/820-guid.html</guid>
    
</item>
<item>
    <title>Open vSwitch (OVS) Things To Remember</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/818-Open-vSwitch-OVS-Things-To-Remember.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/818-Open-vSwitch-OVS-Things-To-Remember.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=818</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=818</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;I&#039;ve been writing some &lt;a href=&quot;https://github.com/rburkholder/cppofc&quot; target=_blank&gt;OpenFlow Controller&lt;/a&gt; code to get a feel on how OpenFlow works.  As I get into it, I&#039;ve been wondering if what I want to do is quite correct.  Open vSwitch has various extensions available, which may or may not be available via the OpenFlow standards.  So writing code conforming to something like OF 1.4.1, will I be able to gain access to those extensions, or will I need to access Open vSwitch differently?  Not sure.  More research is needed.  These links track some of that research.

&lt;p&gt;First off, there are libraries in OVS for tracking &lt;a href=&quot;https://github.com/openvswitch/ovs/blob/master/lib/bfd.c&quot; target=_blank&gt;BFD&lt;/a&gt; by watching a vswitch table.  Also, there is an &lt;a href=&quot;https://github.com/openvswitch/ovs/tree/master/lib/lldp&quot; target=_blank&gt;lldp&lt;/a&gt; encoder/decoder.

&lt;p&gt;From an OpenFlow perspective, there is a tutorial called &lt;a href=&quot;https://github.com/openvswitch/ovs/blob/master/Documentation/tutorials/ovs-advanced.rst&quot; target=_blank&gt;Open vSwitch Advanced Features&lt;/a&gt;, which shows, via the command line tools, how to use multiple flow tables to build a simple learning switch.  That documentation makes reference to some extension files:

&lt;ul&gt;
  &lt;li&gt;include/openvswitch/meta-flow.h
  &lt;li&gt;include/openflow/nicira-ext.h
  &lt;/ul&gt;

&lt;p&gt;So, the question is, how to make use of those extensions via an API?  Support for that question may start at the
&lt;a href=&quot;https://github.com/openvswitch/ovs/blob/master/Documentation/topics/integration.rst&quot; target=_blank&gt;Integration Guide for Centralized Control&lt;/a&gt;.

&lt;p&gt;&lt;a href=&quot;https://github.com/openvswitch/ovs/blob/master/Documentation/topics/design.rst&quot; target=_blank&gt;Design Decisions In Open vSwitch&lt;/a&gt; has various comments on:  what a master sees vs a slave, talks about v1.4 bundles and transactions, clarification on vlan matching in the various versions, and talks extensively about in-band and out-band control.

&lt;p&gt;The FAQ &lt;a href=&quot;https://github.com/openvswitch/ovs/blob/master/Documentation/faq/openflow.rst&quot; target=_blank&gt;Using OpenFlow&lt;/a&gt; talks about: hidden flows and how to dump them, how to set out-of-band mode, how to get a list of port numbers as they associate to interface name, and how to adjust mtu on internal interfaces.

&lt;p&gt;The &lt;a href=&quot;https://github.com/openvswitch/ovs/blob/master/Documentation/faq/general.rst&quot; target=_blank&gt;General FAQ&lt;/a&gt; talks about the current standard ports as of OVS 2.4:

&lt;ul&gt;
  &lt;li&gt;6653 (was 6633) - OpenFlow
  &lt;li&gt;6640 (was 6632) - OVSDB - which is what I need to investigate for the OVSDB protocol API
  &lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/openvswitch/ovs/blob/master/Documentation/howto/kvm.rst&quot; target=_blank&gt;OVS with KVM&lt;/a&gt; talks about starting up a KVM guest and connecting it via a couple custom scripts to the network.  &lt;a href=&quot;https://github.com/openvswitch/ovs/blob/master/Documentation/howto/libvirt.rst&quot; target=_blank&gt;libvirt&lt;/a&gt; can also play nicely with OVS.

&lt;p&gt;&lt;a href=&quot;https://github.com/openvswitch/ovs/blob/master/Documentation/intro/install/bash-completion.rst&quot; target=_blank&gt;Bash Completion is Available&lt;/a&gt; with 

&lt;ul&gt;
  &lt;li&gt;ovs-appctl-bashcomp.bash
  &lt;li&gt;ovs-vsctl-bashcomp.bash
  &lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/openvswitch/ovs/blob/master/Documentation/topics/tracing.rst&quot; target=_blank&gt;Tracing&lt;/a&gt; explains how to test the series of flow table entries against a sample packet.

&lt;p&gt;For each OpenFlow version, there is a separate &lt;a href=&quot;https://github.com/openvswitch/ovs/tree/master/include/openflow&quot; target=_blank&gt;header&lt;/a&gt;.  The same directory has headers for extensions as well.

&lt;p&gt;On the &lt;a href=&quot;http://docs.openvswitch.org/en/latest/ref/&quot; target=_blank&gt;documentation&lt;/a&gt; page, some interesting entries:

&lt;ul&gt;
  &lt;li&gt;ovs-vswtichd.conf.db - describes the OVSDB tables - can flows be inserted via the flow table? 
  &lt;li&gt;ovs-vswitchd - desribes the primary service, and has detailed examples of related client commands ovs-ofctl, ovs-vsctl, ....
  &lt;li&gt;ovs-fields - is an important document describing match and action fields, whether they are openflow standard or ncira extensions, and some are just OVS based.
  &lt;li&gt;ovs-dbclient - can be used to dump tables in OVSDB - so use this to check flows once a controller has been activated
  &lt;/ul&gt;

&lt;p&gt;I found hints at &lt;a href=&quot;http://networkstatic.net/getting-started-ovsdb/&quot; target=_blank&gt;Getting Started With OVSDB&lt;/a&gt; for getting JSON out of some of the command line utilities.  It also alludes to an OVSDB method specification.  It also talks about the ability to &#039;monitor&#039;, which is what I&#039;m looking for from a BFD scenario (if I don&#039;t implement that myself from a packet_in / packet_out perspective).

&lt;p&gt;I get closer by looking at &lt;a href=&quot;https://www.relaxdiego.com/2014/09/ovsdb.html&quot; target=_blank&gt;All About the OVSDB Server&lt;/a&gt; by describing non OVS database uses.

&lt;p&gt;That article references &lt;a href=&quot;https://tools.ietf.org/html/rfc7047&quot; target=_blank&gt;RFC 7047&lt;/a&gt; which talks about the database generically.  It says JSON is being used for the schema format and for the wire protocol format.  So, by using looking into the tables and fields, it should be possible to come up with the appropriate JSON structures and commands to perform the necessary updates without the use of OpenFlow.

&lt;p&gt;&lt;a href=&quot;https://www.relaxdiego.com/2014/09/hardware_vtep.html&quot; target=_blank&gt;Understanding Hardware VTEPs&lt;/a&gt; shows some ways of composing and transmitting JSON via the command line to the database.

&lt;p&gt;On the &lt;a href=&quot;http://openvswitch.org/support/slides/&quot; target=_blank&gt;Presentations&lt;/a&gt; page, for troubleshooting, &quot;OVS Deep Dive&quot; and &quot;Debugging OVS&quot; are useful.

&lt;p&gt;&lt;a href=&quot;https://github.com/John-Lin/OVS-Cheat-Sheet&quot; target=_blank&gt;OVS-Cheat-Sheet&lt;/a&gt; has the following useful diagram:

&lt;blockquote&gt;&lt;pre&gt;
+---------+ +-----------+                                                              
|ovs-ofctl| |sFlow Trend|                                                                         
+----^----+ +-----^-----+                                                                         
     |            |                                                                      Remote   
+-----------------------------------------------------------------------------------------------+   
     |            |                                                                               
     |      sFlow |                                                                               
     |            |  +---------+   +----------+             +---------+   +------------+          
     |            |  |ovs-dpctl|   |ovs-appctl|             |ovs-vsctl|   |ovsdb-client|          
     |            |  +----+----+   +------^---+             +-----+---+   +-------^----+          
     |            |       |     Command   |                       | Config        | DB operation  
     |            |  +----v---------------v--+ Unix socket   +----v---------------v-+             
     |            +--+                       +---------------&gt;                      | 
     |OpenFlow       |    ovsdb-vswitchd     |               |     ovsdb-server     | +----------+
     +---------------+                       &lt;---------------+                      | |ovsdb-tool|
                     +-----^------------+----+ Apply changes +------------^---------+ +----+-----+
                           |            |                                 |                |      
                           |            |                                 |                |      
                           |            |                           +-----v-----+          |      
            upcall(netlink)|            |netlink                    |   ovsdb   &lt;----------+      
                           |            |                           +-----------+                 
+-----------------------------------------------------------------------------------------------+   
                           |            |                                           Kernel space      
                     +-----+------------v------+                                                  
                     |Openvswitch kernel module|                                                  
                     +-------------------------+          
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://therandomsecurityguy.com/openvswitch-cheat-sheet/&quot; target=_blank&gt;Open vSwitch Cheat Sheet&lt;/a&gt; has another useful cheatsheet of commands.

&lt;p&gt;Matt Oswalt has a couple of relevant OpenFlow related articles:
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://keepingitclassless.net/2014/11/openflow-based-storage-traffic-steering-coho-data/&quot; target=_blank&gt;Storage Traffic Magic with OpenFlow &lt;/a&gt; where he talks about a now defunct storage company Coho Storage using OpenFlow to steer requests and responses in and out of appropriate nodes by appropropriate mac address mangling.
  &lt;li&gt;&lt;a href=&quot;https://keepingitclassless.net/2014/07/sdn-protocols-2-openflow-deep-dive/&quot; target=_blank&gt;[SDN Protocols] Part 2 - OpenFlow Deep-Dive&lt;/a&gt; where he provides a good overview of OpenFlow tables, pipelines, write actions, action sets, as well as proactive vs reactive flow instantiation.
  &lt;/ul&gt;

&lt;p&gt;When getting into network discovery, &lt;a href=&quot;http://vlkan.com/blog/post/2013/08/06/sdn-discovery/&quot; target=_blank&gt;Discovery in Software-Defined Networks&lt;/a&gt; talks about using LLDP (Link Layer Discovery Protocol) as well as BDDP (Broadcaset Domain Discovery Protocol) packets.  BDDP packets can be used to discover non-LLDP responding switches, or switches not part of an SDN managed domain.  The article suggests discovery packets on 5 second intervals. 
    </content:encoded>

    <pubDate>Sun, 08 Oct 2017 21:02:31 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/818-guid.html</guid>
    
</item>
<item>
    <title>From Today's ovs-discuss</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/805-From-Todays-ovs-discuss.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/805-From-Todays-ovs-discuss.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=805</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=805</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;A confirmation that a bridge should be placed in the &#039;up&#039; state in order to function properly.

&lt;blockquote&gt;
This is (bridge) br0. Is it up or down? If it&#039;s down, the broadcasts for that port
will be dropped and accounted.
&lt;/blockquote&gt;

&lt;p&gt;A note on scaling networks (packet processing) in Linux:

&lt;blockquote&gt;
&lt;p&gt;In order to have multiple CPUs processing packets in parallel with
the kernel datapath, you need multiple queues with their interrupts
spread among all relevant CPUs.  And in order to the NIC to spread
the traffic to different queues, you need different streams (5-tuple).
That is called RSS.

&lt;p&gt;For example, stream A would go to queue#1 which is mapped to CPU#1 and
stream B would go to queue#2 which is mapped to CPU#2 and so on.

&lt;p&gt;That is how Linux kernel works in general (as standalone NIC, or using
Linux bridge or OVS). Here is a doc explaining it in more details:
&lt;p&gt;&lt;a href=&quot;https://www.kernel.org/doc/Documentation/networking/scaling.txt&quot; target=_blank&gt;Linux Kernel Docs for Scaling&lt;/a&gt; -- with RSS (Receive Side Scaling), among other concepts, explained.
&lt;/blockquote&gt;
 
    </content:encoded>

    <pubDate>Mon, 04 Sep 2017 23:22:49 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/805-guid.html</guid>
    
</item>
<item>
    <title>Open vSwitch 802.1q Tagged/Untagged VLANs</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/801-Open-vSwitch-802.1q-TaggedUntagged-VLANs.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/801-Open-vSwitch-802.1q-TaggedUntagged-VLANs.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=801</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=801</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;This is an easy combination, but a quick google didn&#039;t surface a succinct entry, so for my own documentation, here is what I use:

&lt;p&gt;Add a bridge:

&lt;pre&gt;ovs-vsctl add-br br0&lt;/pre&gt;

&lt;p&gt;Add a physical port to the bridge, which defaults to 802.1q trunk mode:

&lt;pre&gt;ovs-vsctl add-port br0 eno1&lt;/pre&gt;

&lt;p&gt;Allow and make use of a designated untagged VLAN:

 &lt;pre&gt;ovs-vsctl set port eno1 vlan_mode=native-untagged&lt;/pre&gt;

&lt;p&gt;Designate which vlan is untagged:

&lt;pre&gt;ovs-vsctl set port eno1 tag=20&lt;/pre&gt;

&lt;p&gt;Specify which VLANs are trunked and allowed:

&lt;pre&gt;ovs-vsctl set port eno1 trunks=10,30,50,60

&lt;p&gt;A short form diagnostic command:

&lt;blockquote&gt;&lt;pre&gt;
# ovs-vsctl list port eno1
_uuid               : 579b2c91-ad26-4ba0-bdcc-172c18daae80
bond_active_slave   : []
bond_downdelay      : 0
bond_fake_iface     : false
bond_mode           : []
bond_updelay        : 0
external_ids        : {}
fake_bridge         : false
interfaces          : [bfec126c-375c-435e-9fae-3b71d513724b]
lacp                : []
mac                 : []
name                : &quot;eno1&quot;
other_config        : {}
qos                 : []
rstp_statistics     : {}
rstp_status         : {}
statistics          : {}
status              : {}
tag                 : 20
trunks              : [10, 30, 50, 60]
vlan_mode           : native-untagged
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;A longer form diagnostic command:

&lt;blockquote&gt;&lt;pre&gt;
# ovs-vsctl list interface eno1
_uuid               : bfec126c-375c-435e-9fae-3b71d513724b
admin_state         : up
bfd                 : {}
bfd_status          : {}
cfm_fault           : []
cfm_fault_status    : []
cfm_flap_count      : []
cfm_health          : []
cfm_mpid            : []
cfm_remote_mpids    : []
cfm_remote_opstate  : []
duplex              : full
error               : []
external_ids        : {}
ifindex             : 2
ingress_policing_burst: 0
ingress_policing_rate: 0
lacp_current        : []
link_resets         : 1
link_speed          : 100000000
link_state          : up
lldp                : {}
mac                 : []
mac_in_use          : &quot;4c:72:b9:4b:16:5c&quot;
mtu                 : 1500
mtu_request         : []
name                : &quot;eno1&quot;
ofport              : 1
ofport_request      : []
options             : {}
other_config        : {}
statistics          : {collisions=0, rx_bytes=62197532, rx_crc_err=0, rx_dropped=0, rx_errors=0, rx_frame_err=0, rx_over_err=0, rx_packets=92875, tx_bytes=30437234, tx_dropped=0, tx_errors=0, tx_packets=86960}
status              : {driver_name=&quot;r8169&quot;, driver_version=&quot;2.3LK-NAPI&quot;, firmware_version=&quot;&quot;}
type                : &quot;&quot;
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;A short, all-in-one lcommand for adding an internal access port:

&lt;pre&gt;ovs-vsctl add-port ovsbr0 vlan40 tag=40 -- set Interface vlan40 type=internal&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Sun, 27 Aug 2017 17:56:34 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/801-guid.html</guid>
    
</item>
<item>
    <title>openvswitch command line interfaces</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/789-openvswitch-command-line-interfaces.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/789-openvswitch-command-line-interfaces.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=789</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=789</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;From &lt;a href=&quot;https://www.slideshare.net/eprasad/demystifying-openvswitch&quot; target=_blank&gt;demystifying openvswitch&lt;/a&gt; (with the slide deck showing some interesting edit shortcuts with virsh, and slide 13 may be incorrect as trunk is default):

&lt;ul&gt;
  &lt;li&gt;&lt;b&gt;ovs-vsctl&lt;/b&gt;: Set up, maintain, and inspect various openvswitch configurations.  It provides a high level interface to the database to query and apply changes at run time.  Operations are persistent across reboot. Example: ovs-vsctl --format=table --column=name,vlan_mode
  &lt;li&gt;&lt;b&gt;ovs-ofctl, ovs-dpctl&lt;/b&gt;: Administer and monitor flow entries.  Two kinds of flows:  openflows (flows managed at control plane) and datapath (kernel flow, cached version of openflow).  ovs-ofctl speaks to openflow module.  ovs-dpctl talks to kernel module.  
  &lt;li&gt;&lt;b&gt;ovs-appctl&lt;/b&gt;: Sends commands to a running openvswitch to gather information which is not directly exposed to ovs-ofctl -- the Swiss Army knife of openflow troubleshooting.  Example:  ovs-appctl vlog/list, ovs-appctl vlog/set module(:facility(:level)) where level is emer, err, warn, info, dbg
  &lt;li&gt;&lt;b&gt;ovsdb-client&lt;/b&gt;: query the ovs database.  Example: ovsdb-lient list-tables, ovsdb-client list-columns &lt;table_name&gt;, ovsdb-client monitor &lt;table_name&gt; &lt;column_name&gt; --detach
  &lt;li&gt;&lt;b&gt;ovsdb-tool showlog&lt;/b&gt;
  &lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;https://www.slideshare.net/rajdeep/openvswitch-deep-dive&quot; _target=_blank&gt;openvswitch deep dive&lt;/a&gt; on slide 14 and 15, shows relationship between commands and the daemons.  
    </content:encoded>

    <pubDate>Fri, 11 Aug 2017 16:29:44 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/789-guid.html</guid>
    
</item>
<item>
    <title>[ovs] libopenvswitch</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/780-ovs-libopenvswitch.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/780-ovs-libopenvswitch.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=780</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=780</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;A couple of interesting email list articles regarding libopenvswitch.  A recent one titled
&lt;a href=&quot;https://mail.openvswitch.org/pipermail/ovs-discuss/2017-July/045042.html&quot; target=_blank&gt;libopenvswitch in C++&lt;/a&gt;, which indicates there are some caveats:  most of all the word &#039;public&#039; used which is a c++ keyword.

&lt;p&gt;That article put me onto a search of other libopenvswitch articles, and this one came up: 
&lt;a href=&quot;https://mail.openvswitch.org/pipermail/ovs-dev/2016-January/307473.html&quot; target=_blank&gt;creating a libopenvswitch-dev package&lt;/a&gt;.  Which suggested there is quite a bit of work involved in 
producing a cohesive library.  

&lt;p&gt;In that article was a link to a detailed paper from 2011 by Intel called &lt;a href=&quot;https://software.intel.com/sites/default/files/m/a/1/e/dsohowto.pdf&quot; target=_blank&gt;How to Write Shared LibrariesK&lt;/a&gt;.  The paper covers the ELF structure, dynamic loader, the relocation process, as well as many C/C++ specific requirements.  The biggest reason for this link is having to do with the ABI (Application Binary Interface) and it&#039;s stability.

&lt;p&gt;2017/07/31 - Open source at work, things getting resolved quickly: &lt;a href=&quot;https://mail.openvswitch.org/pipermail/ovs-dev/2017-July/336426.html&quot; target=_blank&gt;a patch series&lt;/a&gt; 
    </content:encoded>

    <pubDate>Sun, 30 Jul 2017 13:04:45 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/780-guid.html</guid>
    
</item>
<item>
    <title> [ovs-discuss] Q: Using netfilter to classify packets in OVS </title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/772-ovs-discuss-Q-Using-netfilter-to-classify-packets-in-OVS.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/772-ovs-discuss-Q-Using-netfilter-to-classify-packets-in-OVS.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=772</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=772</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Question:

&lt;p&gt;&lt;blockquote&gt;I want to classify/match packets in OVS based on some TCP
options, this is currently not supported by OVS but it is supported by
netfilter. The support for ConnTrack left me wondering if I could use
netfilter to match that field and then use the result of that in OVS.
&lt;/blockquote&gt;

&lt;p&gt;Answer:

&lt;p&gt;&lt;blockquote&gt;
There&#039;s no native integration, but I could imagine that if Netfilter
ran on the packets first then modified the skb mark field, then OVS
ran later on that packet then plausibly you could match on the
pkt_mark.
&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Sun, 16 Jul 2017 23:10:48 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/772-guid.html</guid>
    
</item>
<item>
    <title>[ovs-discuss] remap double-tagged frame</title>
    <link>http://blog.raymond.burkholder.net/index.php?/archives/771-ovs-discuss-remap-double-tagged-frame.html</link>
            <category>Open vSwitch</category>
    
    <comments>http://blog.raymond.burkholder.net/index.php?/archives/771-ovs-discuss-remap-double-tagged-frame.html#comments</comments>
    <wfw:comment>http://blog.raymond.burkholder.net/wfwcomment.php?cid=771</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=771</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;&quot;You need to increase the vlan-limit to be able to match or pop multiple
VLAN tags. Otherwise the second tag is parsed as the Ethertype.&quot;

&lt;p&gt;e.g.

&lt;p&gt;&lt;blockquote&gt;# ovs-vsctl set Open_vSwitch . other_config:vlan-limit=2&lt;/blockquote&gt;

&lt;p&gt;and specify vlan mode for your port:

&lt;p&gt;ovs-vsctl set port vhu0fd9ab54-39 vlan_mode=dot1q-tunnel tag=5

&lt;p&gt;&lt;a href=&quot;https://github.com/openvswitch/ovs/blob/ef241d1e8675660b698839e624695da4ccf25e1b/vswitchd/vswitch.xml#L400&quot; target=_blank&gt;github.com/openvswitch/ovs&lt;/a&gt; 
    </content:encoded>

    <pubDate>Sun, 16 Jul 2017 23:04:18 +0000</pubDate>
    <guid isPermaLink="false">http://blog.raymond.burkholder.net/index.php?/archives/771-guid.html</guid>
    
</item>

</channel>
</rss>
