Changes between Initial Version and Version 1 of NikySandbox/SIGSCETutorial/RunExampleAssignment


Ignore:
Timestamp:
02/21/13 08:38:20 (11 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NikySandbox/SIGSCETutorial/RunExampleAssignment

    v1 v1  
     1[[PageOutline]]
     2= 1. Create an experiment =
     3Now that your project is all setup, you are ready to run your first GENI experiment. For the purpose of this tutorial we are going to use a sample assignment that compares a UDP based transfer protocol with a TCP one. 
     4
     5{{{
     6#!html
     7<table border="0">
     8   
     9      <tr>
     10        <td>
     11
     12        <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Graphics/add-resources-portal.png?format=raw" alt="Create a GENI Project"  height="120" title="Create a GENI Project" /> </a>
     13       </td>
     14       <td >
     15         <ol>
     16            <li> Go to the <i>Home</i> tab. </li>
     17           <li> In the project that '''you''' created press the <b>Create Slice</b> button</li>
     18            <li> <FONT COLOR="red">As a slice name use <code>udt</code>, you can leave the description empty and press <b>Create Slice</b></font>
     19            </li>
     20            <li> Select <b>Add Resources</b></li>
     21            <li>Since this if the first time you are trying to reserve resources, you should see a warning on the top about not having an SSH key in your account. Access to compute resources in GENI is provide through ssh key pairs and thus the portal needs a public key to upload to compute resources. For the purposes of the tutorial we will have the portal creating an SSH key pair for you. However, if you prefer to use your personal public key you can choose to upload it. Click on the <b>Generate and Download SSH Keypair</b> button.</li>
     22           
     23            <li>Press the <b>Download Private Key</b> button</li>
     24            <li> Open a terminal and execute <code>ssh-add ~/Downloads/id_geni_ssh_rsa</code> </li>
     25            <li> <FONT COLOR="red">Go to the <i>Slices</i> tab and press again on the <b>Add Resources</b> button. This time there should be no warning. Complete the form as as shown in the picture on the left and press the <b>Reserve Resources</b> button </font></li>
     26<li> While we wait for our resources to get ready, lets look at another tool that is integrated with the portal. <FONT COLOR="red">Go to the <i>Slices</i> tab and press the <b>Launch Flack</b> button.</li>
     27
     28          </ol>
     29       </td>
     30       
     31    </tr>
     32 </table>
     33}}}
     34
     35= 2. Run your experiment =
     36Once your resources are ready, your slice in Flack will be green. Once this is done we can now continue to the interesting part of running through the sample assignment. For this we will need to know how to transfer files with UDT, with FTP and how to change the link parameters between the link that connects the two hosts. Follow these instructions that will guide you through doing this with your nodes:
     37
     38=== 2a. File Transfer Using UDT ===
     39
     40Follow these steps to perform a file transfer using UDT.
     41
     42 * Log into pc1 and pc2 in separate windows.
     43
     44 * On pc1, start a UDT file transfer server, using this command:
     45{{{
     46% pc1:~% /local/udt4/app/sendfile
     47server is ready at port: 9000
     48}}}
     49
     50 * On pc2, start a UDT file transfer client, using this command:
     51{{{
     52pc2:~% /local/udt4/app/recvfile pc1 9000 /local/datafiles/sm.10M /dev/null
     53}}}
     54You should see output like the following in your pc1 window, showing the results of the file transfer. Note the transfer rate.
     55{{{
     56new connection: 192.168.2.2:55839
     57speed = 7.14472Mbits/sec
     58}}}
     59
     60 * There are three data files available for transfer tests: '''/local/datafiles/sm.10M''' is 10MB, '''/local/datafiles/med.100M''' is 100MB, and '''/local/datafiles/lg.1G''' is 1000MB. Leave your transfer server running on pc1, and try transferring each of these files in turn by typing the appropriate commands on pc2. Keep track of the transfer rates in each case.
     61
     62 * You can leave your UDT server running or stop it with ctrl-C.
     63
     64=== 2b. File Transfer Using FTP ===
     65
     66Follow these steps to perform a file transfer using FTP.
     67
     68 * For a TCP-based (FTP) transfer, there's already a FTP server running on pc1. Log into pc2, and start an ftp client:
     69
     70(You type ''ftp pc1'', the user name ''anonymous'', and any password you want, although your e-mail address is traditional.)
     71
     72{{{
     73pc2:~% ftp pc1
     74Connected to PC1-lan1.
     75220 (vsFTPd 2.3.2)
     76Name (pc1:mberman): anonymous
     77331 Please specify the password.
     78Password:
     79230 Login successful.
     80Remote system type is UNIX.
     81Using binary mode to transfer files.
     82ftp>
     83}}}
     84
     85 * Still on pc2, request a file transfer. Note the reported file size, transfer time, and transfer rate.
     86
     87{{{
     88ftp> get med.100M /dev/null
     89local: /dev/null remote: med.100M
     90200 PORT command successful. Consider using PASV.
     91150 Opening BINARY mode data connection for med.100M (104857600 bytes).
     92226 Transfer complete.
     93104857600 bytes received in 8.91 secs (11491.9 kB/s)
     94}}}
     95
     96 * You can perform additional transfers with additional get commands. When you're done, exit the ftp client with the quit command.
     97
     98=== 2c. Viewing and Adjusting link characteristics ===
     99
     100In this experiment, you'll be changing the characteristics of the link and measuring how they affect UDT and TCP performance.
     101
     102 * Log into your delay node as you do with any other node. Then, on your delay node, use this command:
     103{{{
     104%sudo ipfw pipe show
     105}}}
     106
     107You'll get something like this:
     108{{{
     10960111: 100.000 Mbit/s    1 ms   50 sl. 1 queues (1 buckets) droptail
     110    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
     111BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
     112  0 ip    207.167.175.72/0       195.123.216.8/6        7     1060  0    0   0
     11360121: 100.000 Mbit/s    1 ms   50 sl. 1 queues (1 buckets) droptail
     114    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
     115BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
     116  0 ip   207.167.176.224/0         195.124.8.8/6        8     1138  0    0   0
     117}}}
     118
     119This information shows the internal configuration of the "pipes" used to emulate network characteristics.
     120(Your output may look different, depending on the version of ipfw installed on your delay node.
     121In any case, the information you need is on the first line of output for each pipe.)
     122
     123You'll want to make note of the two pipe numbers, one for each direction of traffic along your link.
     124In the example above, they are 60111 and 60121.
     125
     126There are three link characteristics we'll manipulate in this experiment: bandwidth, delay, and packet loss rate.
     127You'll find their values listed in the ipfw output above.
     128The link bandwidth appears on the first line immediately after the pipe number. It's 100Mbps in the example shown above.
     129The next value shown is the delay, 1 ms in the example above.
     130The packet loss rate (PLR) is omitted if it's zero, as shown above. If non-zero, you'll see something like '''plr 0.000100'''
     131immediately after the "50 sl." on the first output line.
     132
     133It is possible to adjust the parameters of the two directions of your link separately, to emulate asymmetric links.
     134In this experiment, however, we are looking at symmetric links, so we'll always change the settings on both pipes together.
     135
     136Here are the command sequences you'll need to change your link parameters.
     137In each case, you'll need to provide the correct pipe numbers, if they're different from the example.
     138
     139 * To change bandwidth (100M means 100Mbits/s):
     140{{{
     141sudo ipfw pipe 60111 config bw 100M
     142sudo ipfw pipe 60121 config bw 100M
     143}}}
     144
     145 * Request a bandwidth of zero to use the full capacity of the link (unlimited):
     146{{{
     147sudo ipfw pipe 60111 config bw 0
     148sudo ipfw pipe 60121 config bw 0
     149}}}
     150
     151 * To change link delay (delays are measured in ms):
     152{{{
     153sudo ipfw pipe 60111 config delay 10
     154sudo ipfw pipe 60121 config delay 10
     155}}}
     156
     157 * To change packet loss rate (rate is a probability, so 0.001 means 0.1% packet loss):
     158{{{
     159sudo ipfw pipe 60111 config plr .0001
     160sudo ipfw pipe 60121 config plr .0001
     161}}}
     162
     163 * You can combine settings for bandwidth, delay, and loss by specifying more than one in a single ipfw command. We'll use this form in the procedure below.
     164
     165== Experiment Procedure ==
     166
     167 * Set your link parameters to use maximum bandwidth, no delay, no packet loss:
     168
     169{{{
     170sudo ipfw pipe 60111 config bw 0 delay 0 plr 0
     171sudo ipfw pipe 60121 config bw 0 delay 0 plr 0
     172}}}
     173
     174 * Verify with
     175
     176{{{
     177sudo ipfw pipe show
     17860111: unlimited    0 ms   50 sl. 1 queues (1 buckets) droptail
     179    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
     180BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
     181  0 ip    207.167.175.72/0       195.123.216.8/6        7     1060  0    0   0
     18260121: unlimited    0 ms   50 sl. 1 queues (1 buckets) droptail
     183    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
     184BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
     185  0 ip   207.167.176.224/0         195.124.8.8/6        8     1138  0    0   0
     186}}}
     187
     188Note that bandwidth is set to ''unlimited'', delay to ''0 ms'', and no PLR is shown.
     189
     190 * Using this initial setting, try a few UDT transfers, including the larger files. Now try FTP transfers. Record the transfer sizes and rates.
     191
     192 * Now change the link parameters to reduce the available bandwidth to 10Mbps:
     193
     194{{{
     195sudo ipfw pipe 60111 config bw 10M delay 0 plr 0
     196sudo ipfw pipe 60121 config bw 10M delay 0 plr 0
     197}}}
     198
     199 * Repeat your file transfers with the new settings. As before, note the transfer sizes and rates, as well as the link settings.
     200
     201 * Continue with additional trials, varying each of the three link parameters over a range sufficient to observe meaningful performance differences. Record your data.
     202
     203
     204= 3. Delete your experiment =
     205When we are done with our experiment it is always good to clean up and release our resources so other people can use them.
     206  a. Go back to the portal and press on the '''Slices''' tab
     207  b. In your slice press the '''Release Resources''' button
     208
     209Congratulations you have successfully completed your first GENI assignment!