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
| Layer | Flow Control |
|---|---|
| Transport layer | End-to-end (host-to-host) |
| Data-link layer | Node-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:
- Detect whether a frame has been damaged.
- Detect whether a frame has been lost.
- Inform the sender when necessary.
- 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.
| Feature | Data-Link Layer | Transport Layer |
|---|---|---|
| Scope | Node-to-node | End-to-end |
| Covers | One link | Entire path |
| Example | Host → Router | Host → 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
Post a Comment