Thursday, November 21, 2024

youtube

   
Text Size

How to run a simple experiment via OMF in the testbed

We describe here how a user can run a simple iperf experiment via OMF in our testbed. This guide assumes that the user has already followed all the required preliminary steps of booking nodes, loading images, etc. These steps are described in the Basic Tutorial section.

Describing the experiment

In order to run an experiment via OMF, the user must provide an experiment script. OMF experiment scripts are written in OEDL (OMF Experiment Description Language), a domain-specific Ruby-based high-level language. In this guide we demonstrate a simple example script and then explain what's going on. Suppose that a user wants to run the iperf application on two nodes of the testbed in order to create some udp_traffic between them and measure the bandwidth and the packet delivery ratio. That's how it can be done through an OMF experiment script.

defGroup('Sender',"omf.nitos.node001"){|node|
node.addPrototype("test:proto:iperfudpsender", {
'port'=>5000,
'client'=>"192.168.1.9",
'use_udp'=>true
})
node.net.w0.mode = "adhoc"
node.net.w0.type = 'g'
node.net.w0.channel = "6"
node.net.w0.essid = "iperftest"
node.net.w0.ip = "192.168.1.1"
}

defGroup('Receiver',"omf.nitos.node009"){|node|
node.addPrototype("test:proto:iperfudpreceiver", {
'port'=>5000,
'use_udp'=>true,
'server'=>true
})
node.net.w0.mode = "adhoc"
node.net.w0.type = 'g'
node.net.w0.channel = "6"
node.net.w0.essid = "iperftest"
node.net.w0.ip = "192.168.1.9"
}

onEvent(:ALL_UP_AND_INSTALLED) {|event|
wait 10
allGroups.startApplications
wait 30
allGroups.stopApplications
Experiment.done
}

An OMF experiment script is divided into two parts:

  • Resource requirements and configuration section:
    This is where we declare the resources to be used in our experiment and make the necessary configurations.
  • Task description section:
    This is where we describe the desired sequence of actions to take place in our experiment.

In our example, the two defGroup methods belong to the first section and the rest of the code to the second section.

The defGroup method is used to declare a group of nodes which share some common properties. We give the group a name and list the nodes which belong to this group. Here each group contains a single node. If we wanted to list multiple nodes, for example nodes 1,3 and 4 of our testbed, we would write ["omf.nitos.node001","omf.nitos.node003","omf.nitos.node004"] as the second argument of defGroup. Within the curly braces we place some common configuration actions to take place for the nodes of the group.
First we assign a prototype to the group, by defining the path to the prototype and providing a hash with values for the options. Prototypes are essentially wrappers around existing popular network traffic applications. For example, iperfudpsender is a prototype around the iperf application, providing the options available when we send UDP traffic through iperf. A complete list of the available options for all the prototypes around iperf will be provided towards the end of this tutorial.
Then we provide the desired configurations for the wireless interfaces of the nodes of the group. The syntax "node.net.w0" means "the first wireless interface of each node in the group".

In the task description part of the script, we describe a course of actions to be taken when all the configurations have been made and the applications have been successfully installed (that is what "whenAllInstalled()" means). Here we wait 10 seconds, then run the applications on all the nodes of all the groups and after 30 seconds we stop the applications and mark the end of the experiment.

Iperf-related OMF prototypes and their options

test:proto:iperfudpsender

Options:

Name Description Default Value
use_udp Protocol to use true
client Host to send packets to "localhost"
sender_rate Number of bits per second 25500000
port Port to send packets to 5001
time Experiment duration (sec) 10  

test:proto:iperfudpreceiver

Options:

Name Description Default Value
use_udp Protocol to use true
server Client/Server true
port Port to listen on No default value
time Duration of experiments (seconds) 10
report_interval Interval between bandwidth reports 1  

test:proto:iperftcpsender

Options:

Name Description Default Value
client Host to send packets to No default value
len Size of packets No default value
window TCP window size (bytes) 64000
time Experiment duration (sec) 10  

test:proto:iperftcpreceiver

Options:

Name Description Default Value
server Client/Server true
port Port to listen on 5001
time Duration of experiments (seconds) 10
window Receiver window size 64000
report_interval Interval between reports 1  

References

http://omf.mytestbed.net

Who's Online

We have 64 guests and no members online

VIDEO DEMONSTRATIONS