User Tools

Site Tools


assignment-2

What will you be learning in this Assignment:

  1. About CMUEmulab wireless emulator: You will learn to perform realistic and repeatable wireless experimentation by accurately emulating wireless signal propagation in physical space by using the CMUEmulab emulator. The emulator uses real wireless nodes, so it is more accurate than simulation. However, since signal propagation is emulated, it provides full control over experiments, unlike wireless testbeds where control and repeatability are hard to achieve. As a result, the wireless emulator provides an attractive middle ground between pure simulation and wireless testbeds.This assignment will provide you enough detailed steps to help you use the emulator for performing the specific experiment we are going to do without learning much about its setup. But you are encouraged to learn more about the emulator from its documentation web page and its user manual before starting this assignment so that you will be in a position to “just run the experiment” and not “spend time to learn how to run the experiment” after you allocate physical resources in the emulator for you experiment. Specifically , spend time reading the following sections :
    1. Read the “Defining Experiments” section in http://www.cs.cmu.edu/~emulator/doc/index.html
    2. Read about “Path based Channel Mode” and “Loss Model” from http://www.cs.cmu.edu/~emulator/doc/softwareDoc/SignalEnvironment.html . Skim through the rest of the page.
    3. Read the Javadoc for the Emulator API - http://www.cs.cmu.edu/~emulator/doc/api/index.html.
  2. Effect of physical distance on data transfer performance: In this experiment you will study the impact of physical separation between a transmitter and a receiver on their data performance. The physical distance will be emulated using CMUEmulab. A sample experiment program has already been written out for you. You will have to first run the sample experiment provided and play around with the emalator testbed. Then you will have to build on the sample experiment by writing code in Java to measure the effect of distance between wireless nodes on data transfer rates and present them as a graph.

Pre-requisites for this assignment:

  1. Username , Password : These will be given to you by the TA during class on Oct 03, 2008.
  2. A computer with ssh facility ( you can use putty from a windows machine )

Part A: Setting up the emulator before you can run the experiment on it

Step 1 : Creating an Account:

  1. Go to http://boss.cmcl.cs.cmu.edu and complete the registration form by clicking the Request Account icon on the left. In the page that shows up, click on “Join an Existing Project”. In the next page that shows up, use the team name for username. Create your own password string. (E.g. username for Team 1 will be “team1” and password can be 'T3am1'). And use the email address of one of the team members. You should use “emulator” for the 'Project Name' field. You can upload your ssh key later. Note: From now, whenever you want to login to CMUEmuLab web page at http://boss.cmcl.cs.cmu.edu , you will use the password you just created. But, to login to emucontrol-1.ece.cmu.edu host ( as you go forward in the assignment) you will be using your team name ( like 'team1' ) as password.
  2. Check your email for an account message, and click on the verification link to confirm that you requested the account.
  3. Log in on http://boss.cmcl.cs.cmu.edu using your account to complete the account request process.
  4. Check your email again - you will receive an email saying that your account is ready.

Step 2: Setting up your Account :

  1. Go to https://boss.cmcl.cs.cmu.edu/showuser.php3#E and generate an SSL Certificate.
  2. Login to emucontrol-1.ece.cmu.edu with your username and password using command “ssh <username>@emucontrol-1.ece.cmu.edu”. And execute the following commands from your home directory:
    1. “scp -r ops.cmcl.cs.cmu.edu:~/.ssl .”
    2. “cp ~arulraj/.bashrc ~/.bashrc”
    3. “cp -r ~xiaohuiw/emulab/run/examples .” : This folder has more example experiments that try to teach different parts of the emulator.
    4. “cp ~arulraj/experiment.tgz .” : This is the experiment that we will be running . Read the files in this archive:
      1. The experiment.xml file is the script describing our experiment setup. Details on scripts can be found at http://www.cs.cmu.edu/~emulator/doc/scripts/Scripts.html.
      2. The experiment.java file is the user code describing what will be done as part of the experiment. The experiment.java file is self explanatory with comments and more details on user code can be found at http://www.cs.cmu.edu/~emulator/doc/softwareDoc/UserCode.html. After any change to the experiment.java file , you should compile the .java file by using the command “javac experiment.java” which will produce experiment.class .
      3. The 2node.ns file describes about the physical layout of the experiment. It describes what nodes we need, what we want to name them, and which IP addresses shall we assign to them. The 2node.ns file is mostly self-explanatory. You can find more details on tb commands at http://boss.cmcl.cs.cmu.edu/tutorial/docwrapper.php3?docname=nscommands.html and about wireless setting at https://boss.cmcl.cs.cmu.edu/tutorial/docwrapper.php3?docname=wireless.html#LinkConfig.
  3. Now login to ops.cmcl.cs.cmu.edu with your username and password using command “ssh <username>@ops.cmcl.cs.cmu.edu”. And execute the following commands from your home directory:
    1. “cp ~arulraj/.cshrc ~/.cshrc”
    2. “cp -r ~xiaohui/emuNode .”
  4. Create file in the computer in which you are working and copy the contents of the file /home/<username>/.ssh/id_rsa.pub from emucontrol-1.ece.cmu.edu into it. Do the copy carefully so that you do not edit the contents by mistake while copying. Now go to “https://boss.cmcl.cs.cmu.edu/showpubkeys.php3” and upload the file you just created in the Upload ssh key area. Now from emucontrol-1.ece.cmu.edu , type command “ssh ops.cmcl.cs.cmu.edu”. You should be able to login without entering password. If so, you have completed this step successfully.

Part B: Running the experiment and collecting data

Note:

  1. Remember to swap out the experiment after your finish so that the wireless nodes are released and can be used by other teams. This is very important because there are only 10 wireless nodes available in total.
  2. As you are performing this section, if you have any doubts or run into trouble , you might want to look at http://www.cs.cmu.edu/~prs/wireless08/tutorial01.html which gives a more detailed description of how to setup and run an experiment on the emulator testbed. If you still have trouble , then feel free to email CS707 TAs ( cc the class email list if you see fit.)

Step 3: Setting up the Experiment:

  1. Check if 2 or more pcd610 nodes are free at https://boss.cmcl.cs.cmu.edu/shownodetype.php3?node_type=pcd610. If so, proceed to Step 3 , otherwise wait and come back later until you see 2 or more nodes free.
  2. Go to https://boss.cmcl.cs.cmu.edu/beginexp_html.php3 and create an experiment by:
    1. Enter <username>-exp001 in username field. Substitue <username> with your real username. For example, I will enter arulraj-exp001
    2. Enter “assignment 1 - University of Wisconsin Students” in the description field.
    3. Download archive experiment.tgz using command “scp <username>@emucontrol-1.ece.cmu.edu:~arulraj/experiment.tgz”. Select the 2node.ns file from the downloaded archive and upload in the field “Your NS file”
    4. Change Linktest Option to “Skip Linktest”
    5. Enter 1 hours in the “Idle Swap feild” and 2 hours in “Max Duration” field.
    6. Click Submit
    7. Watch the console that shows up. You will be able to see when the assignment is swapped in. Also, you will get an email confirmation of the same.

Step 4: Running the experiment:

Once the experiment starts , you will have 2 hours to complete the experiment ( since we specifed 3 hrs in Max Duration field while setting up the experiment Step 3-(ii)-e above. Follow these steps to run the experiment:

  1. Login to emucontrol-1.ece.cmu.edu and type the command “emulatorDaemon <username> emulator <experimentname>”. This command will complete the swap in process. This step is very important.
  2. Login to the nodes allocated in this experiment (Note : You should first login to ops.cmcl.cs.cmu.edu and then login to the wireless nodes from there otherwise the domain names for the wireless nodes won't be resolved) by “ssh <username>@nodew1.leo-exp001.emulator.cmcl.cs.cmu.edu” and “ ssh <username>@nodew2.leo-exp001.emulator.cmcl.cs.cmu.edu”. In each of the nodes, run the command : “/opt/jdk1.6.0_05/bin/rmiregistry &” and “ ~/emuNode/nodeDaemon”. You should see some output like “NodeDaemon bound”. Now each of the wireless nodes has a the NodeDeamon on them bound to the emucontrol-1 which waits for commands to execute on the wireless nodes.
  3. Login to emucontrol-1.ece.cmu.edu and change your current directory to the directory where you expanded the archive experiment.tgz that we downloaded earlier in Step 2-(ii)-(d).
  4. Compile experiment.java into experiment.class using the command “javac experiment.java”
  5. Run the command “emuRun experiment.xml” . This will emulate the experiment and write out results into files in the same directory. The output files all have names starting with exp01. Most of the stderr files created will usually be empty and you can delete such empty file using the command “ find -size 0 -delete” so that you can concentrate on the rest of the non-empty files that have the iperf command output with data transfer rates. Take a look at the result files.
  6. Now change the experiment.java file so that you can gather enough data to present on how distance of separation between wireless nodes affect the data transfer rates.
  7. Once you have completed executing the experiment, we will have to swap out the experiment so that the physical resources held by this experiment are released for use by others. For this, go to the https://boss.cmcl.cs.cmu.edu/ and click on “My Emulab” link under “Experimentation tab”. On the page that shows up, click on the EID link and you will be taken to the experiment page. Click on Swap “Experiment Out” link on the left menu. Once the swap out completes, login to emucontrol-1.ece.cmu.edu and type the command “emulatorDaemon <username> emulator <experimentname>”. This command will complete the swap in process. This step is very important.
  8. Present your results in a tabular format or a 2D graphical format which has “distance of separation” between two nodes along one axis and “data transfer rate” along another.

Part C: What to hand-in ?

  1. You have to hand in your modified java file (built on top of the sample experiment.java) which you used to perform the experiment and to collect the data presented in the graph with sufficient documentation of your approach.
  2. You also have to hand in the result you gathered through the experiment in a tabular format/graphical format.
assignment-2.txt · Last modified: 2008/10/10 19:32 by arulraj