Homework 5 - network performance measurements

In this homework, we'll use a set of tools for measuring, analyzing and reporting network performance. You will measure the pairwise round-trip time between about 100 hosts for a total of several thousand pairs, on two different occasions, and analyze the results.


  1. Register your host with Musa. Send an email with subject "hw5 mac registration". In the body, type your netid, followed by a space, followed by the mac addresses (wired and wireless) of your computer.
  2. Create a planetlab account. Go to create account and fill in your details. I will approve it as soon as I get a chance.
  3. If you don't already have one, generate an ssh key. In your terminal, run "ssh-keygen".
  4. Once your account is enabled, log in to planet-lab.org and add your key (you'll find it in ~/.ssh/id_dsa.pub) to your account.
  5. Try logging in to a planetlab machine, for example
    ssh uic_cs450@planetlab-1.cs.uic.edu


UIC security limits network access to certain behaviors, which this experiment may not conform to. To minimize risk of filtering and excessive bandwidth use, practice with a small number of hosts, and only start using the 100+ hosts in the list once you're happy with your programs.

Try to keep the number of ssh sessions low. There is need to go to extremes, but don't start a new ssh session for every new command if you don't have to. You can issue multiple commands at once like this 'ssh host "command 1; command 2; command 3"'.

All students share the same home directory on the planetlab machines. It is not necessary to store any files, scripts or data, on the planetlab machines to complete this homework. However, if you feel that you have to, do not store your data directly in our planetlab home directories. Create a subdirectory on each host named after your netid, and keep your temporary files there. There are no reliability guarantees for planetlab hosts, so you may lose stored data at any time.

Software to Install

You'll need a LaTeX installation for generating your final PDF submission, and gnuplot for generating graphs.

  • apt-get install context
  • apt-get install gnuplot


Check out the hw5 directory to get started. The data directory contains a list of hostnames, a list of corresponding IP addresses, and a list of lat/lon coordinates for the IP addresses where these are known. In the scripts directory, you'll find an example perl-script for calculating the distance between two coordinates. Change it to do what you want, or use it the way it is (the distance returned is in kilometers):

perl scripts/gcdist.pl 38.91 -77.02 49.33 -76.6

You are to attempt to measure the round-trip time between every host in the ips.txt file and every other host in the same file, for a total of several thousands of measurements. When measuring the round trip time, use the command "ping" with parameter "-c 10" for 10 consecutive packets. Without the -c, ping will go on forever. Don't let it!

Using the latex template and gnuplot, create a report containing the following elements. Each element is to be duplicated for at least two independent sets of measurements, at significantly different times of day. Report the time and date for each set.

  1. Scatterplot of pair-wise round-trip time measurements. Plot the distance between the hosts on the X axis, and the round-trip time on the Y axis. For example, "plot [:] [0:500] 'thefile' using 1:2" would generate a scatterplot.
  2. Cumulative distribution function (CDF) plot for round-trip time, and for distance. The y-axis of a CDF goes from 0 to 1. It is zero for the minimum X value, and 1 for the maximum X value, and grows with X. Using a CDF, one can quickly look up the median value (where y=0.5), or any percentile.
  3. Compute the mean and standard deviation of 'speed of bits' over each set. Was there a significant difference, if so, what may be the cause of it?
Complete the following analyzes using all your measurements:

  1. estimate the maximum (uncongested) 'speed of bits' on the Internet, in km/s. How does it compare to the speed of light, and why are they different?
  2. some planetlab sites have misreported their locations. List a few obvious examples, and explain your reasoning.
  3. do any particular sites, or perhaps countries, have particularly poor connectivity? show an example, and explain your reasoning.
Finally, estimate the location (try to get country and city, or if not, give your best lat/lon guess) of IP address using the same type of ping measurements from planetlab hosts. Present the evidence you used to arrive at your conclusion, and describe your reasoning.


Turn in works as usual - add all relevant files (not logs or binaries) to your hw5 directory, and commit. With one big exception: although a pdf is strictly a binary, add hw5.pdf to your turn-in directory anyway. Grading will be primarily by your pdf file (we will look at your graphs, and read your analysis). However, turn in a complete version of your work, that can be used to make new measurements and generate new documents.


  • Several servers will be down for maintenance, or have other problems. To have ssh give up after a short time, use a ConnectTimeout option "ssh -o ConnectTimeout=1 google.com".
  • Curious about where a given lat/lon is on the map? Try http://maps.google.com, just plug in the numbers and it'll take you there.
  • Once you parallelize your code, just typing "make" won't work, unless you do something clever to wait for all the running processes to finish. You don't need to do something clever: just use two separate commands, and use "ps xa" or "jobs" to see when the collection part is all done.
  • Some help on shell scripting.
  • And, some help with LaTeX [ http://en.wikibooks.org/wiki/LaTeX/Absolute_Beginners ]
Topic revision: r4 - 2010-10-11 - 15:12:24 - Main.jakob
Copyright 2016 The Board of Trustees
of the University of Illinois.webmaster@cs.uic.edu
Helping Women Faculty Advance
Funded by NSF