0

I come across following, while reading TCP from Forouzan's book:

We can define the following rules for the retransmission timer:

  1. When TCP sends the segment in front of the sending queue, it starts the timer.
  2. When the timer expires, TCP resends the first segment in front of the queue, and restarts the timer.
  3. When a segment or segments are cumulatively acknowledged, the segment or segments are purged from the queue.
  4. If the queue is empty, TCP stops the timer; otherwise, TCP restarts the timer.

My doubt is what happens to timer when we receive ACK for segment for which we started timer? Is it simply reset for any segment which will be sent in future? (Note that I am effectively asking what happens to timer after purging segments as stated in point 3.)

0

When an ACK is received the according segment is done.

what happens to timer when we receive ACK for segment for which we started timer?

We restart the timer for the next segment's ACK, so we know when it's overdue. The timer is a conservative estimate for the period in which the next ACK is to be expected.

If the timer expires the segment or ACK has likely been lost and the segment is retransmitted. If the ACK arrives in time everything's fine, the next segment in queue moves into the window. It is sent and we proceed to time the next ACK (which actually is for a previously sent segment).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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