Flow and Error Control – Stop-and-Wait Protocols
Flow control prevents a fast transmitter from overwhelming a slow receiver. Stop-and-Wait forces the sender to halt and wait for an explicit acknowledgment (ACK) after every single frame. The ARQ version introduces timers and sequence numbers to handle packet loss automatically, though channel utilization remains low.
Learning Goals
- Need for Flow Control (matching sender speed with receiver capacity).
- Connectionless vs. Connection-oriented protocols at the Data Link Layer.
- Stop-and-Wait Protocol: Working mechanism, sequence numbers, and efficiency analysis.
- Stop-and-Wait ARQ (Automatic Repeat Request): Handling lost frames, lost ACKs, and delayed ACKs using timers.
- Explain the performance bottlenecks of the basic Stop-and-Wait protocol over high-latency channels.
- Diagram how Stop-and-Wait ARQ recovers gracefully from dropped frames or acknowledgments using timeouts.
In the Data Link Layer of Network Theory, flow control is necessary because a fast sender can inject frames more quickly than a slow receiver can process, buffer, and deliver them upward.2 The Stop-and-Wait protocol is the simplest practical response to this mismatch: the sender transmits one frame, stops, and waits for an acknowledgment before sending the next.2 In a noiseless setting, this provides basic pacing; in a noisy setting, it evolves into Stop-and-Wait ARQ, which adds reliability through acknowledgments, timers, and retransmissions.2
Within the data link layer, protocols may be connectionless or connection-oriented. In connectionless service, each frame is treated independently and often without ordering guarantees beyond the local link behavior; this style is common in many LANs. In connection-oriented service, a logical relationship exists among frames, they are typically numbered, and ordered transfer with acknowledgments becomes meaningful.2 Stop-and-Wait fits naturally into the connection-oriented model because acknowledgments and sequence numbers create state on both sender and receiver.2
Conceptually, Stop-and-Wait can also be viewed as a sliding window protocol with sender window size and receiver window size .2 This extreme simplicity makes it easy to implement and reason about, but its chief limitation is poor channel utilization when the propagation delay is large compared with the transmission delay.2
Footnotes
-
Data-link Control & Protocols - Overview of data link layer flow control and stop-and-wait basics. ↩ ↩2
-
Data Link Control Protocols - sandilands.info - Lecture notes giving stop-and-wait throughput and efficiency analysis. ↩ ↩2
-
Simplex Stop and Wait Protocol - University lecture notes relating stop-and-wait to sliding windows and utilization on LAN and satellite links. ↩ ↩2 ↩3
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
-
UNIT 2 INTRODUCTION TO DATALINK LAYER - Educational notes distinguishing connectionless and connection-oriented data link protocols. ↩ ↩2 ↩3
-
Data Link Layer Protocols - Lecture material linking stop-and-wait to sliding-window operation with window size . ↩ ↩2 ↩3
Stop-and-Wait ARQ Protocol
Why Flow Control Exists
Even on an error-free link, reliability alone is not enough. If the receiver processes frames slower than the sender emits them, buffer overflow and frame loss can occur unless pacing is enforced.2
Footnotes
-
Data-link Control & Protocols - Overview of data link layer flow control and stop-and-wait basics. ↩
-
Data Link Control Protocols - sandilands.info - Lecture notes giving stop-and-wait throughput and efficiency analysis. ↩
Connectionless vs. Connection-Oriented Data Link Behavior
At the data link layer, a connectionless protocol sends frames as independent units. There is no logical setup phase, no per-exchange state tying one frame to the next, and usually no requirement that frames be numbered for in-order delivery. This design is efficient for many LAN scenarios where the medium is short, error rates are low, and higher layers can handle recovery if necessary.
A connection-oriented protocol, by contrast, establishes logical state before useful transfer, sends frames as part of an ordered exchange, and often ends with a teardown or completion stage. Since the sender and receiver maintain state, mechanisms such as sequence numbers, acknowledgments, and retransmission timers become meaningful and correct.2 Stop-and-Wait and Stop-and-Wait ARQ belong to this stateful family because the sender must know whether the current outstanding frame has been accepted.2
| Feature | Connectionless DLL | Connection-Oriented DLL |
|---|---|---|
| Relationship between frames | Independent | Part of one logical exchange |
| Setup/teardown | Usually absent | Usually present or implied by state |
| Ordering concern | Limited | Important |
| Sequence numbers | Often unnecessary | Common and useful2 |
| Typical use | Many LAN links | Point-to-point, some wireless/WAN contexts |
| Fit for Stop-and-Wait | Weak | Strong2 |
Footnotes
-
UNIT 2 INTRODUCTION TO DATALINK LAYER - Educational notes distinguishing connectionless and connection-oriented data link protocols. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩ ↩2 ↩3
-
Data Link Layer Protocols - Lecture material linking stop-and-wait to sliding-window operation with window size . ↩ ↩2
-
Data-link Control & Protocols - Overview of data link layer flow control and stop-and-wait basics. ↩
Basic Stop-and-Wait Protocol Operation
- 1Step 1
The sender takes one packet from the network layer, encapsulates it into a frame, and sends exactly one outstanding frame onto the link.2
Footnotes
-
Data-link Control & Protocols - Overview of data link layer flow control and stop-and-wait basics. ↩
-
Simplex Stop and Wait Protocol - University lecture notes relating stop-and-wait to sliding windows and utilization on LAN and satellite links. ↩
-
- 2Step 2
After sending, the sender does not inject additional data. This enforced idle period is what provides flow control.2
Footnotes
-
Data-link Control & Protocols - Overview of data link layer flow control and stop-and-wait basics. ↩
-
Data Link Control Protocols - sandilands.info - Lecture notes giving stop-and-wait throughput and efficiency analysis. ↩
-
- 3Step 3
The receiver accepts the frame, removes the payload, and forwards it upward if the frame is valid and expected.2
Footnotes
-
Data-link Control & Protocols - Overview of data link layer flow control and stop-and-wait basics. ↩
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
- 4Step 4
An acknowledgment indicates successful receipt and permission for the next frame.2
Footnotes
-
Data-link Control & Protocols - Overview of data link layer flow control and stop-and-wait basics. ↩
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
- 5Step 5
Once the acknowledgment arrives, the sender is allowed to transmit the next frame.2
Footnotes
-
Data-link Control & Protocols - Overview of data link layer flow control and stop-and-wait basics. ↩
-
Simplex Stop and Wait Protocol - University lecture notes relating stop-and-wait to sliding windows and utilization on LAN and satellite links. ↩
-
- 6Step 6
Because only one frame may remain unacknowledged at any time, the protocol is simple but often underutilizes the link.2
Footnotes
-
Data Link Control Protocols - sandilands.info - Lecture notes giving stop-and-wait throughput and efficiency analysis. ↩
-
Simplex Stop and Wait Protocol - University lecture notes relating stop-and-wait to sliding windows and utilization on LAN and satellite links. ↩
-
Working Mechanism, Sequence Numbers, and Correctness
In the basic noiseless form, the acknowledgment merely signals “ready for the next frame.” However, once errors, loss, or delayed acknowledgments are possible, simple acknowledgments are insufficient.2 The central problem is ambiguity: if a sender times out and retransmits, the receiver must know whether the arriving frame is a new frame or a duplicate of an older one.2
This is why Stop-and-Wait ARQ uses a 1-bit sequence space, commonly and .2 Since at most one frame can be outstanding, the receiver only needs to distinguish between “the frame I currently expect” and “a duplicate of the one already accepted.” If the sender transmits frame with sequence number , then after correct delivery the receiver sends an acknowledgment indicating it next expects ; after accepting frame , it next expects again.2
This alternating-bit behavior is enough because the sender cannot legally send frame until frame is acknowledged, and vice versa.2 Thus, one bit of numbering prevents duplicate delivery while keeping implementation minimal.
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩ ↩2 ↩3 ↩4 ↩5 ↩6
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩ ↩2
-
Data Link Layer Protocols - Lecture material linking stop-and-wait to sliding-window operation with window size . ↩ ↩2
-
Simplex Stop and Wait Protocol - University lecture notes relating stop-and-wait to sliding windows and utilization on LAN and satellite links. ↩
Key Insight
Stop-and-Wait ARQ does not need large sequence spaces. Because only one frame is outstanding, a 1-bit alternating sequence number is sufficient to detect duplicates.2
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
Data Link Layer Protocols - Lecture material linking stop-and-wait to sliding-window operation with window size . ↩
Efficiency Analysis and the High-Latency Bottleneck
The principal weakness of Stop-and-Wait is not correctness but efficiency.2 During each cycle, only one frame transmission interval carries useful data, while the sender then idles during forward propagation, acknowledgment return, and reverse propagation. Under the standard simplifying assumptions that ACK transmission time and processing time are negligible, total cycle time is:
where is the data-frame transmission time and is the one-way propagation delay.2
Hence link utilization or efficiency is approximately:
If we define
then
This formula explains the bottleneck clearly. When , the frame transmission time dominates and utilization is respectable. When , propagation dominates, so the sender spends most of its time waiting rather than sending.2 This is especially harmful on long-distance, satellite, or very high-bandwidth links, where frames are launched quickly but acknowledgments return slowly.2
For example, if , then:
so less than of the time carries useful payload. Some lecture material notes that for satellite links, utilization may drop to around or lower under certain parameters, illustrating severe bandwidth waste.
Footnotes
Stop-and-Wait Efficiency vs.
Illustrative values using .2
Footnotes
-
Data Link Control Protocols - sandilands.info - Lecture notes giving stop-and-wait throughput and efficiency analysis. ↩
-
Simplex Stop and Wait Protocol - University lecture notes relating stop-and-wait to sliding windows and utilization on LAN and satellite links. ↩
Interpreting the Bottleneck
Stop-and-Wait ARQ Recovery from Errors
- 1Step 1
The sender transmits frame or and immediately starts a timeout timer.2
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
-
- 2Step 2
If the frame arrives correctly and matches the expected sequence number, the receiver accepts it, delivers the payload upward, and sends an acknowledgment for the next expected number.2
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
-
- 3Step 3
If the frame is lost or corrupted, the receiver cannot acknowledge successful receipt. The sender eventually times out because no valid acknowledgment arrives.2
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
-
- 4Step 4
After timeout, the sender retransmits the same numbered frame rather than moving forward.2
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
-
- 5Step 5
If the data frame arrived but the ACK was lost, the sender still times out and retransmits. The receiver recognizes the repeated sequence number as a duplicate and discards the payload while re-sending the ACK.2
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
-
- 6Step 6
If an ACK is delayed beyond the timer, retransmission may already have occurred. Sequence numbers let the receiver and sender interpret the event without delivering duplicate data.2
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
-
Lost Frames, Lost ACKs, and Delayed ACKs
Stop-and-Wait ARQ is designed specifically for noisy or unreliable links where either data frames or acknowledgments may be lost, damaged, or delayed.2
1. Lost data frame
If the sender transmits a frame and that frame never reaches the receiver, no acknowledgment can be generated. Without a timer, the sender would wait forever. Therefore, timeout is essential: once the timer expires, the sender retransmits the same frame.2
2. Lost acknowledgment
If the receiver gets the frame correctly and sends the ACK, but the ACK is lost, the sender again sees silence and eventually retransmits.2 Now the receiver encounters a duplicate frame. Because the duplicate has the old sequence number, the receiver discards the payload and sends the ACK again rather than delivering the same packet twice.2
3. Delayed acknowledgment
A delayed ACK is more subtle. The sender may time out and retransmit before the original ACK arrives. When that late ACK eventually appears, the sender must not confuse it with permission for a future frame. Sequence-numbered acknowledgments prevent this ambiguity by tying the ACK to the expected next frame number.2
This recovery method is graceful because no complex rollback is required. The protocol uses only three ideas: detect absence of confirmation, retransmit after timeout, and reject duplicates using sequence numbers.2
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩ ↩2 ↩3 ↩4 ↩5 ↩6
-
Data Link Layer Protocols - Lecture material linking stop-and-wait to sliding-window operation with window size . ↩
Common Misconception
A timeout does not always mean the data frame was lost. The frame may have arrived successfully, but the acknowledgment may have been lost or delayed.2
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
Used primarily for flow control on an ideal or noiseless link. Sender sends one frame and waits. ACK mainly acts as permission to continue.2
Footnotes
-
Data-link Control & Protocols - Overview of data link layer flow control and stop-and-wait basics. ↩
-
Simplex Stop and Wait Protocol - University lecture notes relating stop-and-wait to sliding windows and utilization on LAN and satellite links. ↩
Lifecycle of a Stop-and-Wait ARQ Exchange
Frame Transmission
Stage 1The sender emits one numbered frame and starts a timer.2"
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
Link Uncertainty
Stage 2The frame or its acknowledgment may be delayed, corrupted, or lost.2"
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
ACK Reception or Timeout
Stage 3If the correct ACK arrives in time, the sender advances; otherwise, timeout occurs.2"
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
Retransmission
Stage 4The sender resends the same sequence-numbered frame.2"
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
Duplicate Suppression
Stage 5The receiver discards repeated frames and reissues the appropriate ACK.2"
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
Progress to Next Frame
Stage 6Once the sender gets the expected ACK, it toggles sequence number and continues.2"
Footnotes
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩
-
Data Link Layer Protocols - Lecture material linking stop-and-wait to sliding-window operation with window size . ↩
Strengths, Limitations, and Place in the Data Link Layer
Stop-and-Wait remains pedagogically and practically important because it isolates the core ideas behind reliable data transfer: pacing, acknowledgment, timeout, retransmission, and duplicate detection.2 Its implementation cost is low, buffer needs are minimal, and correctness is comparatively easy to verify.2
However, its limits are fundamental:
- only one outstanding frame is allowed, so the link is often idle2
- throughput collapses as round-trip propagation delay grows2
- performance becomes poor on high bandwidth-delay product links2
- even when errors are rare, waiting for every ACK wastes capacity2
Thus, Stop-and-Wait is best understood as the conceptual foundation for more capable ARQ schemes such as Go-Back-N and Selective Repeat, which keep multiple frames in flight to improve utilization.2
A compact way to summarize the protocol is:
while its main performance issue is:
Footnotes
-
Data-link Control & Protocols - Overview of data link layer flow control and stop-and-wait basics. ↩
-
The Data Link Layer: ARQ Protocols - MIT - Detailed explanation of stop-and-wait ARQ, timeouts, and sequence numbers. ↩ ↩2 ↩3
-
Data Link Layer Protocols - Lecture material linking stop-and-wait to sliding-window operation with window size . ↩
-
Data Link Control Protocols - sandilands.info - Lecture notes giving stop-and-wait throughput and efficiency analysis. ↩ ↩2 ↩3 ↩4 ↩5
-
Simplex Stop and Wait Protocol - University lecture notes relating stop-and-wait to sliding windows and utilization on LAN and satellite links. ↩ ↩2 ↩3 ↩4 ↩5
-
III. Link Layer ARQ Protocols - CMU - Notes on stop-and-wait ARQ behavior under losses, delays, and retransmissions. ↩
Knowledge Check
What is the primary purpose of flow control in the Stop-and-Wait protocol?