<div dir="ltr"><div>Hello,</div><div><br></div>I want to use the same idea as the following link:<div><br></div><div><a href="https://techandtrains.com/2014/02/08/running-open-vswitch-in-network-namespace/">https://techandtrains.com/2014/02/08/running-open-vswitch-in-network-namespace/</a><br></div><div><br></div><div><br></div><div>But I still have a problem to trace packets. Is there any other way to trace packets in OVS? </div><div><br></div><div>Thanks</div><div><br></div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 1, 2018 at 12:23 PM, Ben Pfaff <span dir="ltr">&lt;<a href="mailto:blp@ovn.org" target="_blank">blp@ovn.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oh, and why are you running multiple instances of OVS?  It&#39;s unusual.<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Feb 01, 2018 at 09:22:31AM -0800, Ben Pfaff wrote:<br>
&gt; The rundir for OVS and for ovs-appctl should match.  You can do that by<br>
&gt; defining OVS_RUNDIR in the environment for each one, otherwise you end<br>
&gt; up having to give full paths.<br>
&gt;<br>
&gt; On Thu, Feb 01, 2018 at 11:09:42AM -0500, Myra Sh wrote:<br>
&gt; &gt; Thank you for your reply.<br>
&gt; &gt;<br>
&gt; &gt; I tried:<br>
&gt; &gt;  OVS_RUNDIR=$(pwd)<br>
&gt; &gt; exportOVS_RUNDIR<br>
&gt; &gt; in all nodes.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; After that,when I run for example: *&quot;ovs-appctl  ofproto/trace br1<br>
&gt; &gt; in_port=1&quot;* on bridge1, I receive the following message:<br>
&gt; &gt;<br>
&gt; &gt; *WARN|failed to connect to .../n1.conf/ovs-vswitchd.50.<wbr>ctl*<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; there is no ovs-vswitch.50.ctl in $(pwd) directory.<br>
&gt; &gt;<br>
&gt; &gt; I found *ovs-vswitchd.50.ctl* in */usr/local/var/run/<wbr>openvswitch/ *directory<br>
&gt; &gt; and after that:<br>
&gt; &gt;<br>
&gt; &gt; *ovs-appctl  -t  /usr/local/var/run/<wbr>openvswitch/ ovs-vswitchd.50.ctl<br>
&gt; &gt; bridge/dump-flows br1 *<br>
&gt; &gt;<br>
&gt; &gt; result:<br>
&gt; &gt;<br>
&gt; &gt; *unknown bridge*<br>
&gt; &gt; *ovs-appctl: /usr/local/var/run/<wbr>openvswitch/ ovs-vswitchd.50.ctl :server<br>
&gt; &gt; returend an error*<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; the mentioned command only works on a specific bridge(br3).<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; So I guess I should try to find the correct  ovs-vswitchd.*.ctl for each<br>
&gt; &gt; bridge but it&#39;s not reasonable when I have several OVSs.<br>
&gt; &gt;<br>
&gt; &gt; Do you have any suggestion in this case?<br>
&gt; &gt;<br>
&gt; &gt; Is there any other way to trace the packets in OVS?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Wed, Jan 31, 2018 at 4:15 PM, Ben Pfaff &lt;<a href="mailto:blp@ovn.org">blp@ovn.org</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; On Wed, Jan 31, 2018 at 02:53:25PM -0500, Myra Sh wrote:<br>
&gt; &gt; &gt; &gt; Hello,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I run several instances of OVS and I am using the following command and<br>
&gt; &gt; &gt; &gt; path to configure them:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; ovs-vsctl --db=unix:$(pwd)/db.sock add-br br0<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; The problem in having several instances is that when I want to run<br>
&gt; &gt; &gt; &gt; &quot;ovs-appctl ...&quot; to trace packets, I have to define a path or target for<br>
&gt; &gt; &gt; &gt; this command.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Do you have any suggestion that how I can define this target path for<br>
&gt; &gt; &gt; each<br>
&gt; &gt; &gt; &gt; OVS in the mentioned scenario?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Should I check for any ovs-vswitch.*.ctl file and put that in the target<br>
&gt; &gt; &gt; &gt; part?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; It sounds like you should run something like &quot;OVS_RUNDIR=$(pwd); export<br>
&gt; &gt; &gt; OVS_RUNDIR&quot;.<br>
&gt; &gt; &gt;<br>
</div></div></blockquote></div><br></div></div>