The Data Link Layer

selective repeat

Go-back-N's flaw is that one lost frame forces the sender to redo a whole window, including frames that already arrived safely. Selective repeat asks the obvious question: why not resend ONLY the frames that were actually lost? It does exactly that. The sender keeps a window of frames in flight, but now retransmits just the specific frames that went missing, leaving the successfully delivered ones alone.

To pull this off, the receiver must be smarter. Instead of discarding anything out of order, it BUFFERS frames that arrive correctly even when an earlier one is still missing, and it sends an individual ACK for each frame it receives, not a cumulative one. So if frame 5 is lost but 6, 7, and 8 arrive, the receiver holds 6, 7, and 8 in its buffer and ACKs each. When the sender notices, via a timeout, that frame 5 was never acknowledged, it resends ONLY frame 5. Once that arrives, the receiver slots it in front of the buffered 6, 7, 8 and delivers all four to the upper layer in order, all at once.

Selective repeat is the most bandwidth-efficient of the classic ARQ schemes, which is why the modern transport layer (TCP with selective acknowledgments) leans on the same idea. The cost is honest: it needs a more complex receiver with real buffer space, per-frame acknowledgments, and a timer per outstanding frame. There is also a subtle correctness rule — the window size must be no more than half the sequence-number space — or the receiver can confuse a brand-new frame with an old retransmission and silently corrupt the stream.

Window of 4. Frames 4, 5, 6, 7 are sent; only 5 is lost. The receiver buffers 6 and 7 and ACKs 4, 6, 7 individually. The sender resends just frame 5; when it arrives, the receiver delivers 4, 5, 6, 7 in order. Compare go-back-N, which would have resent 5, 6, and 7.

Only the lost frame is resent; the rest are buffered and delivered in order once the gap is filled.

Selective repeat saves bandwidth but needs a buffering receiver, individual ACKs, and per-frame timers. A correctness trap: keep the window size at most half the sequence-number space, or new frames and old retransmissions become indistinguishable.

Also called
SRselective-repeat ARQ選擇性重傳