Numbered Acknowledgements in Stop-and-Wait ARQ: Rationale and Ambiguity from Unnumbered ACKs
Stop-and-Wait ARQ Protocol Explained
In stop-and-wait ARQ, the sender transmits one data frame at a time and waits for an ACK before sending the next frame. This design creates reliability in an unreliable channel using timeout-triggered retransmissions and sequence numbers to handle lost or delayed frames/ACKs.2
A key point is that ACKs are numbered (carry a sequence/acknowledgement field). In the classic “alternating bit” version, the receiver sends an ACK containing the sequence number of the next expected frame, enabling the sender and receiver to remain consistent even when acknowledgements are duplicated or delayed.
Core learning goals
- Understand why ACKs must identify which frame they correspond to.2
- Model the confusion that happens with unnumbered acknowledgements, especially under delayed ACKs and duplicate data frames.2
Keywords: stop-and-wait ARQ; ACK sequence number; alternating-bit; timeout; duplicate frame
Footnotes
-
Stop-and-wait ARQ - Wikipedia - Discusses stop-and-wait behavior, timeouts, lost/delayed ACK problems, and sequence-number-based solutions. ↩ ↩2
-
Stop and Wait ARQ - GeeksforGeeks - Describes lost/ delayed ACK scenarios and sequence number usage. ↩
-
Stop-and-wait ARQ - Wikipedia - Explains numbered ACKs: receiver includes next expected sequence, duplicate detection via alternation of sequence numbers. ↩ ↩2
-
CS455 Syllabus (stop-and-wait protocol) - Explicitly states the cause of ACK/frame misidentification and the fix: sequence number in ACK. ↩ ↩2
Why acknowledgements are numbered in stop-and-wait
In stop-and-wait, timeouts are inevitable: if an ACK is lost or arrives late, the sender retransmits. This means the receiver may receive the same data frame multiple times, and the protocol must ensure these duplicates are handled correctly.2
Numbered ACKs solve two coupled identification problems:
-
Sender-side identification of delayed ACKs
- The sender may time out and retransmit a frame even though the receiver already processed it.
- Later, the original (delayed) ACK arrives.
- Without numbering, the sender may incorrectly treat a delayed ACK as acknowledging a new frame.
-
Receiver-side identification of duplicates
- The receiver needs to distinguish “expected next frame” from “duplicate retransmission.”
- Stop-and-wait uses alternating sequence numbers; the receiver checks the frame sequence number to detect duplicates and discards duplicates, re-sending the appropriate ACK.2
Wikipedia’s description of stop-and-wait ARQ highlights that the receiver includes the sequence number of the next packet it expects inside the ACK. This allows detection of duplicate frames: if frames (or corresponding ACKs) do not “alternate” as expected, they refer to the same already-received data.
Keywords: duplicate detection; next expected sequence; sender timeout; duplicate ACK; frame retransmission
Footnotes
-
Stop and Wait ARQ - GeeksforGeeks - Describes lost/ delayed ACK scenarios and sequence number usage. ↩
-
Stop-and-wait ARQ - Wikipedia - Explains numbered ACKs: receiver includes next expected sequence, duplicate detection via alternation of sequence numbers. ↩ ↩2 ↩3
-
CS455 Syllabus (stop-and-wait protocol) - Explicitly states the cause of ACK/frame misidentification and the fix: sequence number in ACK. ↩
Sender–Receiver consistency achieved by numbered ACKs (alternating bit)
- 1Step 1
Sender transmits Data with sequence number and starts a timer. Stop-and-wait transmits one outstanding frame at a time.
Footnotes
-
Stop-and-wait ARQ - Wikipedia - Explains numbered ACKs: receiver includes next expected sequence, duplicate detection via alternation of sequence numbers. ↩
-
- 2Step 2
Receiver compares received frame seq with expected seq. If correct, it accepts and delivers; otherwise it treats it as a duplicate.
Footnotes
-
Stop-and-wait ARQ - Wikipedia - Explains numbered ACKs: receiver includes next expected sequence, duplicate detection via alternation of sequence numbers. ↩
-
- 3Step 3
Receiver sends ACK containing the sequence number of the next packet it expects, i.e., ACK reflects the receiver’s state.
Footnotes
-
Stop-and-wait ARQ - Wikipedia - Explains numbered ACKs: receiver includes next expected sequence, duplicate detection via alternation of sequence numbers. ↩
-
- 4Step 4
If the ACK’s acknowledgement number matches what the sender expects for frame , sender advances; otherwise it ignores and/or retransmits after timeout.
Footnotes
-
CS455 Syllabus (stop-and-wait protocol) - Explicitly states the cause of ACK/frame misidentification and the fix: sequence number in ACK. ↩
-
- 5Step 5
If a duplicate frame arrives, receiver discards it and re-sends the ACK that corresponds to the already-processed frame/state.2
Footnotes
-
Stop-and-wait ARQ - Wikipedia - Explains numbered ACKs: receiver includes next expected sequence, duplicate detection via alternation of sequence numbers. ↩
-
CS455 Syllabus (stop-and-wait protocol) - Explicitly states the cause of ACK/frame misidentification and the fix: sequence number in ACK. ↩
-
Pro Tip: Think in terms of state
An ACK is not just “something received”; it’s a compact message about receiver state (next expected seq). Numbering lets the sender confirm it is synchronized with that state.2
Footnotes
-
Stop-and-wait ARQ - Wikipedia - Explains numbered ACKs: receiver includes next expected sequence, duplicate detection via alternation of sequence numbers. ↩
-
CS455 Syllabus (stop-and-wait protocol) - Explicitly states the cause of ACK/frame misidentification and the fix: sequence number in ACK. ↩
The confusion created by unnumbered ACKs
If ACKs carry no sequence/acknowledgement number, then the sender cannot determine which transmission the ACK corresponds to. This becomes problematic under the stop-and-wait conditions where:
- An ACK can be lost and the sender will retransmit. The receiver may then receive duplicates.2
- An ACK can be delayed beyond timeout, so the sender may interpret it as acknowledging a later transmission.
Wikipedia explicitly notes that when ACKs are lost/damaged, the sender retransmits and the receiver can end up with two copies of the same frame, and the system may not know whether a second copy is “duplicate or next frame” unless sequence numbers clarify ambiguity.
Even worse, with unnumbered ACKs, the sender has no way to reject an ACK that is actually for a previous frame.
Scenario: delayed ACK causes sender to advance incorrectly
Let’s define frames as then (alternating-bit intuition), and assume ACKs are unnumbered (e.g., ACK is just a flag: “OK”).
Timeline
- Sender sends .
- Receiver successfully receives and sends an ACK (unnumbered).
- The ACK is delayed and arrives after sender’s timeout.
- Sender times out, retransmits (receiver treats it as duplicate).
- Receiver sends another ACK (unnumbered). This second ACK arrives quickly at the sender.
- Sender—since ACK is unnumbered—concludes: “ACK received for my latest frame.”
It advances and sends . - Finally, the original delayed ACK for arrives as well.
What goes wrong?
- The sender may accept the late ACK as acknowledging (because both are indistinguishable “ACK” signals).
- This can lead to the sender believing was received even when it might not have been (e.g., if was corrupted/lost, the sender still “thinks” it was acknowledged).
- Receiver may deliver duplicates or the sender/receiver may desynchronize about what the next frame should be.
This is exactly the kind of misidentification problem that sequence-numbered ACKs prevent: the sender must know whether an ACK corresponds to the current frame or a previous one, because stop-and-wait relies on alternating state to resolve duplicates and delayed acknowledgements.2
Keywords: desynchronization; ambiguous ACK; delayed acknowledgement; timeout retransmission; state mismatch
Footnotes
-
Stop and Wait ARQ - GeeksforGeeks - Describes lost/ delayed ACK scenarios and sequence number usage. ↩
-
Stop-and-wait ARQ - Wikipedia - Explains numbered ACKs: receiver includes next expected sequence, duplicate detection via alternation of sequence numbers. ↩ ↩2 ↩3
-
CS455 Syllabus (stop-and-wait protocol) - Explicitly states the cause of ACK/frame misidentification and the fix: sequence number in ACK. ↩ ↩2
Concrete ambiguity: duplicate data vs next data
Numbered ACKs help maintain the invariant described for stop-and-wait: acknowledgements “reference the same frame” consistently when duplicates occur. Without numbering, this invariant cannot be checked.
More formally:
- With numbering, if a duplicate arrives, the receiver will generate the ACK that matches its current expected-next state (and thus it “alternates” consistently when appropriate).
- Without numbering, two situations can produce indistinguishable ACKs:
- Receiver ACKed because it was received earlier.
- Receiver ACKed (or at least produced an ACK signal) for the current successful frame.
Therefore the sender cannot correctly decide whether to advance or to retransmit.
Footnotes
-
Stop-and-wait ARQ - Wikipedia - Explains numbered ACKs: receiver includes next expected sequence, duplicate detection via alternation of sequence numbers. ↩ ↩2
Effect of numbered vs unnumbered ACKs under delayed/lost conditions
Qualitative reliability/synchronization impact in stop-and-wait
Common questions and edge cases
Stop-and-Wait ACK Numbering: Self-check Deck
Knowledge Check
In stop-and-wait ARQ, numbered ACKs primarily help the sender do what?