Open In App

Difference Between Go-Back-N and Selective Repeat Protocol

Last Updated : 27 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Both the 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 the selective repeat protocol re-transmits only the 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.

Sliding_SET_2-1
Go-Back-N Protocol

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.

Key features of the Go-Back-N (GBN) protocol

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

Selective Repeat Protocol

The Selective Repeat protocol is 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.

Sliding-Window-Protocol
Selective Repeat Protocol

 Key Features of Selective Repeat Protocol

  • 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 Go-Back-N and Selective Repeat Protocol

  • 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.
  • Efficiency of both the protocols is

N/(1+2a)

where,

  • N is the number of frames
  • a= Propagation delay/Transmission delay

Difference Between Go-Back-N and Selective Repeat Protocol

Go-Back-N ProtocolSelective Repeat Protocol
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.
Sender window size of Go-Back-N Protocol is N.Sender window size of selective Repeat protocol is also N.
Receiver window size of Go-Back-N Protocol is 1.Receiver window size of selective Repeat protocol is N.
Go-Back-N Protocol is less complex.Selective Repeat protocol is more complex.
In Go-Back-N Protocol, neither sender nor at receiver need sorting.In selective Repeat protocol, receiver side needs sorting to sort the frames.
In Go-Back-N Protocol, type of Acknowledgement is cumulative.In Selective Repeat protocol, type of Acknowledgement is individual.
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.
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.

Next Article

Similar Reads