Sliding Window Protocol at the Data Link Layer: How Reliable Frame Delivery Works

Sliding Window Protocol at the Data Link Layer: How Reliable Frame Delivery Works

Verified Sources
Nov 3, 2026

At the data link layer, a sliding window protocol is an ARQ technique that enables pipelined transmission of multiple frames while still providing reliable delivery despite loss/corruption. The sender transmits up to a bounded number of frames that are not yet acknowledged (the “sender window”), and the receiver acknowledges received frames to allow the sender to advance the window. This increases utilization when the round-trip time is large compared to transmission time, compared with stop-and-wait.

A common family of sliding window ARQ protocols includes:

  • Go-Back-N (GBN)
  • Selective Repeat (SR)

Both require sequence numbers in frame headers and timeouts for retransmission.

Footnotes

  1. Introduction to Communication Networks Fall 2002 Lecture 9 (Data Link Layer V: Sliding window ARQ protocols) - Explains pipelining, sender window size, and GBN vs SR conceptual differences. ↩ ↩2

Sliding window protocol overview (Go-Back-N / Selective Repeat)

Core concepts: windowing, sequence numbers, and reliable delivery

Sliding window protocols generalize stop-and-wait by allowing multiple frames “in flight” before acknowledgments return. The number of unacknowledged frames the sender may have outstanding is its maximum sender window size; similarly, the receiver may have a receiver window size depending on the variant.

1) Sequence numbers prevent duplicates and enable ordering

The sender tags each frame with a consecutive sequence number so the receiver can detect missing frames and (in SR) buffer out-of-order frames. With sliding windows, more than 1-bit sequence numbers may be needed because multiple frames can be outstanding concurrently.

2) ACK behavior is protocol-dependent

  • In GBN, the receiver primarily supports in-order delivery (receiver effectively behaves like size 1) and uses cumulative acknowledgments; a single loss triggers retransmission of multiple frames. 2
  • In SR, the receiver can accept out-of-order frames within its window, buffer them, and acknowledge frames individually; only lost/corrupt frames are retransmitted. 2

3) Timeouts and retransmission complete reliability

Like stop-and-wait, sliding window ARQ uses timeout mechanisms; if acknowledgments don’t arrive, the sender retransmits according to the protocol’s rules. 2

Footnotes

  1. Introduction to Communication Networks Fall 2002 Lecture 9 (Data Link Layer V: Sliding window ARQ protocols) - Explains pipelining, sender window size, and GBN vs SR conceptual differences. ↩ ↩2 ↩3

  2. Sliding Window Protocol - Scaler Topics - Summarizes sliding window concepts and contrasts GBN vs SR retransmission strategies. ↩ ↩2

  3. Difference Between Stop and Wait, GoBackN and Selective Repeat (GeeksforGeeks) - Contrasts receiver behavior, ACK types, buffering, and retransmission counts. ↩ ↩2 ↩3

Protocol differences: what gets retransmitted?

Qualitative comparison for a single lost/corrupt frame within the window.

A sliding window protocol can be understood as a loop with five interacting components:

  1. Sender window (bounded pipelining)
  2. Receiver window (accept/buffer policy)
  3. ACK generation (cumulative vs individual)
  4. Sender timers (retransmission triggers)
  5. Window advancement (base moves forward as ACKs arrive)

General workflow (works for both GBN and SR)

Sliding window protocol operation:

  • Sender:

    • Maintains a window of sequence numbers for frames that can be sent but not yet acknowledged.
    • Sends frames whose sequence numbers fall within the window.
    • Starts/restarts timers for unacknowledged frames.
    • Advances the send window base when ACKs arrive.
  • Receiver:

    • Maintains the next expected sequence number (plus buffering capacity in SR).
    • Checks integrity (e.g., checksum) and sequence number validity.
    • Sends ACKs per its variant rules.

These ideas are consistent with standard sliding window ARQ explanations used in reliable data transfer discussions.

Footnotes

  1. Introduction to Communication Networks Fall 2002 Lecture 9 (Data Link Layer V: Sliding window ARQ protocols) - Explains pipelining, sender window size, and GBN vs SR conceptual differences. ↩

  1. 1
    Step 1

    Pick an kk-bit sequence number space. Configure sender window size NN and receiver window size WrW_r (GBN: effectively 1; SR: NN).

  2. 2
    Step 2

    Transmit frames whose sequence numbers lie in the sender window; do not block after each frame.

  3. 3
    Step 3

    For each received frame: verify checksum/integrity and sequence number. Then emit ACK according to GBN or SR.

  4. 4
    Step 4

    When ACK(s) arrive, mark frames as delivered/acknowledged and move the window base forward.

  5. 5
    Step 5

    If ACK for unacknowledged frames doesn’t arrive before timeout, retransmit using the protocol rule (GBN: go back; SR: selective resend).

In Go-Back-N, the sender can transmit up to NN frames without waiting for each one’s ACK, but the receiver behaves like it expects frames in order (receiver window size effectively 11).

GBN receiver rule (in-order only)

  • If the receiver gets the expected frame correctly, it sends an ACK for that frame (and typically implies earlier frames were received correctly).
  • If a frame is lost/corrupt, the receiver discards subsequent out-of-order frames (since the protocol is effectively in-order) and keeps/returns ACK information that allows the sender to retransmit from the missing point. 2

GBN retransmission rule (cumulative trigger)

When the sender detects that the ACK didn’t arrive (via timeout or NACK/implicit negative response), it retransmits the missing frame and all frames that followed it within the window, which is why GBN is “go back NN.” 2

Footnotes

  1. Introduction to Communication Networks Fall 2002 Lecture 9 (Data Link Layer V: Sliding window ARQ protocols) - Explains pipelining, sender window size, and GBN vs SR conceptual differences. ↩

  2. Go-Back-N vs Selective Repeat Protocol (TutorialsPoint article) - Compares cumulative ACKs and retransmission behavior; SR retransmits only erroneous/lost frames. ↩ ↩2

  3. Go Back N - Sliding Window Protocol - GeeksforGeeks (receiver side) - Receiver window size ≈ 1 and out-of-order discard behavior for GBN. ↩ ↩2

In Selective Repeat, the sender still transmits multiple frames within its window, but the receiver can accept out-of-order frames and buffer them. Each correctly received frame is acknowledged individually. 2

SR receiver rule (buffer + independent ACK)

  • If a frame is received correctly and its sequence number lies within the receiver window, the receiver buffers it (if out-of-order).
  • The receiver sends an ACK specific to that sequence number.
  • Delivery to the upper layer occurs in-order by using a “receive base” pointer and releasing buffered frames once the missing earlier frames arrive. 2

SR retransmission rule (only what’s missing)

When a timeout occurs for a particular frame nn (whose ACK hasn’t been received), the sender retransmits only that frame, not the entire tail of the window. 2

Footnotes

  1. Go-Back-N vs Selective Repeat Protocol (TutorialsPoint article) - Compares cumulative ACKs and retransmission behavior; SR retransmits only erroneous/lost frames. ↩ ↩2

  2. Introduction to Communication Networks Fall 2002 Lecture 9 (Data Link Layer V: Sliding window ARQ protocols) - Explains pipelining, sender window size, and GBN vs SR conceptual differences. ↩

  3. Difference Between Stop and Wait, GoBackN and Selective Repeat (GeeksforGeeks) - Contrasts receiver behavior, ACK types, buffering, and retransmission counts. ↩ ↩2

  4. Sliding Window Protocol - Scaler Topics - Summarizes sliding window concepts and contrasts GBN vs SR retransmission strategies. ↩

Why sliding window improves efficiency (and when it doesn’t)

The efficiency improvement comes from pipelining: the sender can keep transmitting while waiting for ACKs. Standard descriptions of sliding window ARQ emphasize that this avoids idle time when round-trip time is large relative to packet transmission time.

However, retransmission overhead depends on the error pattern:

  • GBN can retransmit many frames after a single loss because it sends the “rest of the window” again. 2
  • SR reduces wasted retransmissions by retransmitting only the missing/corrupt frames, but it requires more receiver buffering and more complex sequence/ACK management. 2

Footnotes

  1. Introduction to Communication Networks Fall 2002 Lecture 9 (Data Link Layer V: Sliding window ARQ protocols) - Explains pipelining, sender window size, and GBN vs SR conceptual differences. ↩ ↩2

  2. Go-Back-N vs Selective Repeat Protocol (TutorialsPoint article) - Compares cumulative ACKs and retransmission behavior; SR retransmits only erroneous/lost frames. ↩

  3. Go Back N - Sliding Window Protocol - GeeksforGeeks (receiver side) - Receiver window size ≈ 1 and out-of-order discard behavior for GBN. ↩

  4. Difference Between Stop and Wait, GoBackN and Selective Repeat (GeeksforGeeks) - Contrasts receiver behavior, ACK types, buffering, and retransmission counts. ↩

Pro Tip: Think in terms of window pointers

In both GBN and SR, you can model behavior using pointers like send-base/receive-base. ACKs move the base; timeouts trigger retransmission of frames whose ACKs haven’t advanced the base.

Pro Tip: Sequence number space must cover the window (avoid wrap confusion)

SR and GBN both require enough sequence number bits to prevent ambiguity when windows wrap around. Sliding-window reliability depends on consistent mapping between sequence numbers and window positions.

Common clarifications (GBN vs SR and ACK semantics)

Sliding window ARQ lifecycle (sender/receiver interaction)

Send within window

Step A

Sender transmits frames with sequence numbers in [sendbase, sendbase+N-1]."

Receiver validates

Step B

Receiver checks integrity and sequence numbers; GBN is in-order, SR buffers."

ACK feedback

Step C

GBN sends cumulative ACKs; SR sends ACKs for individual sequence numbers."

Advance bases

Step D

Sender slides send-base forward when ACKs cover frames."

Timeout & retransmit

Step E

Timeout causes GBN to retransmit from the missing frame onward, SR to retransmit only that frame."

Knowledge Check

Question 1 of 4
Q1Single choice

In Go-Back-N sliding window ARQ, what happens when a frame is lost within the sender’s window?