Assignment #0 - Socket Programming and Network Measurements

Due on Tuesday, September 9. Please email your written report (in PDF format) to the TA by midnight September 9. Late turn-ins will NOT be accepted.

The purpose of this assignment is to give you experience on socket-based network programming and basic techniques of network measurements. Sockets are the key interface between applications and networking systems. In this assignment you are asked to write simple programs with TCP sockets. You can write your program in C/C++ or Java.

Warmup on socket programming:

This part is a warmup on socket programming and it will NOT be graded. You can skip it if you are already fairly familiar with socket programming. For this part, you will implement a client and a server that communicate to each other over the network. The server basically echoes back the client input message with some slight change. Specifically, for an input string from the client, the server returns one with all upper case letters replaced by lower case letters and every space changed to a '.'. Below are some additional operational details about the client and server:

Here is an example how your server should work. Assume that you start a server on machine foo.cs.rochester.edu (this machine doesn't really exist, find one yourself) listening to port number 32000. The syntax should look like the following:

Then you run a client on machine foobar.cs.rochester.edu using the following arguments:

The real assignment:

  1. (10 points) Measure the round-trip transmission delay of a TCP message between two machines. Provide measurement results for the following TCP message sizes: 1-byte, 10-byte, 100-byte, 1,000-byte, 10,000-byte. You should include the connection setup time in measured delays. For comparison purposes, all measurements should be done on Linux machines of the undergraduate lab or the graduate software lab.

  2. (10 points) Establish TCP connections with Internet service sites (e.g., a search engine or an e-commerce site) and measure the round-trip transmission delays. Please report the results for a site in the United States and a foreign site. For the foreign site, you are encouraged to find one with longest delay possible. There is no need to use messages of different sizes (you cannot control the return message size anyway). To ease your task, it may not be necessary to establish a valid message exchange (i.e., a return error message is sufficient for measuring the round-trip delay).
For the measurements, you may need to repeat each experiment several times and then take the average. Your goal is to produce accurate, stable measurement results.

Turn-in:

You should email a written report for this assignment to the TA and indicate the location of your source code for solving each question.