Tutorials

Introduction and getting started

See the introduction slides of the workshop held at May 21st: Tutorials_introduction.pptx

In the first tutorial (TutorialPart1.pptx), the goal is to have a working account and environment on your own PC for the next tutorials. Basically, we follow the first part of http://doc.fed4fire.eu.

In the second tutorial (TutorialPart2.pptx), we get more insight in what actually happens behind the scenes, and we learn about the following concepts:

  • RSpec
  • Aggregate Manager API (AM API)
  • Stitching

The second part of this tutorial is again a hands-on exercise, and now we make a difference between an exercise on w-iLab.t (wireless experiment) and an exercise on the Virtual Wall (wired experiment) as can be seen below.

After that you can follow two more advanced tutorials:

  • A tutorial on Openflow making use of software based switches on the Virtual Wall, see here
  • A tutorial on experiment automatisation using OMF, OML and Labwiki, see here

w-iLab.t tutorial: Access point and client

The accompanying slides can be downloaded here: TutorialPart2_wilabt.pptx

In this tutorial, we will show you how to set up one wireless access point and connect with 1 client. The access point will start an iPerf server instance, after which we will run an iPerf client instance on the second node. By using the correct IP addresses, we make sure that the iPerf traffic stream is routed over the wireless interfaces.

The following steps should guide you through the entire process

Reserve 2 wireless nodes using jFed

Your tutor will give everyone the names of 2 nodes you can choose in jFed by right clicking the node. Name them: ap and client in jFed.

Configure the access point

Before running the experiment, we will use the shell script option in the RSpec to install hostapd. Go to the Raw RSpec view and add the following in the node part of the ap (first line is already there):

<sliver_type name="raw-pc"/>
<services>
     <execute shell="sh" command="sudo apt-get update ; sudo apt-get install hostapd"/>
</services>

Note: it should be valid XML, so if you want to use &&, then escape it. See http://fed4fire-testbeds.ilabt.iminds.be/ilabt-documentation/urnsrspecs.html#install-software-when-provisioning-and-run-a-script-after-provisioning for more examples.

Configuration of Access Point

Become root:

sudo su

Create a config file for the hostapd program:

nano /root/hostapd.conf

Add the following content to the config file (choose a unique name foor ssid, choose other channel, lines should be left aligned):

interface=wlan0
driver=nl80211
country_code=BE
ssid=iperfAP
hw_mode=g
channel=6

Start hostapd. The above config will setup an AP on wlan0 using 802.11g, channel 6, with SSID iperfAP:

hostapd /root/hostapd.conf

Open a second ssh terminal and give an IP address to the wlan0 interface so we can test the connection to the clients (in the next steps):

ifconfig wlan0 192.168.1.1/24

Configure the client

Become root:

sudo su

Put the wireless interface into managed mode and specify the SSID so it knows to which AP it should connect

iwconfig wlan0 mode managed
iwconfig wlan0 essid iperfAP

Specify an IP address and bring up the interface:

ifconfig wlan0 192.168.1.10/24 up

Check if you can ping the AP:

ping 192.168.1.1

iPerf measurement

Start an iPerf server instance (UDP in this case) on the AP:

iperf -s -u -i 1

Configure the iPerf client:

iperf -u -c 192.168.1.1 -b 20M -i 1

By tweaking the transmit power (values of 0 to 20dBm) of the access point, you should be able to see a difference in throughput of the iPerf stream:

iwconfig wlan0 txpower <0-20>

Note that each antenna at the w-iLab.t is equipped with a 10dB attenuator (so 20dB attenuation per link).

Virtual Wall tutorial: server and client with network latency

The accompanying slides can be downloaded here: TutorialPart2_virtualwall.pptx

In this tutorial, we will show you how to set up a client and server node, with layer 2 network in between with a certain latency. The server will run an iPerf server instance, after which we will run an iPerf client instance on the second node. By using the correct IP addresses, we make sure that the iPerf traffic stream is routed over the dedicated layer 2 network.

The following steps should guide you through the entire process

Reserve 2 nodes on the virtual wall using jFed

Just drag in 2 physical nodes. (note everything works also with Xen VMs, but only on Virtual Wall 2 we have dedicated servers for this)

Right click on the link to add e.g. 100ms latency.

Configure the server in the RSpec

Before running the experiment, we will use the shell script option in the RSpec to install iperf. Go to the Raw RSpec view and add the following in the node part of the ap (first line is already there):

<sliver_type name="raw-pc"/>
<services>
     <execute shell="sh" command="sudo apt-get update ; sudo apt-get install iperf"/>
</services>

Note: it should be valid XML, so if you want to use &&, then escape it. See http://fed4fire-testbeds.ilabt.iminds.be/ilabt-documentation/urnsrspecs.html#install-software-when-provisioning-and-run-a-script-after-provisioning for more examples.

Configure the IP address:

<interface client_id="node0:if0">
  <ip address="10.0.1.1" netmask="255.255.255.0" type="ipv4"/>
</interface>

Configuration of the client in the RSpec

Do the same RSpec edit but now give the client 10.0.1.2 as IP address.

Running the experiment

Run the experiment in jFed and wait till the nodes become green.

Open a terminal on server and client and become root:

sudo su

Check if you can ping:

ping 10.0.1.2  (or ping client)

iPerf measurement

Start an iPerf server instance (TCP in this case) on the server:

iperf -s -i 1

Configure the iPerf client:

iperf -c 10.0.1.1 -i 1

If you have a small latency, you will reach normally 1Gb/s, with larger latencies you will have less (TCP window size too small).

Latency

If you used an impairment bridge, you can login with ssh on that bridge (FreeBSD) from client or server, or if you turn on the SSH proxy in jFed. (the bridge does not have an IPv6 address).

If you didn’t used a bridge, impairment is done with tc on the nodes itself:

Check /var/emulab/boot/rc.linkdelay
or: tc qdisc show

Tutorial Openflow on the Virtual Wall

Thanks to GENI (http://www.geni.net), we can use a tutorial they have done there: http://groups.geni.net/geni/wiki/GEC19Agenda/IntroToOFPox

Specifics:

URL for RSpec: http://jfed.iminds.be/ovs.rspec (can be opened directly in jFed with Open URL)

URL for a FOAM RSpec: http://jfed.iminds.be/openflow.rspec

Tutorial on OMF, OML and Labwiki

Download the presentation here: OMF-OML-Labwiki.pptx