Flow Control and Error Control in the Data-Link Layer

 

Flow Control and Error Control in the Data-Link Layer

The Data Link Control (DLC) sublayer is responsible for flow control and error control at the data-link layer. Both mechanisms operate node-to-node, meaning they control communication across a single link between two directly connected nodes.


1. Flow Control

Flow control is a mechanism that coordinates the amount of data that can be sent before the sender receives an acknowledgment.

The main purpose is to prevent a fast sender from overwhelming a slower receiver.

At the data-link layer

Flow control operates:

Node-to-node across a link

For example:

Sender                         Receiver
  A  -------------------------->  B
       Data frames
  A  <--------------------------  B
          Acknowledgment

The sender controls how much data it sends based on the receiver's ability to process the frames and acknowledge them.

Important distinction

LayerFlow Control
Transport layerEnd-to-end (host-to-host)
Data-link layerNode-to-node (across one link)

So, if a packet travels through several routers:

Host A → R1 → R2 → R3 → Host B
          ↑     ↑     ↑
       separate data-link flow control
       on each individual link

Each link can have its own flow-control mechanism.


2. Error Control

Error control deals with error detection and error correction.

Its purpose is to allow the receiver to:

  1. Detect whether a frame has been damaged.
  2. Detect whether a frame has been lost.
  3. Inform the sender when necessary.
  4. Coordinate retransmission of corrupted or lost frames.

In the data-link layer, error control mainly involves:

Error detection + retransmission

When a corrupted frame is detected, the sender retransmits that frame.

Example

Sender                         Receiver
  |                               |
  |------ Frame 1 --------------->|
  |------ Frame 2 ----X           |  ← damaged
  |                               |
  |<----- Request/ACK ------------|
  |                               |
  |------ Frame 2 --------------->|
  |                               |

The damaged frame is retransmitted.


Data-Link vs Transport-Layer Error Control

The most important point is where the error control operates.

FeatureData-Link LayerTransport Layer
Scope        Node-to-nodeEnd-to-end
Covers        One linkEntire path
Example        Host → RouterHost → Host
Purpose        Ensure frame is correctly transferred across
        a  link
Ensure data reaches destination correctly

For example:

Host A       R1        R2        Host B
  |----------|---------|----------|
      Link       Link       Link
       ↓           ↓          ↓
   Error control on each individual link

  <----------- Transport layer ------------>
              End-to-end

Key takeaway

Flow control: controls the rate/amount of data sent across a single link.

Error control: detects damaged or lost frames and coordinates their retransmission across a single link.

Remember:
Data-link layer = node-to-node
Transport layer = end-to-end

Comments

Popular posts from this blog

Computer Networks PCCST501 Semester 5 KTU CS 2024 Scheme - Dr Binu V P

Introduction to Computer Networks

TCP/IP Protocol Suite