Reliable Data Transfer: Go-back-n

In this lesson, we'll study go-back-n: a simple protocol to ensure detection and retransmission of lost packets.

In the last lesson, we discovered that a sending sliding window alone is not enough to ensure detection and retransmission of lost packets. In order to do that, we will look at two protocols:

  1. Go-back-n
  2. Selective Repeat

Go-back-n

The simplest sliding window protocol uses go-back-n recovery.

Go-back-n Receiver

Intuitively, go-back-n receiver operates as follows:

  1. It only accepts the segments that arrive in-sequence.
  2. It discards any out-of-sequence segment that it receives.
  3. When it receives a data segment, it always returns an acknowledgment containing the sequence number of the last in-sequence segment that it has received.

Cumulative Acknowledgements

This acknowledgment is said to be cumulative. When a go-back-receiver sends an acknowledgment for sequence number xx, it implicitly acknowledges the reception of all segments whose sequence number is smaller than or equal to xx.

A key advantage of these cumulative acknowledgments is that it’s easy to recover from the loss of an acknowledgment.

Consider for example a go-back-n receiver that received segments 1, 2 and 3.

  1. It sent acknowledgments for all three segments.
  2. Unfortunately, acknowledgments of the first two were lost.
  3. Thanks to the cumulative acknowledgments, the receiver receives the acknowledgment for the last segment and so it knows that all three have been correctly received.

Get hands-on with 1400+ tech skills courses.