Project 1 - Reliable Transport
UC Berkeley EE 122, Fall 2011
Due: September 28, 2011
In this project, you will build a simple reliable transport protocol, “BEARS-TP” (BTP). Your
protocol must provide in-order, reliable delivery of UDP datagrams, and must do so in the
presence of packet loss, delay, corruption, duplication, and re-ordering.
There are a variety of ways to ensure a message is reliably delivered from a sender to a
receiver. We will provide you with a reference implementation of a receiver (which you must
use) that returns a cumulative ACK whenever it receives a data packet. This is further explained
with an example later. Your job is to implement a sender that, when sending packets to this
receiver, achieves reliable delivery. For extra credit, you may choose to implement one of
several performance improvements which are described below.
Our simple protocol has four message types:
messages all follow the same general format.
To initiate a connection, send a
message. The receiver will use the sequence number
provided as the initial sequence number for all packets in that connection. After sending the
message, send additional packets in the same connection using the data message type,
adjusting the sequence number appropriately. Unsurprisingly, the last data in a connection
should be transmitted with the
message type to signal the receiver that the connection is
complete. Your sender should accept acknowledgements from the receiver in the format:
An important limitation is the maximum size of your packets. The UDP protocol has an 8 byte
header, and the IP protocol underneath it has a header of ~20 bytes. Because we will be using
Ethernet networks, which have a maximum frame size of 1500 bytes, this leaves 1472 bytes for
your entire packet (message type, sequence number, data, and checksum).
The angle brackets (“<” and “>”) are not part of the protocol. However, you should ensure that
there are no extra spaces between your delimiters (“|” character) and the fields of your packet.
For specific formatting details, see the sample code provided.