title: Mininet: iperf fails + can't add flows in user-space switch
body: <p>I am new to mininet and SDN. Following is an issue I came across while exploring iperf command.</p>
  
  <p>1) Set up a topology with three hosts and a user-space switch with following command:</p>
  
  <pre><code>$ sudo mn --topo single,3 --mac --controller remote --switch user
  </code></pre>
  
  <p>2) No flow routes have been added.</p>
  
  <p>3) Run a reference controller (POX) with following command:</p>
  
  <pre><code>$ controller ptcp:
  </code></pre>
  
  <p>4) iperf testing with following command:</p>
  
  <pre><code>mininet&gt; iperf (on mininet console)
  </code></pre>
  
  <p><strong>Error #1:</strong> <code>iperf</code> testing fails because flow routes are not defined. This is followed by a complete cleanup. </p>
  
  <p>5) To fix this, I tried to add flow route with following command:</p>
  
  <pre><code>$ ovs-ofctl add-flow s1 in_port=1,actions=output:2
  </code></pre>
  
  <p><strong>Error #2:</strong> I get following error message:</p>
  
  <pre><code>ovs-ofctl: s1 is not a bridge or a socket
  </code></pre>
  
  <p>Can anyone tell me what is my mistake? How can I fix this?</p>
  
  <p>Reference: <a href="https://github.com/mininet/openflow-tutorial/wiki/Learn-Development-Tools" rel="nofollow">https://github.com/mininet/openflow-tutorial/wiki/Learn-Development-Tools</a></p>