TCP – Sender and Receiver Timers in GBN, SR, and TCP

layer4tcptransport-protocol

So basically for each of the GBN, SR and TCP's retransmission method, i have 2 question:

1.Is there a Timeout timer for EACH packet or one timeout timer for all of the packets?

2.Is there a cumulative ack timer in the receiver or the receiver sends an ack for each packet?

i tried googling but there were a lot of different answers so it would be really helpful if you guys could answer this, thanks.

Best Answer

  1. Is there a Timeout timer for EACH packet or one timeout timer for all of the packets?

Answer:

For GBN and TCP, there is only one timeout timer for all of the packets, which can be thought of as a timer for the oldest transmitted but not yet acknowledged packet. If an ACK is received but there are still additional transmitted but not yet acknowledged packets, the timer is restarted. If there are no outstanding, unacknowledged packets, the timer is stopped.

For SR, theoretically, there is a timeout timer for each packet since only a single packet will be retransmitted on timeout. However, a single hardware timer can be used to mimic the operation of multiple timeout timers.

  1. Is there a cumulative ack timer in the receiver or the receiver sends an ack for each packet?

Answer:

I am not sure what is a cumulative ack timer.

For GBN and TCP, the receiver sends an ack whenever it receives a not corrupted packet. Also, it is a cumulative acknowledgment, which always sends ACK to the last correctly received, in-order segment.

For SR, SR sends ACK to every correctly received packet in receiver window [rcv_base-N, rcv_base+N-1].

Related Topic