Assignment 1 : Socket Programming Basics
Create two programs in two Linux machines that communicate using
"sockets". In the programs build features to convincingly demostrate that
communication is being done between the processes. Briefly describe all the
networking function calls that are used in the program and submit it as a
write-up. For some of these function it is possible to show some examples to
describe their role. Include such examples in the writeup.
[To be completed in 1 week]
Assignment 2 : Network Layer Basics
Suppose there are four nodes A, B, C and D. There are physical
connections between A-B, C-B, and B-D. Implement this scenario by one or more
processes representing each node, with physical connections through sockets.
That is, there is a channel between A and B, C and B, and B and D. Now, if a
user at A wants to send a line of text to B, it sends it through the socket
dedicated for B and B prints the line of text on the terminal. If the user
at A wants to send a line of text to C, the process at A shall have to send
it to B and B shall have to forward it to C, and C will print it on the
terminal. So each mode shall have a user interface through which a user
shall specify the name of the destination along with the line of text to be
sent. Each node shall have a "routing table" from which it will decide
depending on the destination, whether to print the line of text on the
terminal, or forward it to another node. Also allow a special input word by
the user, eg. EXIT, to terminate each node.
[You may write programs for one node and run them parallelly to represent the
four nodes.]
Create a design using block diagrams, etc., for this assignment on a blank
paper before you start writing the programs. Submit the design.
[To be completed in 1 week]
Assignment 3 : Transport Layer Basics
Consider the nodes discussed in the previous problem. Now instead of
the user typing a line of text to be sent to a specified node, the user will
type the name of a local file that is to be sent to the specified node where
it will be copied. If the file is large, it may have to be sent as multiple
packets. But now introduce some problem in that part of the software that is
performing the network layer function in all nodes that are there in a
path.(that part which looks up the routing table and forwards packets) -
depending on a random number, it either correctly performs the function (say
50% cases), does not forward a particular packet, or stops forwarding all
subsequent packets for that "conection". Ensure that in presence of such
behaviour the file is correctly transferred.
[Implement the concept of "connection", figure out methods to detect
misbehaviour of the network layer (at any node in the path) and put in
mechanism to recover from such mechanism.]
Prepare a brief description of your approach before you write the program.
Submit the write-up.
[To be completed in 2 weeks]
Assignment 4 :
Suppose two persons, say A and B, are to communicate interactively
through their networked computer terminals. Either one can initiate the
communication. Implement such a facility using "sockets". To simplify the
implementation, provide for half-duplex communication only. Let there be a
"token" which must be possesed by a side to be able to send information to
the other. If, say, A is having the token, he must pass it to B when he wants
to receive information from B. Similarly, B should pass it to A when B wants
to receive information from A. Encrypt the user information using a simpole
encryption scheme. All information exchanges should be done using segments
each of which carries a TCP header (only relevant fields may be filled). Your
program should also write entire segments along with the TCP headers,
received at each end, into a file.
This assignment shall be evaluated along with the end-term viva-voce, on Nov
21 and 22. Prepare a neat design for the solution on paper and bring it for
evaluation during the viva-voce.
[Before writing the program on the terminal, prepare the design indicating
the processes involved, sequence of communication steps, and significant data
structures. Also describe the encryption scheme to be used. Start writing
the program only after the design is done. Observe that the assignment calls
for simple programming skills only. Contact the instructors for any
clarifications latest by Nov 13]
[To be completed in 10 days]