1
votes

I am new to mininet and SDN. Following is an issue I came across while exploring iperf command.

1) Set up a topology with three hosts and a user-space switch with following command:

$ sudo mn --topo single,3 --mac --controller remote --switch user

2) No flow routes have been added.

3) Run a reference controller (POX) with following command:

$ controller ptcp:

4) iperf testing with following command:

mininet> iperf (on mininet console)

Error #1: iperf testing fails because flow routes are not defined. This is followed by a complete cleanup.

5) To fix this, I tried to add flow route with following command:

$ ovs-ofctl add-flow s1 in_port=1,actions=output:2

Error #2: I get following error message:

ovs-ofctl: s1 is not a bridge or a socket

Can anyone tell me what is my mistake? How can I fix this?

Reference: https://github.com/mininet/openflow-tutorial/wiki/Learn-Development-Tools

5
any updates on this? I have the same problem - cozyconemotel

5 Answers

1
votes

Try this: controller ptcp:6633

If that doesn't work let me know what the output is.

I fell good about that controller command. Go to pox directory and try this:

./pox.py forwarding.tutorial_l2_hub

I assumed that you have pox already installed if you dont follow either of the instructions here:

  1. This uses presetup VM: http://sdnhub.org/tutorials/pox/
  2. Directly cloning it:

    $ git clone http://github.com/noxrepo/pox
    $ cd pox

I hope it helps. Let me know if you need more help.

Some usefull resources: https://openflow.stanford.edu/display/ONL/POX+Wiki#POXWiki-InstallingPOX

0
votes

Also remember that based on user account privilege you may need to use sudo before the command. So if something doesn't work try it with sudo as well.

Have a look at following output. let me know what part is different.

ubuntu@sdnhubvm:~/pox[14:38] (eel)$ ls 
debug-pox.py@  LICENSE  pox/     README     tests/
ext/           NOTICE   pox.py*  setup.cfg  tools/
ubuntu@sdnhubvm:~/pox[14:38] (eel)$ pwd
/home/ubuntu/pox
ubuntu@sdnhubvm:~/pox[14:38] (eel)$ git remote -v
origin  http://github.com/noxrepo/pox (fetch)
origin  http://github.com/noxrepo/pox (push)
ubuntu@sdnhubvm:~/pox[14:38] (eel)$ ./pox.py forwarding.tutorial_l2_hub
POX 0.5.0 (eel) / Copyright 2011-2014 James McCauley, et al.
INFO:core:POX 0.5.0 (eel) is up.
0
votes

Use xterm h1 then call iperf -s or iprf -c.

0
votes

Running iperf by itself in the topology in the tutorial attempts to run the test between h1 and h3. You need to create the flow entries between those two hosts:

dpctl add-flow tcp:127.0.0.1:6634 in_port=3,idle_timeout=120,actions=output:1

dpctl add-flow tcp:127.0.0.1:6634 in_port=1,idle_timeout=120,actions=output:3

Change the timeouts from 120 to something higher if you want. iperf should run just fine after this.

0
votes

I also got

ovs-ofctl: s1 is not a bridge or a socket

It disappeared when I executed

mininet@mininet-vm:~$ export XAUTHORITY=~/.Xauthority