Open In App
Related Articles

Difference Between Go-Back-N and Selective Repeat Protocol

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

Both Go-Back-N Protocol and Selective Repeat Protocol are the types of sliding window protocols. The main difference between these two protocols is that after finding the suspect or damage in sent frames go-back-n protocol re-transmits all the frames whereas selective repeat protocol re-transmits only that frame which is damaged.

Go-Back-N Protocol:

The Go-Back-N protocol is a sliding window protocol used for reliable data transfer in computer networks. It is a sender-based protocol that allows the sender to transmit multiple packets without waiting for an acknowledgement for each packet. The receiver sends a cumulative acknowledgement for a sequence of packets, indicating the last correctly received packet. If any packet is lost, the receiver sends a negative acknowledgement (NACK) for the lost packet, and the sender retransmits all the packets in the window starting from the lost packet. The sender also maintains a timer for each packet, and if an acknowledgement is not received within the timer’s timeout period, the sender retransmits all packets in the window.

The key features of the Go-Back-N (GBN) protocol include:

  • Sliding window mechanism
  • Sequence numbers
  • Cumulative acknowledgements
  • Timeout mechanism
  • NACK mechanism
  • Simple implementation.

Selective Repeat Protocol:

The Selective Repeat protocol is another sliding window protocol used for reliable data transfer in computer networks. It is a receiver-based protocol that allows the receiver to acknowledge each packet individually, rather than a cumulative acknowledgement of a sequence of packets. The sender sends packets in a window and waits for acknowledgements for each packet in the window. If a packet is lost, the receiver sends a NACK for the lost packet, and the sender retransmits only that packet. The sender also maintains a timer for each packet, and if an acknowledgement is not received within the timer’s timeout period, the sender retransmits only that packet.

 key features include:

  • Receiver-based protocol
  • Each packet is individually acknowledged by the receiver
  • Only lost packets are retransmitted, reducing network congestion
  • Maintains a buffer to store out-of-order packets
  • Requires more memory and processing power than Go-Back-N
  • Provides efficient transmission of packets.

Similarities between the two protocols are:

  • Both protocols use a sliding window mechanism to allow the sender to transmit multiple packets without waiting for an acknowledgement for each packet.
  • Both protocols use sequence numbers to ensure the correct order of packets.
  • Both protocols use a timer mechanism to handle lost or corrupted packets.
  • Both protocols can retransmit packets that are not acknowledged by the receiver.
  • Both protocols can reduce network congestion by only retransmitting lost packets.
  • Both protocols are widely used in modern communication networks.

 Now, we shall see the difference between them:

S.NOGo-Back-N ProtocolSelective Repeat Protocol
1.In Go-Back-N Protocol, if the sent frame are find suspected then all the frames are re-transmitted from the lost packet to the last packet transmitted.In selective Repeat protocol, only those frames are re-transmitted which are found suspected.
2.Sender window size of Go-Back-N Protocol is N.Sender window size of selective Repeat protocol is also N.
3.Receiver window size of Go-Back-N Protocol is 1.Receiver window size of selective Repeat protocol is N.
4.Go-Back-N Protocol is less complex.Selective Repeat protocol is more complex.
5.In Go-Back-N Protocol, neither sender nor at receiver need sorting.In selective Repeat protocol, receiver side needs sorting to sort the frames.
6.In Go-Back-N Protocol, type of Acknowledgement is cumulative.In selective Repeat protocol, type of Acknowledgement is individual.
7.In Go-Back-N Protocol, Out-of-Order packets are NOT Accepted (discarded) and the entire window is re-transmitted.In selective Repeat protocol, Out-of-Order packets are Accepted.
8.In Go-Back-N Protocol, if Receives  a corrupt packet, then also, the entire window is re-transmitted.In selective Repeat protocol, if Receives  a corrupt packet, it immediately sends a negative acknowledgement and hence only the selective packet is retransmitted.
9.

Efficiency of Go-Back-N Protocol is

N/(1+2*a)

Efficiency of selective Repeat protocol is also

N/(1+2*a)

Last Updated : 18 Mar, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads