Error Detection · Cambridge syllabus 2.2 · Lesson 5 of 5
Automatic Repeat Query (ARQ)
An automatic repeat query (ARQ) makes sure data arrives without error. The receiver checks each packet, often with a checksum or parity, and replies with a positive acknowledgement if it is correct or a negative acknowledgement if it is not. The sender resends after a negative acknowledgement, or when a timeout ends with no acknowledgement at all.
By the end, you can
- Understand the purpose of an automatic repeat query (ARQ).
- Explain how positive and negative acknowledgements are used.
- Explain how a timeout causes data to be sent again.
- Describe the complete ARQ process for a given transmission.
Acknowledgements and timeouts
An automatic repeat query (ARQ) is a way of making sure data is received without error. It uses an error check, such as a parity check or a checksum, together with messages sent back from the receiver and a timer at the sender.
The sender transmits a packet and starts a timer. The receiver checks the packet. If the check passes, it sends back a positive acknowledgement, a short message meaning the packet arrived correctly, and the sender moves on to the next packet. If the check fails, it sends back a negative acknowledgement, meaning the packet was damaged, and the sender sends that packet again.
The timer deals with what the receiver cannot see. If a packet is lost completely, it never arrives, so the receiver cannot check it or reply. The sender waits a set time, the timeout, for an acknowledgement. If none arrives before the timeout, it assumes the packet was lost and sends it again. The same happens if the packet arrived but its acknowledgement was lost on the way back.
So a packet is resent after a negative acknowledgement or after a timeout, and the process repeats until a positive acknowledgement arrives, or until the sender gives up after a set number of attempts and reports the connection as failed. When describing ARQ in an answer, name all three parts: the error check, the acknowledgements and the timeout.
Worth remembering
- Positive acknowledgement: the packet arrived correctly, so send the next one.
- Negative acknowledgement: the packet failed its check, so send it again.
- Timeout: no acknowledgement arrived in time, so send it again.
- It repeats until the data is received without error.
Worked example
A sender transmits packet 4 and starts a timer. The packet is damaged, the receiver's check fails, and it sends a negative acknowledgement, so packet 4 is sent again. Packet 5 is lost completely: no acknowledgement arrives, the timer runs out and packet 5 is resent.
Practice
Warm-up · not marked
Check your understanding
Answer in your own words, then compare with the worked answer. Nothing here is saved or scored.
Worked answer
If a packet or its acknowledgement is lost, no reply arrives at all. The timeout makes the sender resend the packet instead of waiting for ever.
Check your method, units and explanation against it.
Marked practice
Set 1 of 4 · easiest first · Checked as you go, with the worked answer. Sign in or create a free account to save your progress.