The Go-Back-N (GBN) protocol is another flow control mechanism used in data communication,
particularly in networks with potential packet loss or errors. It is an enhancement over the Stop-and-
Wait protocol and offers better efficiency by allowing the sender to transmit multiple packets before
receiving acknowledgments. Here's how it works:
Sender sends multiple packets: The sender can transmit multiple packets (a window of packets) without
waiting for individual acknowledgments for each packet.
Receiver acknowledges receipt: The receiver acknowledges the receipt of packets by sending back
cumulative acknowledgments. For example, if it receives packets 0, 1, and 2 successfully, it sends an
acknowledgment for packet 2, indicating that it has received all packets up to and including packet 2.
Sender waits for acknowledgment: After sending the packets within its window, the sender waits for an
acknowledgment. If it receives an acknowledgment for a specific packet, it moves its window forward to
the next packet.
Timeout for unacknowledged packets: If the sender does not receive an acknowledgment within a
certain timeout period, it assumes that one or more packets were lost or damaged. In this case, it
retransmits all unacknowledged packets within its window (hence the term "Go Back N").
Receiver discards out-of-order packets: If the receiver receives a packet that is out of order, it discards
the packet and sends an acknowledgment indicating the last correctly received packet. This prompts the
sender to retransmit the lost packet.
Duplicate acknowledgments: If the sender receives duplicate acknowledgments (indicating that some
packets were received multiple times), it treats it as a signal of packet loss and retransmits the
corresponding packets.
The Go-Back-N protocol increases the efficiency of data transmission by allowing the sender to pipeline
multiple packets without waiting for individual acknowledgments. However, it requires the sender to
have sufficient buffer space to store unacknowledged packets for potential retransmission. If the
network experiences frequent packet loss or errors, it can lead to inefficient use of bandwidth due to
repeated retransmissions.