What is Go-Back-N ARQ?
Published: 2023-02-16 10:23:32

In this tutorial, we will be looking at one of the most crucial coding concepts i.e Go-Back-N ARQ!

Learn all the nits and grits about this concept and fill your knowledge bank with the right information. 

Have you tried to dig deep inside the concept of a data link layer?

Well, Go-Back-N ARQ is a vital data link layer concept for every programmer. 

Go-Back-N ARQ or Go-Back-N Automatic repeat request is defined as the data linking protocol which is best used for the data flow purposes. 

This is also known by the name of sliding window which is a protocol where multiple frames are being sent from a sender to the receiver. 

But this is not it as the concept is much wider! 

Read this blog post till the end to learn everything about Go-Back-N ARQ!

Go-Back-N ARQ - An Overview 

Go-Back-N ARQ is a special concept of the automatic repeat request which is a sending process that continues to send the number of frames as is specified in the window size after it relieves the acknowledgement packets from its receiver.

As flow control is a speed mechanism in the data link layer, the receiver in this mechanism has to intimate the speed of data to its sender. These procedures tell the sender how much data can be transferred to get the acknowledgement from its receiver. Go-Back-N ARQ comes under the noisy channels of the flow control. 

In this concept, the N signifies the size of the sender window. Suppose if Go-back-4, the sender window will be 4. This means that it can send up to 4 frames
It uses concept of the protocol pipelining where a sender will send multiple frames before receiving any kind of acknowledgement
There are finite number of frames in it which can be numbered sequentially
The number of frames that need to send will depend on the size of a sender window
The sender window will determine the size of outbound frames in the sequence 


Principle in the Go-Back-N ARQ

Go-Back-N ARQ follows protocol pipelining principle. In this principle multiple frames are being sent before the receiving of any kind of acknowledgement to its first frame. Though if we are having five frames with the go-back-3 is given.  This means that all the three frames will be sent. They are frame number 1, 2 and 3. 

Before expecting any kind of acknowledgement from all these three frames, the acknowledgement to frame 1 will be sent. The frames will be numbered sequentially in the Go-Back-N ARQ in order to send all multiple frames at a given point of time. It needs a numbering approach so that these numbers will be arranged in a series of sequence or orders in a manner called the sequential manner. 

Sender and receiver windows in Go-Back-N ARQ


The sender window in the Go-Back-N ARQ is defined as the fixed-size window which is useful in determining the number of frames that needs to be transmitted from a sender to the receiver at one go. 

For example; in the Go-Back 4 ARQ, the sender window’s size would be 4.

0 1 2 3 4 5 6 7 8 9 10 11

Though the actual size of a receiver window in the Go-Back-N ARQ will always be 1. This means that your receiver will take at most 1 frame in a given time.

Working of the Go-Back-N ARQ

To know about the working of Go-Back-N ARQ, consider the following example;

Suppose there is a sender with a receiver. Let’s first think that there will be 11 frames which need to send. All these frames will be represented in the form of 0, 1, 2, 3, 4, 5 , 6 , 7, 8 , 9 , 10, 11.

This will be the sequence in your number of frames. Though, the sequence of frames is mainly decided through the size of a sender’s window. But for an ideal understanding, we can take some running sequence as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.

Now let’s assume that the size of your window is 4. This means that four frames will be then sent at a given point of time before the acknowledgement of your first frame. The steps to be followed in this case are:

Step 1: The sender would first send the four frames to its receiver which are 0, 1, 2, 3. Now he will be expected to receive all the 0th frame acknowledgment

Let’s first assure that your receiver has sent an acknowledgment of the 0th frame and he has received it too. 

After that, a sender will send the 4th frame and then the window slides will contain four frames i.e 1, 2, 3 and 4.


After this, the receiver sends acknowledgement to frame 1. Though after receiving this kind of acknowledgement, the sender sends another frame. This is the frame number 5th and then the window will then slide with the four frames which are 2, 3, 4, 5.

Now we have to assume that a receiver has not acknowledged frame 2 because either that frame has lost or its acknowledgement is lost somewhere. Then despite sending the 6th frame, the sender again  goes back to the 2nd frame of a current window to retransmit it with all the present frames present in your current window which are 2, 3, 4 and 5.

Vital points to note here is:

In the Go-Back-N ARQ, the actual size of your receiver window will always be 1
This one will not consider corrupt frames in order to simply discard it
This will not accept all frames which are actually out of their order in order to discard all these frames
If a sender will not receive any kind of acknowledgement, it can lead to the current frame’s retransmission. 

**Wrapping Up **

Go-Back-N ARQ is an important concept of the data link layer that every programmer should know. This forms a vital part in the computer fundamentals.

Keep this guide as your mentor to learn everything about the **[Go Back N ARQ](https://www.codingninjas.com/codestudio/library/go-back-n-arq-protocol)**.

Happy learning!