What is selective-repeat ARQ in computer networks?


Selective-repeat Automatic Repeat Request (ARQ) is one of the techniques where a data link layer may deploy to control errors.

Techniques to control ARQ

Generally, there are three types of techniques which control the errors by Automatic Repeat Request (ARQ) they are −

  • Stop-and-wait ARQ
  • Go-Back-N ARQ
  • Selective Repeat ARQ

Requirements for Error Control

There are some requirements for error control mechanisms and they are as follows −

  • Error detection − The sender and receiver, or any must ascertain that there is some error in the transit.

  • Positive ACK − Whenever a receiver receives a correct frame, it should acknowledge it.

  • Negative ACK − Whenever the receiver receives a damaged frame or a duplicate frame, it sends a NACK back to the sender and sender must retransmit the correct frame.

  • Retransmission − The sender always maintains a clock and sets a timeout period. If an ACK of data-frame previously transmitted does not arrive before the timeout, the sender retransmits the frame, thinking that the frame or it’s ACK is lost in transit

Let us see the working condition of Selective Repeat ARQ.

Selective Repeat ARQ

It is also known as Sliding Window Protocol and used for error detection and control in the data link layer.

In the selective repeat, the sender sends several frames specified by a window size even without the need to wait for individual acknowledgement from the receiver as in Go-Back-N ARQ. In selective repeat protocol, the retransmitted frame is received out of sequence.

In Selective Repeat ARQ only the lost or error frames are retransmitted, whereas correct frames are received and buffered.

The receiver while keeping track of sequence numbers buffers the frames in memory and sends NACK for only frames which are missing or damaged. The sender will send/retransmit a packet for which NACK is received.

Example

Given below is an example of the Selective Repeat ARQ −

Explanation

Step 1 − Frame 0 sends from sender to receiver and set timer.

Step 2 − Without waiting for acknowledgement from the receiver another frame, Frame1 is sent by sender by setting the timer for it.

Step 3 − In the same way frame2 is also sent to the receiver by setting the timer without waiting for previous acknowledgement.

Step 4 − Whenever sender receives the ACK0 from receiver, within the frame 0 timer then it is closed and sent to the next frame, frame 3.

Step 5 − whenever the sender receives the ACK1 from the receiver, within the frame 1 timer then it is closed and sent to the next frame, frame 4.

Step 6 − If the sender doesn’t receive the ACK2 from the receiver within the time slot, it declares timeout for frame 2 and resends the frame 2 again, because it thought the frame2 may be lost or damaged.

Updated on: 01-Nov-2023

40K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements