Difference Between Go-Back-N and Selective Repeat Protocol



Go-Back-N is a data link layer protocol that uses a sliding window method for reliable and sequential delivery of data frames. It is a case of sliding window protocol having to send window size of N and receiving window size of 1.

Selective Repeat Protocol is also 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.

Read through this article to find out how these two data link layer protocols work and what are the major differences between them.

What is Go-Back-N Protocol?

The Go-Back-N ARQ protocol is a variant of the Automatic Repeat Request (ARQ) protocol.

  • The sender sends several frames determined by a window size even if the receiver does not respond with an acknowledgment (ACK) packet.

  • A transmit window size of N, and a receive window size of 1 is a particular case of the basic sliding window protocol. It can send N frames to the peer before requesting an acknowledgment.

  • It works on the notion of protocol pipelining, which allows numerous frames to be delivered before the first frame is acknowledged.

  • The shelves in Go-Back-N ARQ are numbered consecutively because Go-Back-N ARQ provides multiple brackets at once, necessitating a numbering strategy to identify one frame from another. These numbers are referred to as sequential numbers.

  • The maximum number of frames that can be sent at once is entirely dependent on the sender's window size. All structures in the current window will be retransmitted if a frame's acknowledgment is not received within the agreed-upon time frame.

What is Selective Repeat Protocol?

Selective Repeat is a variant of the Automated Repeat Request (ARQ) protocol used in reliable communications to handle sequence numbers and retransmissions.

  • Particular repetition allows the transmitter to deliver a set number of frames without waiting for individual ACK from the recipient, as in Go-Back-N ARQ.

  • It employs two equal-sized windows: a sending window for storing frames to be sent and a receiving window for storing frames received by the receiver. The size is half of the frame's maximum sequence number. For example, if the sequence number is from 0–15, the window size will be 8.

  • Even if it does not receive acknowledgment for any frame in the interim, the Selective Repeat protocol allows it to send several frames based on the availability of structures in the sending window.

  • The size of the transmitting window determines the maximum number of frames that can be sent.

Difference between Go-Back-N and Selective Repeat Protocol

The following table highlights the major differences between the Go-Back-N and the Selective Repeat protocols −

KeyGo-Back-NSelective Repeat
DefinitionIn Go-Back-N, if a sent frame is found suspected or damaged, then all the frames are retransmitted till the last packet.In Selective Repeat, only the suspected or damaged frames are retransmitted.
Sender Window SizeSender Window is of size N.Sender Window size is same as N.
Receiver Window SizeReceiver Window Size is 1.Receiver Window Size is N.
ComplexityGo-Back-N is easier to implement.In Selective Repeat, receiver window needs to sort the frames.
EfficiencyEfficiency of Go-Back-N = N / (1 + 2a), where "a" is ratio of propagation delay vs. transmission delay and "N" is the number of packets sent.Efficiency of Selective Repeat = N / (1 + 2a).
AcknowledgementAcknowledgement type is cumulative.Acknowledgement type is individual.
SortingNeither the sender nor the recipient requires sorting.To sort the frames on the receiver side, sorting is needed.
Out-of-order PacketsOut-of-Order packets are rejected, and the entire window is re-transmitted.Out-of-Order packets are accepted in the selective Repeat protocol.
Minimum Sequence NumberThe Minimum Sequence Number in the Go-Back-N protocol is N+1, where "N" is the number of packets sent.The Minimum Sequence Number in the Selective Repeat protocol is 2N, where "N" is the number of packets transmitted.

Conclusion

Go-Back-N consumes more bandwidth because it would retransmit an entire window even if a single packet is lost. If the rate of error is high, then Go-Back-N will consume a lot of bandwidth. Selective Repeat is a better option if you have to be consider bandwidth requirement, as it would resend only the defective or missing packets and not the entire windows.

Go-Back-N uses cumulative acknowledgements which can reduce the traffic; however, there's always a risk of losing the cumulative acknowledgement. If it happens so, then the acknowledgements of all the corresponding packets are lost.


Advertisements