Tuesday, 26 March 2013

Transmission Control Protocol(TCP)

Transmission Control Protocol(TCP) is a connection-oriented, end-to-end reliable protocol designed to fit into a layered hierarchy of protocols which support multi-network applications.the primary purpose of the TCP is to provide reliable, securable logical circuit or connection service between pairs of nodes.
following are some functions that are performed by TCP–>
i)Basic Data Transfer:-TCP is responsible to transfer a continuous stream of octets in each direction between its users by packaging some number of octets into segments for transmission through the internet system. TCPs decide when to block and forward data at their own convenience.
ii)Reliability:-The TCP  recovers data that is damaged, lost, duplicated, or delivered out of order by the internet communication system. To do so a sequence number to each octet transmitted, and requiring a positive acknowledgment (ACK) from the receiving TCP. If the ACK is not received within a timeout interval, the data is retransmitted. At the receiver, the sequence numbers are used to correctly order segments that may be received out of order and to eliminate duplicates. Damage is handled by adding a checksum to each segment transmitted, checking it at the receiver, and discarding damaged segments.


iii)Flow Control:- TCP provides a way to the receiver for  governing the amount of data sent by the sender. This is achieved by returning a “window” with every ACK indicating a range of acceptable sequence numbers beyond the last segment successfully received. The window indicates an allowed number of octets that the sender may transmit before receiving further permission.
iv)Multiplexing:- TCP provides a set of addresses or ports within each host To allow for many processes within a single Host to use TCP  facilities simultaneously. Concatenated with the network and host addresses from the internet communication layer, this forms a socket. A pair of sockets uniquely identifies each connection. That is, a socket may be simultaneously used in multiple connections.
v) Connections:- For reliability and flow control mechanisms ,TCPs initialize and maintain certain status information for each data stream. The combination of this information, including sockets, sequence numbers, and window sizes, is called a connection. Each connection is uniquely specified by a pair of sockets identifying its two sides.When two processes wish to communicate, their TCP’s must first establish a connection . When their communication is complete, the connection is terminated or closed to free the resources for other uses.
vi)Congestion Control :- TCP also provide the facility of data congestion and flow control.

Below given image illustrates the header format of TCP


Segment Name
Bits Uses
Remarks(if any)
Source Address
16 Bits

Destination Address
16 Bits

Sequence Number
32 Bits

Acknowledgement Number
32 Bits

Data Offset
4 Bits

Reserved
6 Bits

URG: Urgent Pointer Field
1 Bit
 Control Bit
ACK: Acknowledgment Field Significant
1 Bit
 Control Bit
PSH: Push Function
1 Bit
 Control Bit
RST: Reset the Connection
1 Bit
 Control Bit
SYN: Synchronize Sequence Number
1 Bit
 Control Bit
FIN: No more data from
sender
1 Bit
 Control Bit
Window
16 Bits

Checksum
16 Bits

Urgent Pointer
16 Bits

Options
Variable
Max. 16 Bits
Padding
Variable
TCP Header Padding is used to ensure that the TCP header ends and data
begin on a 32 bit boundary. The Padding
is composed of zeros

3 comments:

  1. Suppose that the maximum transmit window size for a TCP connection is 12000 bytes. Each packet consists of 2000 bytes. At some point of time, the connection is in slow-start phase with a current transmit window of 4000 bytes. Subsequently, the transmitter receives two acknowledgements. Assume that no packets are lost and there are no time-outs. What is the maximum possible value of the current transmit window?

    Please explain the solution

    ReplyDelete
  2. Suppose that the maximum transmit window size for a TCP connection is 12000 bytes. Each packet consists of 2000 bytes. At some point of time, the connection is in slow-start phase with a current transmit window of 4000 bytes. Subsequently, the transmitter receives two acknowledgements. Assume that no packets are lost and there are no time-outs. What is the maximum possible value of the current transmit window?

    Please explain the solution

    ReplyDelete
  3. Suppose that the maximum transmit window size for a TCP connection is 12000 bytes. Each packet consists of 2000 bytes. At some point of time, the connection is in slow-start phase with a current transmit window of 4000 bytes. Subsequently, the transmitter receives two acknowledgements. Assume that no packets are lost and there are no time-outs. What is the maximum possible value of the current transmit window?

    Please explain the solution

    ReplyDelete