In the second image on the above Page's answer, what will happen after all the three ACKs have been lost? Won't the system get stuck? Sender will keep sending frames 0,1,2 but since the receiver expects frame 3, it will not send an ACK. It will be silent forever, and the sender will keep sending frames 0,1,2 forever, after timeouts. Please explain.
2 Answers
My answer is straight No.
Here when that timeout timer timeouts, as happened in this case since acks got lost. Thus the sender will retransmit the data. But you see, the receiver will again send ack because this is what happens in Go-Back-N if ack gets lost. Also, do note that the receiver will discard the packets since it got it before only. Now when the sender will get the ack, it will send again as per win size.

- 1
- 3
In Computer Networks, An Automatic Request (ARQ) application is required. Users can choose three different ARQ schemes (Stop-and-wait, GoBack-N, Selective Repeat) and choose parameters freely, like frame size, total number of frames to be transmitted, link length, link quality in BER (bit error rate), and sliding window size. After the simulation start, the users can see the following features: a universal time ticking, timeline at the sender and receiver, frames passing through the link, ACK/NAK travel back, sliding window situation (for Go-Back-N and Selective Repeat ARQ), timer situation.
Stop and Wait is inefficient when the propagation delay is more significant than the packet transmission time. It Can only send one packet per round-trip time. Go Back N allows the transmission of new packets before earlier ones are acknowledged. Go Back N uses a window mechanism where the sender can send packages within a “window” (range) of packages. The window advances as acknowledgments for earlier packets are received.
Sequence Numbers: Each time, several frames are waiting for transmission, so we must number them sequentially. We set a limit for the frames. If the frame header allows m bits for the sequence number, those frames range will be 0 to 2m -1. If m=2, the sequence number will be 0,1,2,3,0,1,2,3… repeat this way. Unlike Stop-and-wait ARQ's 0,1,0,1…
Sender sliding window: Now, a "group" of frames send to the receiver; we need something to hold this "group" until ACK arrives. Next, the concept of a "sliding window" is introduced. The window size is fixed, which is 2m -1. Inside this sliding window, there are copies of the transmission frames. When the correct ACK arrives, a sliding window will slide forward.
Receiver sliding window: The receiver sliding window in Go-Back-N ARQ is always 1. It waits for the correct frame to come in proper order, then sends the ACK back and slides forward. The receiver will wait for the resend if the frame is lost or damaged. Even if the rest of the frame is correct, the receiver will discard them automatically.
Sliding Window Concept: Go-Back-N uses a sliding window mechanism, where the sender can transmit multiple frames within a defined window size. The receiver acknowledges a contiguous range of correctly received frames.
Efficiency: Transmitting multiple frames before requiring an acknowledgment enhances protocol efficiency by utilizing available bandwidth more effectively.
Positive Acknowledgments (ACKs): When the receiver successfully receives and processes a frame, it sends an ACK for the last correctly received frame. This allows the sender to continue transmitting the next window of frames.
Negative Acknowledgments (NAKs): If the receiver detects an error or missing frames, it sends a NAK for the last correctly received frame. The sender responds by retransmitting all frames from that point onward. Buffering: The receiver must buffer out-of-order frames until missing frames arrive. Once the missing frame is received, the receiver can deliver all in-order frames to the higher layers.
-
5https://meta.stackoverflow.com/q/421831/11107541 – starball Aug 22 '23 at 05:28