In the book on networking "Computer Networking: A Top Down Approach" by James Kurose following is stated: "...sender in ... uses only a single timer, 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."
My Question: How does the sender restart the timer with respect to packet-1 when it has already been sent in the past keeping in view a single timer in GBN protocol?
The timer in Go-Back-N is not specific to a particular packet. It measures the time between two events, i.e, The oldest packet (base
) transmitted and the ack received. If within the timeout no ack is received, all the packets from base
are retransmitted. For each ack received the timer is restarted. Lets suppose the timer is 3 sec
, and ack for packet-0 is received. It restarts the timer, i.e sets 3 sec timer and waits for an ack to receive (Either cumulative ack or individual ack). If the sender fails to receive the ack in the stipulated time, the timer is restarted and packets are retransmitted.