0% found this document useful (0 votes)
229 views

1.selective Repeat ARQ Protocol: (Author)

The document summarizes the Selective Repeat ARQ protocol. It uses two windows of equal size - a sending window that stores frames to be sent and a receiving window that stores received frames. Only erroneous or lost frames are retransmitted, while good frames are received and buffered. The sender continues sending frames within its window and retransmits any frames requested by missing sequence numbers in acknowledgements. The protocol allows out-of-order frames to be buffered at the receiver until an in-order set can be delivered to the network layer. It is more efficient than Go-Back-N ARQ for noisy links as only lost frames are retransmitted.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
229 views

1.selective Repeat ARQ Protocol: (Author)

The document summarizes the Selective Repeat ARQ protocol. It uses two windows of equal size - a sending window that stores frames to be sent and a receiving window that stores received frames. Only erroneous or lost frames are retransmitted, while good frames are received and buffered. The sender continues sending frames within its window and retransmits any frames requested by missing sequence numbers in acknowledgements. The protocol allows out-of-order frames to be buffered at the receiver until an in-order set can be delivered to the network layer. It is more efficient than Go-Back-N ARQ for noisy links as only lost frames are retransmitted.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Chapter 1

INTRODUCTION
1.Selective Repeat ARQ Protocol

Selective repeat protocol, also called Selective Repeat ARQ (Automatic Repeat reQuest), is a
data link layer protocol that uses sliding window method for reliable delivery of data frames.
Here, only the erroneous or lost frames are retransmitted, while the good frames are received
and buffered.

It uses two windows of equal size: a sending window that stores the frames to be sent and a
receiving window that stores the frames receive by the receiver. The size is half the
maximum sequence number of the frame. 

1.1 Working Principle

Selective Repeat protocol provides for sending multiple frames depending upon the
availability of frames in the sending window, even if it does not receive acknowledgement
for any frame in the interim. The maximum number of frames that can be sent depends upon
the size of the sending window.

The receiver records the sequence number of the earliest incorrect or un-received frame. It
then fills the receiving window with the subsequent frames that it has received. It sends the
sequence number of the missing frame along with every acknowledgement frame.

The sender continues to send frames that are in its sending window. Once, it has sent all the
frames in the window, it retransmits the frame whose sequence number is given by the
acknowledgements. It then continues sending the other frames.

Go-Back-N ARQ simplifies the process at the receiver site. The receiver keeps track of only
one variable, and there is no need to buffer out-of-order frames; they are simply discarded.
However, this protocol is very inefficient for a noisy link. 

In a noisy link a frame has a higher probability of damage, which means the resending of
multiple frames. This resending uses up the bandwidth and slows down the transmission. For
noisy links, there is another mechanism that does not resend N frames when just one frame is
damaged; only the damaged frame is resent. This mechanism is called Selective Repeat ARQ.
It is more efficient for noisy links, but the processing at the receiver is more complex.

[Author] 1
The Selective Repeat Protocol also uses two windows: a send window and a receive window.
However, there are differences between the windows in this protocol and the ones in Go-
Back-N. First, the size of the send window is much smaller; it is 2m- 1
The send window maximum size can be 2m- 1. The smaller window size means less
efficiency in filling the pipe, but the fact that there are fewer duplicate frames can
compensate for this.

The Selective Repeat Protocol allows as many frames as the size of the receive window to
arrive out of order and be kept until there is a set of in-order frames to be delivered to the
network layer. Because the sizes of the send window and receive window are the same, all
the frames in the send frame can arrive out of order and be stored until they can be delivered.
We need, however, to mention that the receiver never delivers packets out of

The above figure shows the receive window in this protocol. Those slots inside the window
that are colored define frames that have arrived out of order and are waiting for their
neighbors to arrive before delivery to the network layer.

[Author] 2
Design:
The design in this case is to some extent similar to the one we described for the Go Back-N,
but more complicated, as shown in the following figure.

[Author] 3
1.2 Features of ARQ
We can now show why the size of the sender and receiver windows must be at most one half
of 2m. For an example, we choose m = 2, which means the size of the window is 2m/2, or 2.
order to the network layer.

If the size of the window is 2 and all acknowledgments are lost, the timer for frame 0 expires
and frame 0 is resent. However, the window of the receiver is now expecting frame 2, not
frame 0, so this duplicate frame is correctly discarded.
When the size of the window is 3 and all acknowledgments are lost, the sender sends a
duplicate of frame 0. However, this time, the window of the receiver expects to receive frame
0 (0 is part of the window), so it accepts frame 0, not as a duplicate, but as the first frame in
the next cycle. This is clearly an error.

Flow Control - Selective Repeat Protocol

Let's just look back at the STOP & WAIT, STOP & WAIT ARQ protocols both of which had
some drawbacks and then the Go-Back-N ARQ protocol which too had some limitations, as
we studied that it requires more bandwidth while retransmitting the data packets, so now, to
overcome this problem we came to an alternative technique, which is known as Selective
Repeat Protocol.

So, what selective repeat protocol does is that it allows the receiver to accept & buffer the
data packets following a damaged or lost one and then retransmits only those data packets
which were lost or damaged in the network channel during transmission.

Let's take an example, consider you are sending data packets indexing from packet p1 to p5,
now p1 & p2 are received successfully but packet p3 got lost or damaged in the network
channel, now unlike Go-Back-N ARQ, as per the selective repeat protocol, the sender will
send the packet p4 & p5, which the receiver will receive and after that, the selective repeat
protocol will retransmit packet p3.

[Author] 4
1.3 Retransmission request:

 Implicit Retransmission request: Here, it's the receiver's duty to acknowledge or


give positive feedback of received data packet and negative feedback for those which
were lost or damaged during transmission, and that too before the expiry of time out
timer.

 Explicit Retransmission request: In explicit retransmission, the receiver can request


retransmission of just one packet
 Selective Repeat Protocol
 This protocol is almost like Go-Back-N ARQ protocol, or we can say that it is a
modified form of GBN ARQ, the part where it differs is that here buffers are used and
both receiver & sender maintain a window of size. This selective repeat works better
at times when the network link is mostly unreliable. Because here, in this case,
retransmission tends to happen more frequently, the selective retransmission of
frames is much more efficient than retransmitting all the frames, selective repeat also
requires full-duplex communication channel for consistently transferring the data
packet & the feedback/acknowledgment.
 The sender's window must be equal to the receiver's window and the window size
should be less than or equal to half of the sequence number in the selective repeat
protocol. This is to avoid the data packets being recognized incorrectly.
 If the window size is greater than the sequence number space and then if a
feedback/acknowledgment is lost, then the sender may send new data packets that the
receiver believes are retransmissions.
 The receiver then stores the correct packets until they can be delivered in the order, to
the higher layers.
 Now, in the above diagram, the sender first sends frame1(i.e. 0) and immediately the
receiver acknowledges the frame and then, the frame2 is transmitted which too got
acknowledged. Now, as we can see frame3 is lost during the transmission & was
unable to reach the receiver, but the next frame, which is frame4 is transmitted and
also accepted by the receiver, who then sends a negative acknowledgment due to
which the sender only transmits frame3 again instead of retransmitting all the frames
starting from frame3(which happens in Go-Back-N ARQ).

[Author] 5
 The efficiency of selective repeat protocol is the same as of Go-Back-N ARQ
protocol's efficiency.
 Efficiency = N/(1+2a)
 Where, a = propagation delay/transmission delay
 Buffers = N+N
 Sequence number = N(sender's side)+N(receiver's side)

1.4Applications
 ARQ protocols have a wide range of applications as they provide reliable
transmissions over unreliable upper sources. These protocols are mainly functional
on shortwave radio to ensure reliable delivery of signals. 
For the same function of ARQ, there are various applications: 
  Transmission Control Protocol (TCP)
 .Specific Service Orientation Protocol: Error-correction of message signals in
ATM networks.
 .High-Level Data Link protocol.
 IBM Binary synchronous Communications Protocol.
1.5 Types
There are several types of ways in which these protocols function in the data link layer

 Stop And WaiT ARQ


Stop and wait ARQ is also referred to as the alternating protocol is a method
used in two-way communication systems to send information between two
connected devices (sender and a receiver). It is referred to as stop and wait ARQ
because the function of this protocol is to send one frame at a time . After
sending a frame or packet, the sender doesn’t send any further packets until it
receives an acknowledgement from the receiver. Moreover, the sender keeps a
copy of the sent packet. After receiving the desired frame, the receiver sends an
acknowledgement. If the acknowledgement does not reach the sender before the
specified time, known as the timeout, the sender sends the same packet again.
The timeout is reset after each frame transmission. The above scenario depicts a
Stop and wait situation, so this control mechanism is termed as Stop and wait

[Author] 6
ARQ. 
 
 Go Back-N ARQ: 
Go-Back-N ARQ is a type of the ARQ protocol, in which the sending process
continues to send several frames or packets even without receiving an
acknowledgement packet from the receiver. The receiver process keeps track
of the sequence number of the next packet it expects to receive and sends that
sequence number with every acknowledgement to the sender. The receiver will
remove any packet that does not have the desired sequence number it expects
and will resend an acknowledgement for the last correct frame. There are only
two possibilities that a frame won’t match the sequence number: it is either a
duplicated frame of an existing frame or an out-of-order frame that needs to be
sent later, the receiver recognizes this scenario and sends an acknowledgement
signal accordingly. Once the sender has sent all of the frames in its window, it
will identify that all of the frames since the first lost frame, and will go back to
the sequence number of the last acknowledgement signal that it received from
the receiver pr and continue the process over again. The only drawback of this
type of system is that it results in sending packets multiple times: if any frame
was lost or found to be corrupted, then that frame and all following frames in the
send window will be re-transmitted. 
This protocol is more efficient than Stop and wait ARQ as there is no waiting
time.
 Selective Repeat ARQ/Selective Reject ARQ: 
Selective Repeat ARQ/Selective Reject ARQ protocol mechanism is similar to
the Go-Back-N protocol mechanism but in Selective Repeat ARQ the sending
process continues even after a frame is found to be corrupt or lost. This is
achieved: the receiver process keeps track of the sequence number of the earliest
frame it has not received and sends the respective sequence number with the
acknowledgement signal. If a frame is not received at the receiver end, the
sender continues to send the succeeding frames until it has emptied its window.
once this error-correction process has been done, the process continues where it
left off. Unlike, Go back-N protocol this does not send a packet multiple times.  

[Author] 7
Advantages of ARQ
 

 The Error-detection and correction mechanisms are quite simple compared to the
other techniques.
 A much simpler decoding equipment can be put to use compared to the other
techniques.

Disadvantages of ARQ
 

 A medium or a channel with a high error rate might cause too much
transmission of the frames or packets of information.
 The high error rate in the channel might also lead to loss of
information, therefore reducing the efficiency or the productivity of
the system.

[Author] 8
 Conclusion:
 With this we have covered the three fow control protocol of computer networks,
namely, STOP & WAIT, STOP & WAIT ARQ, Go-Back-N ARQ protocol and the
Selective Repeat Protocol. You can learn more about Computer Networks from
our Computer Network tutorial.

[Author] 9

You might also like