In computer networks, data is transmitted from one device to another in the form of frames. During transmission, some frames may get lost, damaged, or delayed due to network problems or communication errors.
To ensure reliable data transmission, computer networks use error control techniques. One important technique is Automatic Repeat reQuest (ARQ).
Sliding Window ARQ is an error control mechanism that allows the sender to transmit multiple frames before receiving acknowledgements from the receiver.
Unlike the Stop-and-Wait ARQ protocol, which sends one frame at a time, Sliding Window ARQ allows several frames to be transmitted continuously. This improves communication efficiency and makes better use of the available network bandwidth.
The sender and receiver maintain windows to keep track of transmitted and received frames. When acknowledgements are received, the sender’s window moves forward, allowing new frames to be transmitted.
Go-Back-N ARQ and Selective Repeat ARQ are two important types of Sliding Window ARQ protocols.
What Is Sliding Window ARQ?
Sliding Window ARQ (Automatic Repeat reQuest) is a flow control and error control mechanism in computer networks that allows the sender to transmit multiple frames continuously before receiving acknowledgements.
In this technique, the sender maintains a window that specifies the number of frames it can transmit without waiting for acknowledgements.
The receiver also maintains a window to identify which frames it can accept.
Each frame is assigned a sequence number so that the sender and receiver can identify frames and maintain their correct order.
When the receiver successfully receives frames, it sends acknowledgements to the sender. Based on these acknowledgements, the sender moves its window forward and transmits new frames.
If a frame is lost or damaged, the protocol uses retransmission to recover the missing information.
Example:
Suppose the sender has a window size of 4. It can transmit four frames numbered 0, 1, 2, and 3 without waiting for individual acknowledgements.
After receiving acknowledgements, the sender moves its window forward and can transmit the next frames.
Working Principle of Sliding Window ARQ
Sliding Window ARQ works by maintaining a sending window and a receiving window. These windows help control the transmission and reception of frames.
The working process involves the following steps:
1. Frame Numbering: The sender assigns a sequence number to every frame before transmission.
2. Window Creation: The sender creates a window that determines how many frames can be transmitted without waiting for acknowledgements.
3. Continuous Transmission: The sender transmits multiple frames continuously within the permitted window.
4. Frame Reception: The receiver receives the transmitted frames and checks whether they are correct and in the expected order.
5. Acknowledgement: The receiver sends acknowledgements to inform the sender about successfully received frames.
6. Window Movement: After receiving acknowledgements, the sender moves its window forward and makes space for new frames.
7. Error Handling: If a frame is lost or damaged, the protocol uses retransmission to recover the missing frame.
8. Reliable Communication: This process continues until all the required frames are transmitted and acknowledged.
Types of Sliding Window ARQ
There are two major types of Sliding Window ARQ protocols.
1. Go-Back-N ARQ
Go-Back-N ARQ is a continuous error control protocol in which the sender can transmit multiple frames before receiving acknowledgements.
If a frame is lost or damaged, the sender retransmits that frame and all subsequent unacknowledged frames.
The receiver accepts only frames that arrive in the correct sequence and discards out-of-order frames.
2. Selective Repeat ARQ
Selective Repeat ARQ is an error control protocol in which the sender retransmits only the specific frames that are lost or damaged.
Unlike Go-Back-N ARQ, the receiver can accept and temporarily store correctly received out-of-order frames.
This reduces unnecessary retransmissions and improves efficiency, but it requires more complex sender and receiver operations.
What Is Go-Back-N Continuous ARQ?
Go-Back-N ARQ (Automatic Repeat reQuest) is a continuous error control protocol in which the sender can transmit multiple frames without waiting for an acknowledgement after every frame. If a frame is lost or damaged, the sender retransmits that frame along with all the subsequent unacknowledged frames.
Go-Back-N ARQ uses a sliding window mechanism to control the transmission of frames.
Each frame is assigned a sequence number. The sender can transmit multiple frames within its window, while the receiver accepts only frames that arrive in the correct sequence.
If a frame is missing, the receiver discards the subsequent out-of-order frames and sends a cumulative acknowledgement indicating the next expected frame.
The sender then retransmits the missing frame and all subsequent unacknowledged frames.
It is called Go-Back-N because the sender goes back to the first missing or damaged frame and retransmits the remaining unacknowledged frames.
Working Principle of Go-Back-N ARQ
Go-Back-N ARQ works using sequence numbers, sliding windows, acknowledgements, and timers.
The working process can be explained through the following steps:
1. Assigning Sequence Numbers: The sender assigns a unique sequence number to each frame before transmitting it.
2. Maintaining the Sending Window: The sender maintains a window that determines the maximum number of frames it can transmit without receiving acknowledgements.
3. Continuous Frame Transmission: The sender transmits multiple frames continuously within the window.
4. Receiving Frames: The receiver checks the incoming frames and accepts only those that arrive in the correct order.
5. Sending Acknowledgements: The receiver sends cumulative acknowledgements to inform the sender about successfully received frames. For example, ACK 2 indicates that frame 2 is the next expected frame.
6. Detecting Errors: If a frame is lost or damaged, the receiver does not accept subsequent out-of-order frames.
7. Timeout: If the sender does not receive the required acknowledgement within the specified time, the timer expires.
8. Retransmission: The sender retransmits the missing frame and all subsequent unacknowledged frames.
9. Sliding the Window: After receiving acknowledgements, the sender moves its window forward and continues transmitting new frames.
Detailed Example of Go-Back-N ARQ Error Control Scheme
Let us understand the working of Go-Back-N ARQ with a simple example.
Consider the following situation:
- The sender wants to transmit frames 0, 1, 2, 3, and 4.
- The sender window size is 4.
- Frame 2 is lost during transmission.
- The receiver accepts only frames in the correct sequence.
Step 1: Sender Transmits Frames
The sender transmits frames 0, 1, 2, and 3 continuously without waiting for individual acknowledgements.
Step 2: Receiver Receives Frames
The receiver successfully receives frames 0 and 1.
However, frame 2 is lost during transmission.
Step 3: Receiver Discards Subsequent Frames
When frame 3 arrives, the receiver discards it because it is still waiting for frame 2.
The receiver sends ACK 2, indicating that frame 2 is the next expected frame.
Step 4: Sender Identifies the Error
The sender receives ACK 2 or detects a timeout for the oldest unacknowledged frame.
It identifies that frame 2 and the subsequent unacknowledged frames must be retransmitted.
Step 5: Retransmission of Frames
The sender retransmits frames 2 and 3.
If frame 4 was also transmitted before the error was handled, it must also be retransmitted.
Step 6: Successful Reception
The receiver receives the retransmitted frames in the correct order and accepts them.
It sends ACK 4, indicating that frame 4 is the next expected frame.
The sender can now continue transmitting new frames.

Figure: Go-Back-N Continuous ARQ Error Control Scheme
Sliding Window Mechanism in Go-Back-N ARQ
The sliding window mechanism controls how many frames can be transmitted before acknowledgements are received.
Go-Back-N ARQ uses two windows:
1. Sender Window
- The sender window determines the maximum number of frames that can be transmitted without receiving acknowledgements.
- It can contain multiple frames.
- After receiving acknowledgements, the window moves forward.
- This allows the sender to transmit new frames.
For example, if the window size is 4, the sender can transmit frames 0, 1, 2, and 3 continuously.
2. Receiver Window
- The receiver window determines which frame the receiver is currently expecting.
- In Go-Back-N ARQ, the receiver window size is always 1.
- It accepts only the next expected frame.
- It discards out-of-order frames.
Window Size Formula
If the sequence number field contains \(m\) bits, the maximum sender window size is:
Where:
- \(W_s\) = Sender window size.
- \(m\) = Number of bits used for sequence numbers.
The receiver window size is:
Example:
If the sequence number field contains 3 bits:
Therefore, the maximum sender window size is 7 frames, and the receiver window size is 1.
Advantages of Go-Back-N ARQ
1. Continuous Transmission: The sender can transmit multiple frames without waiting for an acknowledgement after every frame.
2. Improved Efficiency: It provides better channel utilization compared to Stop-and-Wait ARQ, especially when communication delays are high.
3. Simple Receiver Design: The receiver accepts only frames in the correct sequence, making its operation relatively simple.
4. Cumulative Acknowledgements: It reduces acknowledgement overhead because one acknowledgement can confirm multiple previously received frames.
5. Automatic Retransmission: Lost or damaged frames and subsequent unacknowledged frames are retransmitted automatically.
6. Reliable Communication: It helps maintain the correct order of frames during data transmission.
Disadvantages of Go-Back-N ARQ
1. Unnecessary Retransmission: If one frame is lost, all subsequent unacknowledged frames must be retransmitted, even if some were received correctly.
2. Reduced Efficiency During Errors: Frequent transmission errors can increase the number of retransmissions.
3. Bandwidth Wastage: Retransmitting multiple frames increases network traffic.
4. Buffer Requirement: The sender needs sufficient buffer space to store transmitted frames until they are acknowledged.
5. Performance Limitations: Its efficiency decreases when the communication channel has a high error rate.
Difference Between Go-Back-N ARQ and Selective Repeat ARQ
| Go-Back-N ARQ | Selective Repeat ARQ |
|---|---|
| Retransmits the lost frame and all subsequent unacknowledged frames. | Retransmits only lost or damaged frames. |
| Receiver accepts only in-order frames. | Receiver can accept and buffer out-of-order frames. |
| Receiver window size is 1. | Receiver window size can be greater than 1. |
| Requires less receiver buffering. | Requires more receiver buffering. |
| Simpler to implement. | More complex to implement. |
| May cause unnecessary retransmissions. | Reduces unnecessary retransmissions. |