Você está na página 1de 3

Computer Networks (CS 314)

Phase II Description Dated: 11-10-2010


Total marks: 20 % of total Project Due Date: 22–10-2010

In this phase you will develop the transport layer of your network protocol
stack. This layer will provides all the facilities needed for end to end
transportation for communication.

This is the second phase of the project. In this phase you will develop an implementation of
transport layer of your network protocol stack model. The transport layer of any network
protocol stack provides process to process delivery of messages reliably and accurately. The
transport layer provides transport services from the source host to the destination host. It
establishes a logical connection between the endpoints of the network (e.g. via Socket paradigm).
Transport services segment and reassemble several upper-layer applications onto the same
transport layer data stream. This transport layer data stream provides end-to-end transport
services.

In this phase you have the following tasks to do:

• Establish a connection between the ends point, perhaps through some handshaking
mechanism. For this you will needs to modify your Connection Establishment
methods. Use the complete and incomplete connection queues like TCP Listening socket
maintain for handling connection requests on the server during the handshaking process.
For this see

UNIX network Programming volume-1... chapter#4 page#105.

• Close the connection with other end-point using some handshaking mechanism.

• Keep track of which processes are running on which ports because you have no
interaction with OS kernel in this project. Since you will run a single application at a time
it is easy to remember its port no in a variable. Although from this you should have an
overview of how OS maintains port-to-process mapping, in order for the incoming
message to be delivered to correct recipient process.

• Segmenting application layer data. You will need your own transport layer protocol
which will be discussed later in this document.

• Ensure proper delivery of application layer messages and recover any lost messages.
This means that your Transport Layer protocol will be a reliable protocol. Proper delivery
mechanism must be provided.

• Create buffer of the desired Window size on each host and inform other side about it.
The major sub phases of the phase2 are discussed here:
1) Design your own Transport layer messaging structure or protocol:
Think about your transport layer and how it will work. You still need a protocol for this
layer, so develop your own one. Since you have to develop a connection oriented reliable
transport layer protocol, you can take help from existing TCP structure. You can utilize
all the fields of TCP or can perhaps drop some fields of the TCP structure which is not of
an interest to you or add some more fields. The second option will make your
transportation protocol simpler than TCP. The following is the structure of TCP 20 bytes
header.

The codes bits can be used to indicate the type of the TCP segment e.g. TCP connection
establishment or termination segment, data segment and ACK segment. Window field indicate
the size of the window or buffer of the sender. You can drop the urgent, option and reserved
bits field if not required for your project if you are basing your protocol on TCP. Define constants
for the code filed to indicate different operation.

2) Window Size, Sliding Window and


Acknowledgements:
For reliable and proper transfer of application layer
messages, you will needs to implement some windowing
and acknowledgement mechanism. TCP uses sliding window
protocol for windowing. Do not worry from the name of
Sliding Window. I will discuss it in the next Lab. Include the
acknowledgement and sequence no field in Transport
protocol header as there is in the TCP. For implementing the
sliding window you will need the window field. This field will
specify the no of segment that the sender can consume. This
no will indicate the free space in the sender receive buffer.
For simplicity you can use a fixed window size like 3
segments. With window size of 3, the sender will Sends
three segments and then will wait for an acknowledgment. When the receivers receive the three
segments correctly will send the ACK.

Remember if there is some lost of segments, sender must retransmit it.


3) Testing of Transport Layer Protocol:
After deciding and developing the protocol structure and handshaking mechanism, connect the client to
the server through your connection establishment mechanism, take a message from your own
application layer and append your Transport layer header to it. After this, just attach a single bit or byte
as a header of your network and link layer (as you have not developed these layers. yet) and transmit it
on the Actual TCP/IP UDP packet. On the Server side, get your frame from the connected UDP socket,
strip off of the one bit/byte header of link layer. Then passed the remaining part i.e. packet to the
imaginary network layer which will strip-off its own header and will pass the segment to your Transport
layer. The transport layer will check the integrity of the message and will arrange the messages in the
correct order as send by the sender using the sequence no’s and will pass the remaining data a
sequence of bits to the application layer. The transport layer will then send the acknowledgment of the
received data.

4) Important Note:
You are the designer of your protocol stack and you have the Freedom to design it in a way, whatever
design options seems fit to you. You must start as early as possible so that u can handle with the
complexity of this Layer.

Você também pode gostar