Knowledge

Go-Back-N ARQ: How the Sliding Window Protocol Works

Go-Back-N ARQ is a reliable data-transfer protocol that lets a sender transmit several frames before waiting for acknowledgements. If one frame is lost or corrupted, the sender retransmits that frame and every later frame in its current window. This simple recovery rule gives the protocol its name: the sender goes back to the missing frame and sends again from there.

Go-Back-N is a foundational networking concept. It explains how a sliding window improves on stop-and-wait transmission, while also illustrating the trade-off between implementation simplicity and bandwidth efficiency.

What Is Go-Back-N ARQ?

Go-Back-N automatic repeat request (ARQ) is an error-control protocol for reliable transmission over an unreliable channel. Rather than sending one frame and waiting for a reply, the sender can keep up to N unacknowledged frames in flight.

The receiver accepts only the next frame it expects. If a later frame arrives first, the receiver discards it because there is a gap in the sequence. It then repeats a cumulative acknowledgement for the last contiguous data it has received—or, in a common convention, for the next sequence number it expects.

If the sender does not receive an acknowledgement before its timer expires, it retransmits the missing frame and all subsequently sent, unacknowledged frames. That behavior distinguishes Go-Back-N from selective retransmission protocols.

Why Use a Sliding Window?

With stop-and-wait ARQ, a sender must pause after every frame until an acknowledgement returns. On a long-distance or high-latency link, that wait can leave the connection idle much of the time.

Go-Back-N keeps the link busy by allowing a pipeline of frames. Its sender window moves forward as cumulative acknowledgements arrive:

  1. The sender sends frames until it reaches its window limit, N.
  2. The receiver acknowledges the highest contiguous run of frames it has received.
  3. The acknowledgement advances the sender window, making room for new frames.
  4. If a timeout occurs, the sender retransmits from the oldest unacknowledged frame onward.

The result is better throughput than stop-and-wait when the channel is reliable enough that retransmissions are uncommon.

go-back-n

The Main Parts of the Go-Back-N Protocol

Sender window

The sender maintains a window containing frames it is allowed to send but has not yet cumulatively acknowledged. Its maximum size is N. The sender stores these frames until they are acknowledged, because it may need to resend them after a timeout.

Receiver window

In standard Go-Back-N, the receiver window size is 1. It accepts one exact sequence number: the next frame it expects. Any out-of-order frame is discarded rather than buffered.

This design keeps the receiver small and straightforward, but it can waste work when a single lost frame causes later frames to be dropped.

Sequence numbers

Each frame carries a sequence number so the receiver can identify duplicates, missing data, and the correct order. Sequence numbers wrap around after a fixed range.

If sequence numbers use m bits, there are 2^m possible values. In a classic Go-Back-N design, the sender window must satisfy:

N ≤ 2^m − 1

Keeping one sequence number outside the sender window prevents old and new frames from becoming ambiguous after numbering wraps around.

Cumulative acknowledgements

One acknowledgement can confirm multiple frames. For example, after receiving frames 0, 1, and 2 in order, a receiver might send ACK 3 meaning, “I have everything through frame 2; frame 3 is next.”

Textbooks sometimes label acknowledgements differently. The key idea is the same: Go-Back-N acknowledgements are cumulative, so one ACK advances the sender past a contiguous block of frames.

Timer and retransmission

The sender tracks the oldest unacknowledged frame with a timer. If that timer expires, the sender retransmits that frame and every later outstanding frame. A new timer starts for the retransmission.

Duplicate acknowledgements may show that the receiver is still waiting for a missing frame, but timeout is the defining recovery mechanism in the basic Go-Back-N protocol.

Go-Back-N Example: What Happens When a Frame Is Lost?

Assume the sender window size is 4. The sender transmits frames 0, 1, 2, and 3. Frame 1 is lost in transit.

Event Sender Receiver
1 Sends frame 0 Receives 0 and replies ACK 1
2 Sends frame 1, but it is lost Still expects frame 1
3 Sends frame 2 Discards it as out of order and repeats ACK 1
4 Sends frame 3 Discards it as out of order and repeats ACK 1
5 Timer for frame 1 expires Retransmits frames 1, 2, and 3
6 Receives frames 1, 2, and 3 in order Cumulatively acknowledges the new next expected frame

Although frames 2 and 3 may have arrived correctly the first time, the receiver did not keep them. The sender therefore sends them again. That is the central efficiency cost of Go-Back-N.

Advantages of Go-Back-N ARQ

  • Higher throughput than stop-and-wait because multiple frames can travel while earlier acknowledgements are still in transit.
  • Simple receiver design because the receiver only tracks the next expected frame.
  • Cumulative ACKs reduce feedback because one acknowledgement can cover many successfully received frames.
  • A useful teaching model for pipelining, sequence numbering, acknowledgements, and timeout-based recovery.

Some Limitations

  • A single lost frame can force retransmission of many later frames.
  • Correctly delivered out-of-order frames are discarded.
  • Efficiency declines on noisy links.
  • An overly short timeout causes needless retransmissions, while an overly long timeout delays recovery.

Go-Back-N works best where packet loss is low, and receiver simplicity matters more than extracting every possible bit of efficiency.

Go-Back-N vs. Selective Repeat

Feature Go-Back-N Selective Repeat
Receiver window 1 frame Multiple frames
Out-of-order frames Discarded Buffered
Retransmission after loss Missing frame plus all later outstanding frames Only missing or corrupted frames
Receiver complexity Lower Higher
Efficiency on lossy links Lower Higher

Selective Repeat avoids repeating frames that arrived safely, but it requires more receiver memory and more careful bookkeeping. Go-Back-N chooses a simpler receiver and accepts redundant retransmissions as the trade-off.

Go-Back-N vs. Stop-and-Wait ARQ

Stop-and-wait ARQ permits only one unacknowledged frame at a time. It is easy to implement but leaves the link idle while the sender waits for every acknowledgement.

Go-Back-N allows a sender to have up to N frames outstanding, which can dramatically improve utilization when round-trip delay is significant. However, it is more complex than stop-and-wait because it needs a sender window, sequence-number tracking, and timeout handling for multiple outstanding frames.

Is TCP a Go-Back-N Protocol?

Not exactly. TCP uses sequence numbers, acknowledgements, retransmissions, and a sending window, so it shares important ideas with Go-Back-N. Older TCP behavior could resemble cumulative-ACK recovery, especially without selective acknowledgements.

Modern TCP implementations, however, use mechanisms such as selective acknowledgements, fast retransmit, congestion control, and sophisticated loss recovery. They are not a textbook implementation of Go-Back-N. Go-Back-N is best viewed as a conceptual stepping stone for understanding reliable transport.

Conclusion

Go-Back-N ARQ improves data-transfer efficiency by sending multiple frames before waiting for acknowledgements. Its sliding window is faster than stop-and-wait, and its receiver is easier to build than a Selective Repeat receiver. The trade-off is retransmission overhead: when one frame is lost, every later unacknowledged frame may need to be sent again. Understanding that trade-off is the fastest way to understand Go-Back-N: simple receiver, cumulative acknowledgements, pipelined sending, and retransmission from the first missing frame onward.

Knowledge

Selective Repeat Protocol: How It Works, Examples, and Benefits

When a network loses or corrupts a packet, a reliable transport method has to decide...

Transmit Opportunity (TXOP): How It Improves Wi‑Fi Performance

A transmit opportunity, commonly called TXOP, is a controlled window of time in which a...

QoS Traffic Scheduling: Methods, Benefits, and Best Practices

QoS traffic scheduling is the process of deciding which network packets are transmitted first when...