tcp – What is duplicate ACK when does it occur?

tcp – What is duplicate ACK when does it occur?

DupACKs are part of a failure recovery mechanism called: TCP Fast retransmit, ensuring the reliability of TCP protocol. A duplicate acknowledgment is sent when a receiver receives out-of-order packets (let say sequence 2-4-3). Upon receiving packet #4 the receiver starts sending duplicate acks so the sender would start the fast-retransmit process. Another situation is packet loss.

Keep in mind – packet loss is quite normal in TCP networks. TCP actually regulates itself with packet loss as a feedback mechanism.

More info:

RDT protocol was the basis for the implementation of TCP protocol.RDT protocol use to retransmit the packet only when timer expires .TCP now uses duplicate acks as well as timeout to retransmit a packet if lost.

Duplicate acks are used as a part of fast retransmission and packet recovery.
Generally, if tcp timer expires , it is assumed that the packet is lost and tcp retransmits the same packet.
But it need to wait, until the timer expires.
As a part of congestion control techniques, TCP behaves very politely during the times of congestion by increasing the timer interval by 2 times , so that the packet would be retransmitted slowing , thus not contributing to congestion.
However timeout increases exponentially assuming packet is lost every time it sends.

Retransmission of the same packet is ,time consuming due to increased timeout and the sender need to wait for longer time thus causing delay.

Hence tcp implemented duplicate acks and the sole purpose of it is to intimate the sender before timeout occurs .
If the sender receivers duplicate packets greater than 3 then it will retransmit the packet.
Duplicate packets are send immediately by receiver if out of order segments are arrived.
However if no packet loss was found , ack is delayed hoping that to acknowledge the back to back segments and reduce the number of acks in network. This approach is sending cumulative acknowledgements instead of sending ack to every segment.

If sender receives the duplicate acks, sender immediately sends the lost packet based on acknowledgement number and doesnt send any application data in the send buffer until the lost packet is sent.
However receiver does not acknowledge the retransmitted packet, rather does cumulative acknowledgement . It means it sends the acknowledgement number as the last highest successfully sent out of order segment value before the first duplicate ack was sent .

tcp – What is duplicate ACK when does it occur?

Since TCP does not know whether a duplicate ACK is caused by a lost
segment or just a reordering of segments, it waits for a small number
of duplicate ACKs to be received. It is assumed that if there is just
a reordering of the segments, there will be only one or two duplicate
ACKs before the reordered segment is processed, which will then
generate a new ACK. If three or more duplicate ACKs are received in a
row, it is a strong indication that a segment has been lost.

For more info

Leave a Reply

Your email address will not be published.