COMS22101: Concurrency and Communications
Assignment I
The assignment is worth 25% of your total mark for this unit and must be undertaken individually.
Aims and Objectives
The aim of this assignment is for you to gain experience of designing and implementing real network components. It is based around a simple client-server application in which the client sends a request for data to the server and the server then sends that data back to the client. The objective of the assignment is to make the communication between client and server both reliable and secure.The implementation should be done in C within the Linux environment using the socket interface for network communication. We will provide you with a working server and a template for the client code; your task will be to design and implement the missing components within the client. These are:
- a packet delivery protocol based on the socket interface;
- a reliable delivery protocol based on the stop-and-wait algorithm;
- a security protocol based on public and private key cryptography.
Network Architecture
A diagram of the hierarchical network architecture that we have adopted and a brief description of the individual component layers is given below.
-
At the top is the simple client-server application. This enables users
at the client to request data from the server via the command
line. The requested data is then delivered and stored in a file at the client.
-
The security layer provides secure communication between the client and server using public and private key cryptography.
-
The fragmentation layer decomposes data blocks coming from above into fixed
sized packets and reassembles packets coming from below into the original
data block.
-
The reliable transmission layer provides reliable communication of
packets between the client and server using the stop-and-wait
algorithm.
- The socket layer delivers packets coming from above onto the communication link and passes packets from the link up to the layer above using the socket interface.
The socket interface used in the bottom layer will provide reliable
transmission over the link between client and server, ie over the real
network. For this assignment we have therefore simulated an unreliable
link by designing the server to discard incoming and outgoing packets
at random within its socket layer component. Note that it only
discards packets, it does not corrupt the data within the packet.
Assignment Details
We will provide you with a template for the client code consisting of a working application, a working fragmentation layer and skeleton code for the security, reliable transmission and socket layers. Your task is to complete the code for these three layers so that communication between client and server is reliable and secure.Before doing anything else you should read the technical description of the architecture implementation (PDF document) and the introduction to sockets in Section 1.4 of the textbook, Computer Networks by Peterson and Davie.
To help you with the assignment, we have divided up the work into the 3 separate exercises described below. These involve designing and implementing each of the 3 component layers. You should do the exercises in your own time. You are also required to write a report which describes your work and provides an analysis of the implementation. Details about this can be found under `Write report and submit'. We strongly recommend that you prepare your report alongside your implementation work - marks will be awarded based on both your implementation and the report; leaving the report until the last minute is not a good idea. The submission deadline is midnight on Monday 29 November 2010.
- Exercise 1 - socket layer
- Exercise 2 - reliable transmission layer
- Exercise 3 - security layer
- Write report and submit
Notes
- This assignment is designed to give you experience of designing
and implementing real network software. You are expected to find out
for yourself how to use some of the tools that you will need,
particularly the socket interface. A good place to start is the
textbook.
- The implementation of the architecture that you are to use is
sequential. This is deliberate. We do not want you to implement the
components concurrently, using, for example, Linux threads.
- Make sure that you read the submission requirements carefully - marks will be awarded BOTH for your implementation AND for an accompanying report. DO NOT LEAVE WRITING THE REPORT UNTIL THE LAST MINUTE.

