Skip to content

Reproducing Paper Results

Ramon Fontes edited this page Sep 29, 2016 · 96 revisions
To reproduce the results of the paper you have two alternatives:
  1. Virtual Machine: following the instructions in /home/mininetwifi/paper directory.

  2. Docker: following the instructions in /paper directory.

Click here to get a Virtual Disk or Docker Image


Case 1: [Video] (https://www.youtube.com/watch?v=_C4H2gBdyQY) (expected results from version 1.5r1)

  1. Get the code [here] (https://github.com/intrig-unicamp/mininet-wifi/blob/master/demos/allWirelessNetworksAroundUs.py)

  2. Execute the code

  3. mininet-wifi> xterm sta1 h1

  4. In station (sta1) terminal: cvlc -vvv v4l2:///dev/video0 --input-slave=alsa://hw:1,0 --mtu 1000 --sout '#transcode{vcodec=mp4v,vb=800,scale=1,acodec=mpga,ab=128,channels=1}: duplicate{dst=display,dst=rtp{sdp=rtsp://10.0.0.10:8080/helmet.sdp}'

  5. And finally in the host (h1) terminal: cvlc rtsp://10.0.0.10:8080/helmet.sdp


Case 1 - Simple test

 sudo mn --wifi  
 mininet-wifi>sta1 ping sta2  
 mininet-wifi>sta1 iwconfig  
 mininet-wifi>sta2 iwconfig  

Case 2 (1/2) - Communication among stations and hosts/Verifying flow table

 sudo python examples/wifiStationsAndHosts.py  
 mininet-wifi>nodes  
 mininet-wifi>sh ovs-ofctl dump-flows ap1  
 mininet-wifi>sta1 ping h3  
 mininet-wifi>sh ovs-ofctl dump-flows ap1  

Case 2 (2/2) - Changing the controller (from reference to external controller)

Open the code examples/wifiStationsAndHosts.py and make the following changes:

 from: net = Mininet( controller=Controller, link=TCLink, switch=OVSKernelSwitch )  
 to: net = Mininet( controller=RemoteController, link=TCLink, switch=OVSKernelSwitch )  
 from: c0 = net.addController('c0', controller=Controller, ip='127.0.0.1' )  
 to: c0 = net.addController('c0', controller=RemoteController, ip='127.0.0.1' )  

 sudo python examples/wifiStationsAndHosts.py  
 mininet-wifi>sta1 ping h3  #Why there is no communication?  

Case 3 - Handover

 sudo python examples/handover.py  
 mininet-wifi>sta1 iwconfig  
 mininet-wifi>sta1 ping sta2  #here I suggest you wait sta1 reaches ap2 before going to the next step
 mininet-wifi>sta1 iwconfig  

In this case you will see a picture like below:

Case 4 - Changes at runtime

 sudo python examples/wifiPosition.py  
 mininet-wifi>sta1 iwconfig   
 mininet-wifi>sta1 ping sta2  
 mininet-wifi>py sta1.moveStationTo('70,40,0')  
 mininet-wifi>sta1 iwconfig  
 mininet-wifi>sta1 ping sta2  
 mininet-wifi>py ap1.setRange(60)  
 mininet-wifi>sta1 iwconfig  
 mininet-wifi>sta1 ping sta2  

In this case you will see a picture like below:

Case 5 - Bridging physical and virtual emulated environments

 sudo systemctl stop network-manager
 Open demos/sbrc.py and change:
 from: phyap1 = net.addPhysicalBaseStation( 'phyap1', ssid= 'SBRC16-MininetWiFi', mode= 'g', channel= '1', position='50,115,0', wlan='wlan11' )  
 to: wlan11 to your usb wlan interface.  
 sudo python demos/sbrc.py  

At this moment users attending the conference will be invited to connect their mobile devices into the physical/emulated environment.

In this case you will see a picture like below:


Paper - (In Progress)

Case 1 (Multipath TCP): You have to install [mptcp] (http://www.multipath-tcp.org) and ifstat to reproduce this use case. In order to allow the communication we used pox controller with spanning tree enabled.

This command can be used to enable spanning tree:

./pox.py forwarding.l2_learning openflow.spanning_tree --hold-down log.level --DEBUG samples.pretty_log openflow.discovery host_tracker info.packet_dump

Starting the environment:
 sudo python demos/mptcp.py   
 mininet-wifi>xterm sta1 h10  
 mininet-wifi>sta1 ifstat  
In h10 terminal:
 iperf -s  
In sta1 terminal:
 iperf -c 192.168.1.254    
Topology:

topology

Expected results:

iperf


Paper - (In Progress) - Video

Note: We have noticed that for some reason the AP stops working after few minutes from the moment that a mobile device is connected to the AP attached to the VM. So, we update the code in order to allow you reproduce this case using the host instead of VM.

####Requirements to reproduce:

  1. (no need anymore) You have to use a Virtual Machine - one interface mode nat enabled.
  2. USB WiFi dongle - attached to the Virtual Machine (attached to the host in the current code)
  3. Floodlight OpenFlow controller - latest version
  4. ofsoftswitch13 - https://github.com/CPqD/ofsoftswitch13
  5. Speedtest-cli
  6. It is a good idea disable the network manager (service network-manager stop)

####Important (changes in the code):

  • You have to set the wlan interface created by your USB WiFi dongle:
    e.g. phyap1 = net.addPhysicalBaseStation( 'phyap1', ssid= 'ap-ssid1', mode= 'g', channel= '6', position='170,185,0', wlan='wlan1' )
  • You have to set the wlan that is connected to the Internet:
    e.g. net.addOfDataPath('ap3', 'wlan0')

  1. Getting the code [here] (https://github.com/intrig-unicamp/mininet-wifi/blob/master/demos/hybridVirtualPhysical.py)
  2. Executing the Floodlight OpenFlow controller: java -jar target/floodlight.jar
  3. Executing the code: sudo py hybridVirtualPhysical.py
  4. Now, stations should be able to communicate with the Internet
  5. You can use any station connected to any Access Point and try it out:
    mininet-wifi>xterm staX and run speedtest-cli - Using speedtest-cli you test Download and Upload speed of your internet connection. The available bandwidth is controlled by OpenFlow meter entries.
  6. You can use any mobile device to communicate with stations in Mininet-WiFi and also the Internet if the device is associated to the Access Point.
Clone this wiki locally