Site icon DataFlair

GO-BACK-N ARQ Protocol

go back n arq

FREE Online Courses: Elevate Your Skills, Zero Cost Attached - Enroll Now!

GO-BACK-N ARQ employs the protocol pipelining idea, in which numerous frames can be delivered before getting acknowledgment of the first frame. If we have 5 frames and the window size is 3, then frame 1, frame 2, and frame 3 can be sent before anticipating the acknowledgment of frame 1.

The frames in Go-Back-N ARQ are numbered consecutively because Go-Back-N ARQ delivers numerous frames at a time, which necessitates the numbering strategy to identify one frame from another, and these numbers are known as the sequential numbers.

The number of frames that may be sent at the same time is entirely determined by the size of the sender’s window. As a result, ‘N’ is the number of frames that can be delivered at the same time before getting an acknowledgment from the recipient.

If a frame’s acknowledgment is not received within a certain time period, all frames in the window will be retransmitted. If we sent frame 5 but did not receive acknowledgment, and the current window is holding three frames, then these three frames will be retransmitted.

The outgoing frame sequence number is determined by the size of the sender’s window.
If the sender’s window size is four, the sequence number will be 0,1,2,3 and then the sequence repeats.
To produce the binary sequence 00,01,10,11, the sequence number has two bits.

Working of Go-Back-N ARQ:

First, the sender will transmit the first four frames to the receiver, namely 0, 1, 2, 3, and now the sender expects to get the acknowledgment of the 0th frame.

Assume the receiver delivered the acknowledgment for the 0 frame, and the recipient received it successfully.

Technology is evolving rapidly!
Stay updated with DataFlair on WhatsApp!!

The sender will then transmit the following frame, which is 4, and the window slides, containing four frames (1,2,3,4).

The acknowledgment for frame no. 1 will then be sent by the receiver. Following receipt of the acknowledgment, the sender will transmit the following frame, frame number 5, and the window will move with four frames (2,3,4,5).

Assume that the receiver is not acknowledging frame no. 2; either the frame or the acknowledgment is lost. Instead of transmitting frame number 6, the sender Go-Back to 2, which is the initial frame of the current window, retransmits all frames in the current window, namely 2,3,4,5.

Characteristics of Go-Back-N ARQ:

1. N specifies the size of the sender’s window in Go-Back-N, while the size of the receiver’s window is always 1.
2. It ignores the corrupted frames and just discards them.
3. It rejects frames that are out of sequence and discards them.
4. If the sender does not get the acknowledgment, all of the current window frames are resent.

Example of Go-Back-N ARQ (with window size = 4):

1. Because the window size is four, four packets are exchanged at a time, namely packets no. 1, 2, 3, and 4.

2. Once the window size transfer is complete, the sender gets acknowledgment of the first frame, i.e., packet no1. As soon as the acknowledgment is received, the sender sends the following packet, packet no. 5. In this scenario, the window slides with four packets, namely 2,3,4,5, and excludes packet 1 since the acknowledgment of packet 1 was successfully received.

3. The sender has now received packet 2’s acknowledgment. Following receipt of the acknowledgment for packet 2, the sender transmits the following packet, packet no. 6. As stated in the question, every sixth packet is lost, hence this sixth packet is lost, but the sender is unaware that the sixth packet has been lost.

4. The acknowledgment for packet no. 3 is received by the sender. After getting the acknowledgment for the third packet, the sender transmits the seventh packet. The glass will slide with four packages, numbered 4, 5, 6, and 7.

5. When packet number 7 is delivered, the sender receives the acknowledgment for packet number 4. When the sender receives the acknowledgment, he or she transmits the following packet, which is the eighth packet. The window will slide with four packages, numbered 5, 6, 7, and 8.

6. When packet 8 is dispatched, the sender receives packet 5’s acknowledgment. When the sender receives acknowledgment for packet 5, he transmits the following packet, which is the 9th packet. The glass will slide with four packages, numbered 6, 7, 8, and 9.

7. The current window contains four packets, numbered 6, 7, 8, and 9, with the sixth packet being the first in the window. Because the sixth packet was lost, the sender receives the negative acknowledgment NAK (6). Because we know that every sixth packet is lost, the counter will be reset to 1. As a result, the counter values 1, 2, 3 are assigned to the seventh, eighth, and ninth packets, respectively.

8. Because it is Go-BACK, it retransmits all packets from the current window. It will transmit the numbers 6, 7, 8, and 9. The counter values for the numbers 6, 7, 8, and 9 are 4, 5, 6, and 1, respectively. In this scenario, the 8th packet is lost since it contains a 6-counter value, therefore the counter variable is reset to 1.

9. Following the retransmission, the sender receives packet 6 acknowledgment. When the sender receives acknowledgment for packet 6, he transmits the tenth packet. The current window now contains four packets, numbered 7, 8, 9, and 10.

10. When the tenth packet is transmitted, the sender receives packet 7’s acknowledgment. The current window now contains three packets, numbered 8, 9, and 10. The counter values for the numbers 8, 9, and 10 are 6, 1, and 2.

11. The 8th packet contains a counter value of 6, indicating that it was lost, and the sender receives NAK (8).

 

12. Because the sender got a negative acknowledgment for the eighth packet, it resends all of the packets in the current window, namely 8, 9, and 10.

13. The counter values for 8, 9, and 10 are 3, 4, and 5, respectively, indicating that their acknowledgments were properly received.

14. The foregoing statistic leads us to the conclusion that a total of 17 transmissions are necessary.

Summary:

In this article, we took a detailed look at the Go-Back-N ARQ Protocol. We also looked at the working of this protocol, along with a real life example that explores every possible scenario that could happen while this protocol is used.

Exit mobile version