In computer networks, protocols are important for ensuring reliable data transmission over various sub-networks and channels. These protocols are known as Automatic Repeat Request (ARQ) protocols. Go-Back-N and selective repeat are two of the most standard ARQ protocols used widely for their efficiency.
While both approaches are made for error recovery, they have key differences in their mechanisms and efficiency. Understanding these key differences is crucial for deploying the perfect protocol for your computer network.
Go-Back-N is a famous ARQ protocol that is particularly used in data communication systems for error recovery. It is commonly used in scenarios where low error rates are preferred, along with a less complex implementation.
In Go-Back-N,
When the receiver receives a packet, it sends an acknowledgment for all the previous packets in the sequence, including the latest one received. However, if a packet is lost or damaged during transmission, the receiver discards it, and the sender is required to retransmit all the packets starting from the lost one, according to the sequence.
Go-Back-N uses a sliding window concept. the sender maintains a window of size N, where N should always be greater than 1 to maintain pipelining.
The sliding window is implemented in the following manner.
The sender maintains a timer for the longest in-flight packet; if the timer expires before the sender receives a cumulative acknowledgment, then the sender will retransmit all the unacknowledged packets again.
Go-Back-N uses cumulative acknowledgments, where the receiver sends a single acknowledgment for a group of packets. The receiver's window size is set to 1, allowing it to accept only the next expected packet in the sequence.
While this simple buffer management reduces complexity, it may lead to potential inefficiencies.
Here's a simplified version of how Go-Back-N works during transmission:
If you want to learn more about Go-Back-N protocol, read this.
Another type of ARQ protocol is Selective Repeat, designed to handle packet losses and transmission errors. It is mainly used in high-speed networks where a single lost packet is preferred over the retransmission of multiple packets.
The sender can send multiple data packets without waiting for an acknowledgment from the receiver. The receiver, upon receiving a packet, sends an acknowledgment to the sender to confirm the receipt.
However, if the packet's timeout happens before receiving an ack, the sender retransmits that specific packet to the receiver again.
Selective Repeat maintains a window of fixed size at both the sender and the receiver. This window represents the range of acceptable sequence numbers of packets.
The sender's window indicates the range of unacknowledged packets that can be sent.
The Selective Repeat receiver's window shows the acceptable range of incoming packets.
Here's how Selective Repeat works:
If you want to learn more about Selective Repeat protocol, read this.
Free Resources