This is an old revision of the document!
__**What will you be learning in this Assignment:**__ - 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 : - Briefly skim http://www.cs.cmu.edu/~emulator/doc/softwareDoc/CodeStructure.html - Read the “Defining Experiments” section in http://www.cs.cmu.edu/~emulator/doc/index.html - 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. - Read the Javadoc for the Emulator API - http://www.cs.cmu.edu/~emulator/doc/api/index.html. - 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:**__ - Username , Password : These will be given to you by the TA during class on Oct 03, 2008. - 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:__ - Go to http://boss.cmcl.cs.cmu.edu and complete the registration form by clicking the Request Account icon on the left. You should join the “emulator” project. You can upload your ssh key later. - Check your email for an account message, and click on the verification link to confirm that you requested the account. - Log in on http://boss.cmcl.cs.cmu.edu using your account to complete the account request process. - Check your email again - you will receive an email saying that your account is ready. __Step 2: Setting up your Account :__ - Go to https://boss.cmcl.cs.cmu.edu/showuser.php3#E and generate an SSL Certificate. - 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: - “scp -r ops.cmcl.cs.cmu.edu:~/.ssl .” - “cp ~arulraj/.bashrc ~/.bashrc” - “cp -r ~xiaohuiw/emulab/run/examples .” : This folder has more example experiments that try to teach different parts of the emulator. - “cp ~arulraj/experiment.tgz .” : This is the experiment that we will be running . Read the files in this archive: - 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. - 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 . - 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. - 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: - “cp ~arulraj/.cshrc ~/.cshrc” - “cp -r ~xiaohui/emuNode .” - 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:** - //**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.**// - 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:**__ - 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. - Go to https://boss.cmcl.cs.cmu.edu/beginexp_html.php3 and create an experiment by: - Enter <username>-exp001 in username field. Substitue <username> with your real username. For example, I will enter arulraj-exp001 - Enter “assignment 1 - University of Wisconsin Students” in the description field. - 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” - Change Linktest Option to “Skip Linktest” - Enter 1 hours in the “Idle Swap feild” and 2 hours in “Max Duration” field. - Click Submit - 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: - 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. - Login to the nodes allocated in this experiment 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. - 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). - Compile experiment.java into experiment.class using the command “javac experiment.java” - 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 “ file -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. - 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. - 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. - 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 ?**__ - 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. - You also have to hand in the result you gathered through the experiment in a tabular format/graphical format.