Skip to content

Error Control and Flow Control

LayerFlow Control ExampleError Control ExampleScope
Data Link Layer (L2)Yes ✅ Stop-and-Wait, Sliding WindowYes ✅ Parity Bit, Checksum / CRC, ARQ (3 types)Node-to-Node (Hop-to-Hop)
Transport Layer (L4)Yes ✅ TCP Receive WindowYes ✅ TCP Checksum + RetransmissionEnd-to-End

Data Link Layer

  • Error Control:
    • Error Detection: CRC
    • Retransmission: ARQ
  • Flow Control:
    • Stop-and-Wait, Sliding Window

Transport Layer

  • Error Control:
    • Error Detection: TCP Checksum
    • Retransmission: Timeout + ACKs
  • Flow Control:
    • TCP Sliding Window

Note:

  • Error Detection in L2 can be done using Parity Bit, Checksum, or CRC.
  • However, for GATE and interviews, associate: L2 Error Detection → CRC L4 Error Detection → TCP Checksum
  • CRC is emphasized because it is widely used in practice (Ethernet, Wi-Fi) and is much better at detecting burst errors.
  • Controls data transfer between two directly connected devices.
  • Detects/corrects errors on a single link.
  • Ensures one device doesn’t overwhelm the next device.
A ---- B ---- C
L2 Flow/Error Control:
A <-> B
B <-> C

If frame A→B is corrupted, B asks A to retransmit.

Suppose:

A -------- B
(Sender) (Receiver)

If A sends frames too fast and B’s buffer becomes full, flow control mechanisms like:

  • Stop-and-Wait
  • Sliding Window

make A slow down or wait for ACKs.

A sends:

Frame + CRC
  • B recalculates CRC.
  • If CRC mismatches, frame is considered corrupted.
  • B discards it and requests retransmission using ARQ techniques:
    • Stop-and-Wait ARQ
    • Go-Back-N ARQ
    • Selective Repeat ARQ

  • Controls data transfer between source and destination applications.
  • End-to-end reliability.
  • Ensures the sender does not overwhelm the receiver.
  • Retransmits lost segments if needed.
A ---- B ---- C ---- D
L4 Flow/Error Control:
A <-----------------> D

Even if B and C forward correctly, if D misses data, A retransmits.

Memory Shortcut

  • L2: “My neighbor got the frame correctly?”
  • L4: “Did the final destination get the entire message correctly?”

In TCP:

Client <---------> Server

The receiver advertises:

Window Size = 5000 bytes

The sender can send at most 5000 bytes without waiting.

If the receiver is busy:

Window Size = 0

The sender stops sending temporarily.

This is called TCP Flow Control using the sliding window mechanism.

TCP sends:

Segment + TCP Checksum

If:

  • Segment is corrupted, or
  • Segment is lost, or
  • ACK is not received before timeout,

then TCP retransmits the segment.

A -----> B (Segment #3 lost)
A <----- B (No ACK for #3)
Timeout occurs
A -----> B (Retransmit #3)