• Networking
  • Programming
  • DBMS
  • Operating System
  • Internet
  • Hardware
  • Software

Tech Differences

Know the Technical Differences

Difference Between Go-Back-N and Selective Repeat Protocol

Go-back-n & Selective repeat“Go-Back-N Protocol and “Selective Repeat Protocol” are the sliding window protocols. The sliding window protocol is primarily an error control protocol, i.e. it is a method of error detection and error correction.

The basic difference between go-back-n protocol and selective repeat protocol is that the “go-back-n protocol” retransmits all the frames that lie after the frame which is damaged or lost. The “selective repeat protocol” retransmits only that frame which is damaged or lost.

Content: Go-Back-N Vs Selective Repeat

  1. Comparison Chart
  2. Definition
  3. Key Differences
  4. Conclusion

Comparison Chart

Basis for ComparisonGo-Back-NSelective Repeat
BasicRetransmits all the frames that sent after the frame which suspects to be damaged or lost.Retransmits only those frames that are suspected to lost or damaged.
Bandwidth UtilizationIf error rate is high, it wastes a lot of bandwidth.Comparatively less bandwidth is wasted in retransmitting.
ComplexityLess complicated.More complex as it require to apply extra logic and sorting and storage, at sender and receiver.
Window sizeN-1<= (N+1)/2
SortingSorting is neither required at sender side nor at receiver side.Receiver must be able to sort as it has to maintain the sequence of the frames.
StoringReceiver do not store the frames received after the damaged frame until the damaged frame is retransmitted.Receiver stores the frames received after the damaged frame in the buffer until the damaged frame is replaced.
SearchingNo searching of frame is required neither on sender side nor on receiverThe sender must be able to search and select only the requested frame.
ACK NumbersNAK number refer to the next expected frame number.NAK number refer to the frame lost.
UseIt more often used.It is less in practice because of its complexity.

Definition of Go-Back-N

Go-Back-N protocol is a sliding window protocol. It is a mechanism to detect and control the error in datalink layer. During transmission of frames between sender and receiver, if a frame is damaged, lost, or an acknowledgement is lost then the action performed by sender and receiver is explained in the following content.

Go-Back-N

Damaged Frame

If a receiver receives a damaged frame or if an error occurs while receiving a frame then, the receiver sends the NAK ( negative acknowledgement) for that frame along with that frame number, that it expects to be retransmitted. After sending NAK, the receiver discards all the frames that it receives, after a damaged frame.

The receiver does not send any ACK (acknowledgement) for the discarded frames. After the sender receives the NAK for the damaged frame, it retransmits all the frames onwards the frame number referred by NAK.

Lost frame

The receiver checks the number on each frame, it receives. If a frame number is skipped in a sequence, then the receiver easily detects the loss of a frame as the newly received frame is received out of sequence. The receiver sends the NAK for the lost frame and then the receiver discards all the frames received after a lost frame.

The receiver does not send any ACK (acknowledgement) for that discarded frames. After the sender receives the NAK for the lost frame, it retransmits the lost frame referred by NAK and also retransmits all the frames which it has sent after the lost frame.

Lost Acknowledgement

If the sender does not receive any ACK or if the ACK is lost or damaged in between the transmission. The sender waits for the time to run out and as the time run-outs, the sender retransmits all the frames for which it has not received the ACK. The sender identifies the loss of ACK with the help of a timer.

The ACK number, like NAK (negative acknowledgement) number, shows the number of the frame, that receiver expects to be the next in sequence. The window size of the receiver is 1 as the data link layer only require the frame which it has to send next to the network layer. The sender window size is equal to ‘w’. If the error rate is high, a lot of bandwidth is lost wasted.

Definition of  Selective Repeat

Selective repeat is also the sliding window protocol which detects or corrects the error occurred in the datalink layer. The selective repeat protocol retransmits only that frame which is damaged or lost. In selective repeat protocol, the retransmitted framed is received out of sequence. The selective repeat protocol can perform the following actions

  • The receiver is capable of sorting the frame in a proper sequence, as it receives the retransmitted frame whose sequence is out of order of the receiving frame.
  • The sender must be capable of searching the frame for which the NAK has been received.
  • The receiver must contain the buffer to store all the previously received frame on hold till the retransmitted frame is sorted and placed in a proper sequence.
  • The ACK number, like NAK number, refers to the frame which is lost or damaged.
  • It requires the less window size as compared to go-back-n protocol.

Selective repeat

Damaged frames

If a receiver receives a damaged frame, it sends the NAK for the frame in which error or damage is detected. The NAK number, like in go-back-n also indicates the acknowledgement of the previously received frames and error in the current frame.

The receiver keeps receiving the new frames while waiting for the damaged frame to be replaced. The frames that are received after the damaged frame are not be acknowledged until the damaged frame has been replaced.

Lost Frame

As in a selective repeat protocol, a frame can be received out of order and further they are sorted to maintain a proper sequence of the frames. While sorting, if a frame number is skipped, the receiver recognizes that a frame is lost and it sends NAK for that frame to the sender.

After receiving NAK for the lost frame the sender searches that frame in its window and retransmits that frame.  If the last transmitted frame is lost then the receiver does not respond and this silence is a negative acknowledgement for the sender.

Lost Acknowledgement

If the sender does not receive any ACK or the ACK is lost or damaged in between the transmission. The sender waits for the time to run out and as the time run-outs, the sender retransmits all the frames for which it has not received the ACK. The sender identifies the loss of ACK with the help of a timer.

Key Differences Between Go-Back-N and Selective Repeat

  1. Go-Back-N protocol is design to retransmit all the frames that are arrived after the damaged or a lost frame. On the other hand, Selective Repeat protocol retransmits only that frame that is damaged or lost.
  2. If the error rate is high i.e. more frames are being damaged and then retransmitting all the frames that arrived after a damaged frame waste the lots of bandwidth. On the other hand, selective repeat protocol re-transmits only damaged frame hence, minimum bandwidth is wasted.
  3. All the frames after the damaged frame are discarded and the retransmitted frames arrive in a sequence from a damaged frame onwards, so, there is less headache of sorting the frames hence it is less complex. On the other hand, only damaged or suspected frame is retransmitted so, extra logic has to be applied for sorting hence, it is more complicated.
  4. Go-Back-N has a window size of N-1 and selective repeat have a window size <=(N+1)/2.
  5. Neither sender nor receiver needs the sorting algorithm in Go-Back-N whereas, the receiver must be able to sort the as it has to maintain the sequence.
  6. In Go-Back-N receiver discards all the frames after the damaged frame hence, it doesn’t need to store any frames. Selective repeat protocol does not discard the frames arrived after the damaged frame instead it stores those frames till the damaged frame arrives successfully and is sorted in a proper sequence.
  7. In selective repeat, NAK frame refers to the damaged frame number and in Go-Back-N, NAK frame refers to the next frame expected.
  8. Generally, the Go-Back-N is more in use due to its less complex nature instead of Selective Repeat protocol.

Conclusion

The selective repeat is a more efficient protocol as it does not waste bandwidth for the frames which are properly received but, its complexity and expense favours the use of the go-back-n protocol.

Related Differences:

  1. Difference Between TCP and UDP
  2. Difference Between Flow Control and Error Control
  3. Difference Between Frame Relay and ATM
  4. Difference Between Pure ALOHA and Slotted ALOHA
  5. Difference Between Stop-and-Wait Protocol and Sliding Window Protocol

Comments

  1. Solomon says

    October 23, 2016 at 4:29 am

    Awesome explanation on this topic. I was struggling till i saw this. Thanks so much

    Reply
    • Neha K says

      October 24, 2016 at 11:14 am

      We appreciate your view. Keep checking.

      Reply
  2. NIDHI RAMESH says

    November 9, 2016 at 5:05 pm

    easily understood this concept …thank you

    Reply
    • keyur says

      February 23, 2018 at 5:28 pm

      yes true

      Reply
    • shahrukh says

      March 15, 2018 at 5:37 am

      Really nice article…

      Reply
  3. Zohidjon says

    January 23, 2017 at 12:27 pm

    thanks you very much.
    It helps me a lot.

    Reply
  4. karthick dk says

    February 1, 2017 at 4:37 am

    awesome …….techics

    Reply
  5. Rohit Biswas says

    June 10, 2017 at 7:27 pm

    Nicely explained…
    Only place where things are explained lucidly..Thank You 🙂

    Reply
  6. Sudhir Yadav says

    October 10, 2017 at 2:20 pm

    Fabulous technique of understanding thank you Mam

    Reply
  7. Hyder says

    December 30, 2017 at 4:26 pm

    Nice. Helpful. Thank You.

    Reply
  8. Jeevan says

    March 19, 2018 at 9:47 am

    Nice explanation and easily understandable

    Reply
  9. Sukanya says

    May 2, 2018 at 7:22 am

    Explained in easy language easily understood thanks.

    Reply
  10. Ayerh Kingsford nii adjei says

    October 9, 2018 at 8:38 am

    SIMPLE EXPLANATIONS AND WELL UNDERSTOOD
    THANKS VERY MUCH

    Reply
  11. Ajay Singh says

    October 15, 2018 at 5:42 am

    Good explanation!
    Keep continuing……
    Thank you!

    Reply
  12. Hamza says

    October 24, 2018 at 6:20 am

    Thank you so much! It was nicely explained…

    Reply
  13. Saurabh says

    January 19, 2019 at 9:29 am

    The explanation was perfect. But I do not understand why the datalink layer use GO Back N protocol mostly as compare to others…

    Reply
  14. Samarth Chadda says

    March 15, 2019 at 4:02 am

    Topic was well differentiated.
    Great work.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top 10 Differences

  • Difference Between OLTP and OLAP
  • Difference Between while and do-while Loop
  • Difference Between Guided and Unguided Media
  • Difference Between Preemptive and Non-Preemptive Scheduling in OS
  • Difference Between LAN, MAN and WAN
  • Difference Between if-else and switch
  • Difference Between dispose() and finalize() in C#
  • Difference Between for and while loop
  • Difference Between View and Materialized View
  • Difference Between Server-side Scripting and Client-side Scripting

Recent Addition

  • Difference Between Java and Python
  • Difference Between PHP and HTML
  • Difference Between GPS and GNSS 
  • Difference Between Virtualization and Containerization
  • Difference Between Storage and Memory

Categories

  • Artificial Intelligence
  • DBMS
  • Hardware
  • Internet
  • Networking
  • Operating System
  • Programming
  • Software

Copyright © 2025 · Tech Differences · Contact Us · About Us · Privacy