Go-Back-N ARQ: A Sliding Window Protocol for Reliable Data Transmission
Understand Go-Back-N ARQ, a sliding window protocol that enhances the efficiency of automatic repeat request (ARQ) mechanisms. This guide explains its operation, the concept of the sliding window, and how it handles packet retransmissions to ensure reliable data delivery over a network.
Go-Back-N ARQ: A Sliding Window Protocol for Reliable Data Transmission
Introduction to Go-Back-N ARQ
Go-Back-N ARQ (Automatic Repeat Request) is a protocol used to ensure reliable data transmission over a network. It's based on the sliding window concept, allowing the sender to transmit multiple packets before receiving acknowledgments. This improves efficiency compared to simpler protocols like stop-and-wait ARQ, which send only one packet at a time.
Understanding the Sliding Window Protocol
Unlike stop-and-wait, which sends one packet and waits for an acknowledgment before sending the next, the sliding window protocol allows for multiple packets to be in transit simultaneously. Go-Back-N ARQ and Selective Repeat ARQ are both sliding window protocols.
What is Go-Back-N ARQ?
In Go-Back-N ARQ, "N" represents the sender's window sizeāthe number of packets it can send before needing an acknowledgment for the first packet sent in that window. For example, in Go-Back-3, the sender can transmit three packets before waiting for an ACK (acknowledgment) for the first packet in the sequence.
Packets are numbered sequentially. If an acknowledgment isn't received within a timeout period, the sender retransmits *all* packets in the current window, starting from the unacknowledged packet.
How Go-Back-N ARQ Works: A Step-by-Step Example
Let's say we have 11 packets (0-10) to send, and the sender's window size (N) is 4:
- The sender transmits packets 0, 1, 2, and 3 and waits for an ACK for packet 0.
- Upon receiving the ACK for packet 0, the sender transmits packet 4. The window "slides" forward.
- This process continues until an error occurs (packet loss or corrupted packet).
- If an error is detected (e.g., no ACK for packet 2), the sender retransmits packets 2, 3, and 4 (the entire current window).
Key Points of Go-Back-N ARQ
- Sender's window size is N; the receiver's window size is always 1.
- Out-of-order or corrupted packets are discarded.
- Retransmission involves resending the entire window from the point of error.
Example Problem: Packet Loss in Go-Back-4 ARQ
Let's say we need to send 10 packets using Go-Back-4 (GB4) ARQ, and every sixth packet is lost. How many transmissions are needed?
Solution:
- Packets 1-4 are sent; packet 1 is ACKed, then packet 5 is sent.
- Packet 6 is lost (every sixth packet).
- Packets 6, 7, 8, 9 are retransmitted.
- This pattern continues, with retransmissions occurring for each lost packet.
The total number of transmissions would be 17.
Go-Back-N ARQ Compared to Stop-and-Wait
Go-Back-N ARQ is a significant improvement over the stop-and-wait protocol. Stop-and-wait is simpler but much less efficient because it only transmits one packet at a time, resulting in long waits for acknowledgments, especially on high-bandwidth networks. Go-Back-N's sliding window enables higher throughput by allowing several packets to be in transit concurrently.
Conclusion
Go-Back-N ARQ offers a good balance between simplicity and efficiency. Its sliding window increases throughput compared to stop-and-wait. However, its strategy of retransmitting the entire window after an error can waste bandwidth. Selective Repeat ARQ addresses this limitation by retransmitting only the necessary packets.