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:
- Go-back-n
- 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:
- It only accepts the segments that arrive in-sequence.
- It discards any out-of-sequence segment that it receives.
- 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 , it implicitly acknowledges the reception of all segments whose sequence number is smaller than or equal to .
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.
- It sent acknowledgments for all three segments.
- Unfortunately, acknowledgments of the first two were lost.
- 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.