In day-to-day communication, a typical conversation involves a prompt response. Similarly, networked devices also require a similar mechanism to ensure there are no errors. This is the concept behind ACK and NAK used to define Acknowledgement and Negative Acknowledgement in the process of transporting a message from one point to the next. Using these messages, a sender can identify whether the packet was received or needs to be sent again. This process is carried out using algorithms such as GBN and Selective repeating. In Selective repeating, a sender is allowed to send a predetermined number of non-acknowledged packets. On the receiver’s end, the packets are acknowledged individually as they are received. The sender sets a timer, and when it expires, the unacknowledged packets at the time are retransmitted. Selective repeating is similar to an instance where a recipient acknowledges a list of varied items by checking off each item individually.
In GBN or Go back N algorithm, the sender is allowed a predetermined number of unacknowledged packets. When sending the packets, the sender attaches a unique ID to identify the sequence of packets. The receiver acknowledges only packets cumulatively as identified through the header. In this regard, if there is a discrepancy in the sequence, the full set is not acknowledged. Upon exhausting the time allocated, the sender resends the packets that have not been acknowledged. GBN is similar to a check-off system where the recipient checks the batch number and the item list, and when they do not correspond, the entire batch is cancelled. GBN is advantageous in that it allows errors due to loss of data in transmission to be detected and appropriately handled.