wiki:NikySandbox/SIGSCETutorial/RunExampleAssignment

Version 25 (modified by nriga@bbn.com, 7 years ago) (diff)

--

1. Create an experiment

Now 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.

Create a GENI Project
  1. Go to the Home tab.
  2. In the project that you created press the Create Slice button
  3. As a slice name use udt, you can leave the description empty and press Create Slice
  4. Select Add Resources
  5. 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 Generate and Download SSH Keypair button.
  6. Press the Download Private Key button
  7. Open a terminal and execute ssh-add ~/Downloads/id_geni_ssh_rsa
  8. Go to the Slices tab and press again on the Add Resources button. This time there should be no warning. Complete the form as as shown in the picture on the left and press the Reserve Resources button
  9. While we wait for our resources to get ready, lets look at another tool that is integrated with the portal. Go to the Slices tab and press the Launch Flack button.

2. Run your experiment

Once your resources are ready, your slice in Flack will be green. We can now continue to the interesting part of running through the sample assignment. In this sample assignment the students will experiment with a UDP-based (UDT) and a TCP-based(FTP) file transfer protocols. For the purpose of this tutorial we have made the assignment much simpler, but you can see the complete assignment here.

In order to be able to complete this assignment we need to:

2a. Login to Nodes

Flack Host

Flack host ssh
  1. While your slice is loaded in Flack, press the blue (i) button on a host. This will load the information about the host.
  2. On the top of the new tab that showed up, press the ssh button . This will cause the ssh client to launch. If you have setup the the key correctly, you should get logged in to your host.
  3. Repeat this process for all hosts; server, clienth, delay

You should now have three terminals open, one for each host.

2b. UDT vs FTP Experiment

For the purpose of this tutorial, we have automated a single run of the experiment that compare UDT and FTP over a single file transfer between the client and the server. In the server we have placed 4 files of different sizes: sm.1M, med.10M, lg.100M, xl.1000M. In the terminal window of the clienth host run:

[inki@clienth ~]$ /local/scripts/get_both_file.sh sm.1M
FTP: 1M in 255 ms
UDT: 1M in 552 ms

Try the same for the other files, you can skip the xl.1000M, since it will take a bit to complete.

2c. Modify Link Parameters

In this experiment, you'll be changing the characteristics of the link and measuring how they affect UDT and TCP performance.

  • In the terminal of the delay node run this command:
    %sudo ipfw pipe show
    

You'll get something like this:

60111: 100.000 Mbit/s    1 ms   50 sl. 1 queues (1 buckets) droptail
    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
  0 ip    207.167.175.72/0       195.123.216.8/6        7     1060  0    0   0
60121: 100.000 Mbit/s    1 ms   50 sl. 1 queues (1 buckets) droptail
    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
  0 ip   207.167.176.224/0         195.124.8.8/6        8     1138  0    0   0

This information shows the internal configuration of the "pipes" used to emulate network characteristics. (Your output may look different, depending on the version of ipfw installed on your delay node. In any case, the information you need is on the first line of output for each pipe.)

You'll want to make note of the two pipe numbers, one for each direction of traffic along your link. In the example above, they are 60111 and 60121.

There are three link characteristics we'll manipulate in this experiment: bandwidth, delay, and packet loss rate. You'll find their values listed in the ipfw output above. The link bandwidth appears on the first line immediately after the pipe number. It's 100Mbps in the example shown above. The next value shown is the delay, 1 ms in the example above. The packet loss rate (PLR) is omitted if it's zero, as shown above. If non-zero, you'll see something like plr 0.000100 immediately after the "50 sl." on the first output line.

It is possible to adjust the parameters of the two directions of your link separately, to emulate asymmetric links. In this experiment, however, we are looking at symmetric links, so we'll always change the settings on both pipes together.

Here are the command sequences you'll need to change your link parameters. In each case, you'll need to provide the correct pipe numbers, if they're different from the example.

  • To change bandwidth (10M means 10Mbits/s):
    sudo ipfw pipe 60111 config bw 10M
    sudo ipfw pipe 60121 config bw 10M
    
  • Request a bandwidth of zero to use the full capacity of the link (unlimited):
    sudo ipfw pipe 60111 config bw 0
    sudo ipfw pipe 60121 config bw 0
    
  • To change link delay (delays are measured in ms):
    sudo ipfw pipe 60111 config delay 10
    sudo ipfw pipe 60121 config delay 10
    
  • To change packet loss rate (rate is a probability, so 0.001 means 0.1% packet loss):
    sudo ipfw pipe 60111 config plr .0001
    sudo ipfw pipe 60121 config plr .0001
    
  • 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.

Experiment Procedure

  • Set your link parameters to use maximum bandwidth, no delay, no packet loss:
sudo ipfw pipe 60111 config bw 0 delay 0 plr 0
sudo ipfw pipe 60121 config bw 0 delay 0 plr 0
  • Verify with
sudo ipfw pipe show
60111: unlimited    0 ms   50 sl. 1 queues (1 buckets) droptail
    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
  0 ip    207.167.175.72/0       195.123.216.8/6        7     1060  0    0   0
60121: unlimited    0 ms   50 sl. 1 queues (1 buckets) droptail
    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
  0 ip   207.167.176.224/0         195.124.8.8/6        8     1138  0    0   0

Note that bandwidth is set to unlimited, delay to 0 ms, and no PLR is shown.

  • Using this initial setting, try to transfer the files and note the rate of UDT and FTP.
  • Now change the link parameters to reduce the available bandwidth to 10Mbps:
sudo ipfw pipe 60111 config bw 10M delay 0 plr 0
sudo ipfw pipe 60121 config bw 10M delay 0 plr 0
  • Repeat your file transfers with the new settings. As before, note the transfer sizes and rates, as well as the link settings.
  • Continue with additional trials, varying each of the three link parameters over a range sufficient to observe meaningful performance differences. Record your data.

3. Delete your experiment

When we are done with our experiment it is always good to clean up and release our resources so other people can use them.

Create a GENI Project
  1. Go to the Slices tab.
  2. In your slice press the Release Resources button

Congratulations you have successfully completed your first GENI assignment!

Previous Part: Setup your GENI account and your GENI Project?