I'm currently learning about TCP protocol and don't understand what duplicate acknowledgement are when they will occur. Also doesn't retransmission only happen when a ACK is not received from the receiver to the client? To work out a retransmission you have to add the round trip time (from 3 way handshake) by the safety margin?
It will be very helpful if you can explain these to me with an example perhaps as I am a beginner to this.
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.
If you see duplicate ACKs coming in and no gaps in the packets going out it means that you capture at the source of the data (not the receiving side). That is quite normal if the packet loss occurs somewhere in the path to the receiver.
If three duplicate ACKs are received, there is a weaker possibility of congestion; a segment may have been dropped but some segments after that have arrived safely since three duplicate ACKs are received. This is called fast transmission and fast recovery. In this case, TCP has a weaker reaction as shown below: (A).
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:
" 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 www.isi.edu/nsnam/DIRECTED_RESEARCH/DR_WANIDA/DR/JavisInActionFastRetransmitFrame.html
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 doesn't 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 .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With