Transmission Control Protocol (TCP) is a transport layer protocol that connects applications so that they can exchange data over a communication network. On top of an unreliable (IP) network layer, TCP is a reliable data transport protocol.
Note: Want to read more about TCP? Refer here.
To achieve reliable data transfer, TCP must recover data from the internet that has been corrupted, lost, duplicated, or transmitted out of order. TCP accomplishes this reliability by allocating a
Corrupt packets are managed by appending a
The following two special cases involved in reliable data transfer are discussed:
Lost packet
Lost acknowledgment
The data is transmitted again if the ACK is not received in the allotted period. TCP retransmission time-out value is dynamically chosen based on
To understand this concept, let's consider the following illustrations:
The illustration above will play out as follows:
During data transmission, TCP packet 3 gets lost.
This is because the sender did not get ACK 3, therefore the window remained in position 2.
The receiver did not receive packet 3, therefore it will acknowledge packets four and five with an ACK 2.
Packet 3 will time out, be retransmitted, and the receiver will issue ACK 5.
After successfully receiving packets 1 through 5, the sender's window will move three positions.
The packet did arrive, but the acknowledgment got lost. In this scenario, TCP utilizes the concept of
Consider the following demonstrations that thoroughly explain the aforementioned concept:
These illustrations portray that packet 3 did arrive but its acknowledgment was lost.
Although the sender does not receive ACK 3 but does receive ACK 4.
ACK 4 acts as cumulative acknowledgment for all packets up to packet 4 (including packet 3).
The sender can now move the window to packet 5.
Free Resources