Project 2
CS/EE
555
Fall
2001
Due
November 2, 2001
Link to
Project1
Description
In this project you will
implement several approaches to round-trip-time and timeout computations as
described in Chapter 5 of the textbook. As in Project 1, we will again be using
UDP packets, but this time to simulate the network layer instead of the link
layer..
The
primary goals of this project:
- To solidify your implementation experience with
managing time and timeouts in protocol implementation
- To observe first-hand the behavior of several
approaches to RTT and timeout calculations in response to changing network
behavior.
As in Project 1 you will again
use two programs connected by an emulator which I am providing. Your P1
programs should be a good starting point.
Your sender should, for each
experiment, send 100 sequence-numbered packets. The receiver should return an
ACK (containing the sequence number) for each packet it receives. If the sender
times out before receiving the ACK for a particular packet it resends the
packet.
For each sequence number, record
the estimated round-trip time before sending, the sampled RTT for that packet,
the timeout used, and the estimated deviation (for the Jacobson-Karels
algorithms).
The emulator is again running on
moomoo and you should use the emulator_connect program from project 1 to
connect to it, but change the emulator port number to 2565 (instead of 2555).
Use param_set 0. The emulation
is of a network path with a varying delay. For the first 33 packets (in each
direction) the delay is Gaussian with a mean of .100 seconds and a standard
deviation of .020 seconds. For next 33 packets the delay is Gaussian with mean
.200 seconds and std deviation .020, then 34 packets of the first distribution
again, then the whole thing repeats. Note that if you do not use stop and wait
(you should use stop and wait), this may lead to reordering of packets!
[Note: if you would like to experiment with a network with less variability in
the delay you can use param_set 1
which has similar behavior but the standard deviations are much smaller. Using param_set 1 is not part of the
assignment.]
Experiments
The required experiments involve
sending 100 packets over the emulated network using the original TCP RTT and
timeout algorithm, the Karn-Partridge algorithm and the Jacobson-Karels
algorithm both with and without packet timestamps (4 experiments in all). For
each algorithm provide one or more graphs showing the estimated roundtrip time,
the timeout setting, and the estimated deviation (for the J-K algorithms) as a
function of the packet number. In each case, start with an estimated roundtrip
time of 100ms. In your write-up of each experiment also note how many packet
retransmissions occurred due to timeouts and mark where they occurred on your
graphs.
What to turn in
- The following are to be placed in your cs555
directory in SNIF lab. Everything goes below /net/cs555/students/youruserid/project2/. Please
follow the directions carefully about where to place things: it makes life
a lot easier for Jin and me if everyone follows the same conventions about
file placement.
- In the doc/ subdirectory:
a design document that describes all the important decisions you made in
implementing the various algorithms. This file may be ASCII text, MS-Word,
HTML or PDF.
- In the programs/
subdirectory: all the source code for your sender and receiver
including a Makefile, and the executables for the sender and receiver.
- In the report/
subdirectory: your report on each of the required experiments.
Provide the command line used to invoke your sender and receiver for each
experiment, your report on the expected and observed performance. At the
end of your report include a summary of what you learned in doing this
project. The report file (only one please) may be ASCII text, MS-Word,
HTML or PDF.
- In addition to storing the files print the design
document, the source code and the report and turn in hard copy in class on
the due date.
Notes
- You may use the programming language of your choice
as long as I agree to it ahead of time. C, C++, Java and Python are
already blessed. I’m inclined to agree to Perl and Visual Basic but I want
to talk to you ahead of time if you are considering either of these or
another programming language.
- You should make your sequence number field large
enough that it never overflows during these experiments and don’t worry
about handling wrap-around.
- This emulator does not drop packets, it only delays
them.
- The emulator instance that is created by calling
em_connect will timeout and exit if it doesn’t receive a packet from either
the sender or receiver for a period of 10 minutes. This is to prevent the
accumulation of useless processes on the emulator host. If the timeout
period is too short for your debugging needs it could be raised. Let me
know.
- The description of the Karn-Partridge algorithm in
the book is lacking details about the effect of the timeout doubling on
the RTT estimate. I will provide additional information early next week.
- All of these experiments should take much much less
than 60 seconds. If your program is running longer than that, kill it and
figure out what is wrong.