Go-Back-N ARQ


Go-Back-N ARQ
The Go-Back-N ARQ error control method is used in combination with sliding window flow control.
  • We can send up to W frames before worrying about ACKs.
  • We keep a copy of these frames until the ACKs arrive.
  • This procedure requires additional features to be added to Stop-and-Wait ARQ.

  • Frames from a sender are numbered sequentially.
  • We need to set a limit since we need to include the sequence number of each frame in the header.
  • If the header of the frame allows m bits for sequence number, the sequence numbers range from 0 to 2m– 1. for m = 3, sequence numbers are: 1, 2, 3, 4, 5, 6, 7.
  • We can repeat the sequence number.

  • At the sending site, to hold the outstanding frames until they are acknowledged, we use the concept of a window.
  • The size of the window is at most 2m-1 where m is the number of bits for the sequence number.
  • Size of the window can be variable, e.g. TCP.
  • The window slides to include new unsent frames when the correct ACKs are received.

Sender Sliding Window
Receiver Sliding Window

  • Size of the window at the receiving site is always 1 in this protocol.
  • Receiver is always looking for a specific frame to arrive in a specific order.
  • Receiver window slides as shown in fig. Receiver is waiting for frame 0 in part a.

  • Sender has 3 variables: S, SF, and SL.
  • S holds the sequence number of recently sent frame
  • SF holds the sequence number of the first frame.
  • SL holds the sequence number of the last frame
  • Receiver only has the one variable, R, that holds the sequence number of the frame it expects to receive. If the seq. no. is the same as the value of R, the frame is accepted, otherwise rejected.

Control Variables

  • Receiver sends positive ACK if a frame arrived safe and in order.
  • If the frames are damaged/out of order, receiver is silent and discard all subsequent frames until it receives the one it is expecting.
  • The silence of the receiver causes the timer of the unacknowledged frame to expire.
  • Then the sender resends all frames, beginning with the one with the expired timer.
  • For example, suppose the sender has sent frame 6, but the timer for frame 3 expires (i.e. frame 3 has not been acknowledged), then the sender goes back and sends frames 3, 4, 5, 6 again. Thus it is called Go-Back-N-ARQ
  • The receiver does not have to acknowledge each frame received, it can send one cumulative ACK for several frames.

Lost Frame

  • Frame 2 is lost.
  • When the receiver receives frame 3, it discards frame 3 as it is expecting frame 2 (according to window).
  • After the timer for frame 2 expires at the sender site, the sender sends frame 2 and 3. (go back to 2)