Unable to open this exercise
Common exam pitfall
Students often confuse the terms ACK and NACK.
Error detection methods (such as parity checks and checksums) inform a receiving device that an error may have occurred when a check fails, but on their own they do not guarantee that the missing or corrupted data is successfully recovered.
Automatic Repeat reQuest (ARQ) is an error-control protocol that works in conjunction with error-detection algorithms to provide retransmission when an error or missing acknowledgement is detected across computer networks.
Learning Objectives
- Explain the role and operation of Automatic Repeat reQuest (ARQ).
- Define the core ARQ mechanisms: Acknowledgements (ACK), Negative Acknowledgements (NACK), and Timeouts.
- Trace data transmission workflows under Stop-and-Wait ARQ during successful delivery, corrupted data, and lost packets.
The Core Mechanisms of ARQ
ARQ relies on three fundamental building blocks:
- Positive Acknowledgement (ACK):
- A short control message returned by the receiver to the sender confirming that a data packet was received successfully and passed all integrity checks (checksum/CRC).
- Negative Acknowledgement (NACK):
- A control message returned by the receiver to the sender indicating that a packet arrived corrupted (failed checksum). It explicitly requests the sender to retransmit that specific packet.
- Timeouts:
- A countdown timer started by the transmitting device the instant a packet is dispatched.
- If neither an ACK nor a NACK is received before the timer expires, the sender assumes the packet (or the returning ACK) was completely lost in transit and automatically re-sends the packet.
Stop-and-Wait ARQ Operation
In Stop-and-Wait ARQ, the sender transmits a single packet and pauses, waiting for confirmation before sending subsequent data.
SENDER RECEIVER
| |
| -------- Packet 1 (Start Timer) ------------------------> |
| | (Checksum OK)
| <------- ACK 1 (Stop Timer) ----------------------------- |
| |
| -------- Packet 2 (Start Timer) ------------------------> |
| | (Checksum Error!)
| <------- NACK 2 ----------------------------------------- |
| |
| -------- Packet 2 Retransmitted (Restart Timer) --------> |
| | (Checksum OK)
| <------- ACK 2 ------------------------------------------ |
v v
Three Operational Scenarios:
Scenario 1: Normal Error-Free Transmission
- Sender transmits Packet 1 and starts its timeout timer.
- Receiver receives Packet 1, calculates the checksum, finds it matches the trailer checksum, and stores the data.
- Receiver sends back an ACK 1.
- Sender receives ACK 1 before the timer expires, stops the timer, and proceeds to transmit Packet 2.
Scenario 2: Corrupted Packet (NACK Triggered)
- Sender transmits Packet 2 and starts its timer.
- Receiver receives Packet 2, but electrical noise has flipped one or more bits.
- The receiver calculates the checksum; it does not match the trailer value.
- Receiver discards the corrupted packet and transmits a NACK 2.
- Sender receives NACK 2, immediately re-transmits Packet 2, and resets the timer.
Scenario 3: Lost Packet (Timeout Triggered)
- Sender transmits Packet 3 and starts its timer.
- Due to a congested router or broken link, Packet 3 is completely dropped and never arrives.
- The receiver cannot send an ACK or a NACK because it has no knowledge that Packet 3 was ever sent.
- The sender's countdown timer reaches zero without receiving any response $\implies$ Timeout.
- The sender automatically retransmits Packet 3 and resets the timer.
Handling the Lost ACK Problem
What happens if the receiver receives a packet correctly and sends an ACK, but the ACK itself is lost on the return journey?
SENDER RECEIVER
| |
| -------- Packet 4 (Start Timer) ------------------------> |
| | (Stored in buffer)
| <---X--- ACK 4 (LOST IN TRANSIT) |
| |
| (TIMEOUT EXPIRES!) |
| -------- Packet 4 (Retransmitted) ----------------------> |
| | (Duplicate detected!)
| <------- ACK 4 (Re-sent) -------------------------------- |
If the ACK is lost:
- The sender's timer expires and the sender re-transmits Packet 4.
- The receiver receives a second copy of Packet 4.
- Because every packet carries a Packet Sequence Number in its header, the receiver recognizes that it has already received Packet 4!
- The receiver discards the duplicate packet (avoiding data corruption) and re-sends an ACK 4 so the sender can finally advance to Packet 5.
Summary of ARQ Protocols
Protocol | Description | Throughput Efficiency | Complexity |
|---|---|---|---|
Stop-and-Wait ARQ | Transmits one packet at a time; waits for ACK before sending next packet. | Lower (idle time waiting for round-trip latency). | Very simple to implement. |
Written practice and self-review
A client computer transmits data packets to a server using Stop-and-Wait ARQ.
Describe step-by-step what happens in each of the following two failure scenarios:
- Scenario A: Packet 1 arrives at the server, but its payload has been corrupted by electrical noise.
- Scenario B: Packet 2 is completely dropped by a congested network router and never reaches the server.
Write an explanation before checking the theory. Check that each claim answers the question, uses the correct concept and explains why it applies. Discuss uncertain points with a teacher. The structured exercise below checks specific facts; it does not automatically mark this explanation.
AI Socratic Tutor
Need guidance? Ask a question or use the hint below.
AI Socratic Tutor is an All-Access Benefit
Unlock step-by-step Socratic hints, algorithm trace table walkthroughs, and error diagnostics for every Cambridge exercise.
You're chatting with an AI tutor, not a person. AI can make mistakes, so double-check its answers.
Exam-Style Question: ARQ Protocol Components
Complete the following statements describing the operation of an Automatic Repeat reQuest (ARQ) protocol:
- The positive message sent by a receiver to confirm that a packet passed the error checks is called an: [Space 1]
- The negative message returned when a packet arrives with checksum errors is called a: [Space 2]
- If the transmitting device receives neither confirmation within a fixed time window, a [Space 3] occurs and the packet is re-sent.
Interactive exercises for Module 2 and beyond require an active plan.