Running Experiments

Creating and activating an experiment is a two-step process: resource allocation and configuration through CMUlab and "swap-in"the experiment. We describe these two steps on this page, focussing on setting up and being prepared to execute existing experiments such as these examples.

Create an Experiment on CMUlab

As mentioned earlier, we use the Emulab software from the University of Utah to manage the laptops in emulator. The Emulab software, called CMUlab in CMU, allocates the laptops to user experiments and also offers a number of additional features, e.g. NFS for storing experimental results and the ability to install your own kernels. Cmulab uses NS scripts to define experiment so you will need to create an NS script to allocate the resource for your experiment, such as number of laptops needed, desired properties of the laptops (e.g. support for multipath, software radios, etc.), the laptop names, which OS image should be loaded for each laptop, etc.. Please refer to the CMULab documentation for how to create an NS file:

Here is an example NS script which defines a two-node network on the emulator:

set ns [new Simulator] source tb_compat.tcl # Allocate the nodes. Their "wifi-ness" is determined later, # by the type of networks you request to be set up on them. set nodew1 [$ns node] set nodew2 [$ns node] # Specify that you need "wireless_1" nodes. This is a new requirement. $nodew1 add-desire wireless_1 1.0 $nodew2 add-desire wireless_1 1.0 # A wireless lan connecting the first three nodes. set lan0 [$ns make-lan "$nodew1 $nodew2" 54Mb 0ms] # Choose the wireless lan protocol. tb-set-lan-protocol $lan0 "80211g" # Set an access point. This node becomes the access point; # others in the LAN become stations of it. # tb-set-lan-accesspoint $lan0 $nodew1 1 # You can also set other modes for your LAN, such as Adhoc mode. tb-set-lan-setting $lan0 "mode" "adhoc" #Choose some other settings. tb-set-lan-setting $lan0 "channel" 6 #tb-set-lan-setting $lan0 $nodew1 "txpower" "auto" # Select a wireless-capable image (i.e., FC6-WIRELESS) # Let the other node default to RHL-STD (currently 9.0). 2 tb-set-node-os $nodew1 FC6w-EMU-03Sep2009v3 tb-set-node-os $nodew2 FC6w-EMU-03Sep2009v3 set emucout [new Program $ns] $emucout set node "ops" $emucout set command "/usr/testbed/bin/ectl out" $ns at swapout "$emucout start" set emucin [new Program $ns] $emucin set node "ops" $emucin set command "/usr/testbed/bin/ectl in" $ns at 0 "$emucin start" $ns rtproto Static $ns run


  1. We provide a small set of commands to configure the wireless interfaces on the laptops, as described in Configure Nodes. However, it is also possible to configure the interfaces from your ns-2 script. For more information, see CMUlab documentation.
  2. You are allowd choose which OS you would like to be preloaded when your experiment starts. The suggested image for the Dell laptops is FC6w-EMU-03Sep2009v3. This image is a modified Fodera Core 2.6 with Java and madwifi0.9.4 driver installed.

The blocks of commands starting with "set emucin"/"set emucout" and ending with "$ns at" schedule commands that do some initial configuration of the laptops and help prepare the FPGA for use, as well as undo those changes when the experiment is finished. It is important to include these in your ns files - otherwise the wireless emulation may not perform as expected.

If you try to use USRP, the suggested image is "gnuradio1". This is based on Fodera Core 2.6 with revision 9503 of the GNU Radio SVN trunk. The location of the gnuradio code on the disk image is in /usr/local/src/gr_trunk.

Also, you are allowed to create your own OS image as well. Check the CMUlab documentation here.

To define and activate an experiment, you will need to execute the following steps:

As most complicated experiments need to remotely start applications on laptops from emucontrol-1, and/or redirect the output to emucontrol-1(centralized IO), a remote RMI server can be started on each laptop. This requires modification to this file "/usr/tmp/<userID>.swapin", and starting a node daemon for each laptop. Details will be explained in Instructions on Running Experiments on the Emulator.

Swap out an Experiment

In order to share CMUlab resources, we encourage users to swap out the experiment when they are done. To swap out an experiment, first go to CMUlab website and click:
	  "Emulator"->"Experimentation"->"Swap out" 
Check email to confirm the experiment is swapped out.