2

Consider two machines A and B, machine A sends 3 packets to B of sequence number 1, 2, 3 during transmission only packets 1 and 3 are received by B. Now B requests for packet 2, and machine A sends the requested packet.

I have a doubt here, does machine store all the packets in some memory as buffer or does it again make packets and send only the requested packets? And if it is based on having buffer memory to store all the packets, where this buffer is stored in the serving machine? and when this buffer is cleared?

How does the whole process of recovery of packets take place?

1 Answer 1

3

This book has a good answer to your question:

Nodes that are transmitting also use the acknowledgment number, sequence number, and window value as a gauge of how long to retain data that has been previously transmitted. Each segment that has been transmitted and is awaiting acknowledgment is placed in a retransmission queue and is considered to be unacknowledged by the recipient application process. When a segment is placed in the retransmission queue, a timer is started indicating how long the sender will wait for an acknowledgment.

And then,

The purpose of this retransmission queue is twofold:

It allows the transmitting node to allocate memory capacity to retain the segments that have been previously transmitted. If a segment is lost (congestion, packet loss), it can be transmitted from the retransmission queue, and remains there until acknowledged by the recipient application process (window update). It allows the original segment, once placed in the retransmission queue, to be removed from the original transmission queue. This in effect allows TCP to be continually extracting data from the local transmitting application process while not compromising the transmitting node's ability to retransmit should a segment become lost or otherwise unacknowledged.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.