What is Automatic Repeat ReQuest?
Automatic Repeat ReQuest (ARQ), also called Automatic Repeat Query, is an error control protocol that automatically initiates a call to retransmit any data packet or frame after receiving incorrect or incorrect data. If the sending device does not receive an acknowledgment signal to confirm that the data has been received, it usually retransmits the data after a predefined timeout and repeats the process a predetermined number of times until the sending device receives the acknowledgment.
ARQs are often used to ensure reliable transmissions over an unreliable service.
Three main types of ARQ are the stop-and-wait ARQ, the go-back-N-ARQ, and the selective-repeat ARQ. Stop-and-wait ARQ is the simplest ARQ. One frame is sent at a time, with no further frames being sent until receipt of the previous one is confirmed via an acknowledgment signal.
Go-Back-N ARQ is a much more complex protocol. It allows frames to be sent even if previous frames were received without an acknowledgment signal. This log keeps track of the order. When the last frame is received, it requests retransmission of the frames that were sent without acknowledgment. This is repeated until all frames are received with an acknowledgment signal. However, this protocol can result in many frames being sent multiple times, which can be avoided by using the ARQ selective repetition protocol.
Selective Repeat ARQ can be used for the delivery and confirmation of sent data packets or the delivery of messages divided into sub-units. In the first methodology, the protocol continues to accept and acknowledge frames sent after an initial failure. This continues until a certain number of frames have been received, called the window size. There is a window size for sending and receiving and they have to be the same. The sequence numbers of all frames not received are tracked and sent back to the sender.
The sender continues to send frames with unacknowledged data until the window size is reached (the window has been cleared). If so, the transmitter retransmits the frame number given by the acknowledgment signals and continues from where it left off. To ensure that all frames are received, the size of the send and receive window must be half the maximum sequence number. If the receive window is greater than half the maximum sequence number, some or even all of the frames retransmitted after the required timeouts will be duplicates but will not be recognized as such. If the sender moves his window (called sliding window) for each acknowledgment received, the number of acknowledgments and the largest sequence number must be the same, and half of this number must be the window size used by the recipient.
In the second method, which uses split messages, the process is different. Discontinuous communication channels are used when messages vary in length, but the protocols treat the message as a single entity. Alternatively, each message can be divided into sub-blocks that are of fixed length in a process called packet segmentation. Each message contains a variable number of sub-blocks. Every unacknowledged answer carries an additional bit flag which indicates every successfully received sub-block. Each retransmission decreases in length, it only contains the unacknowledged sub-blocks.
ARQs with variable length messages have increased the difficulty with longer messages because each repeated message is full length. However, the selective retransmission of variable length messages eliminates the difficulty of delivering longer messages when using Selective Repeat ARQ. There are fewer difficulties by maintaining successfully delivered sub-blocks after each transfer and decreasing the number of outstanding sub-blocks after each transfer.
ARQ protocols reside in the data link or transport layers of the OSI model. TCP uses a variant of Go-Back-N ARQ to ensure reliable data transmission over the Internet protocol. However, it does not guarantee the delivery of data packages. When TCP uses Selective Acknowledgment (SACK), Selective Repeat ARQ is used. If local area networks (LAN) have noisy environments, Selective Repeat ARQ with packet segmentation is used.