Data Link Layer protocols are used to provide reliable communication between two directly connected devices.
The protocols can be broadly studied for:
- Noiseless channels — assume that frames are not damaged or lost.
- Noisy channels — frames may be damaged or lost due to noise, interference, etc.
1. Data Link Protocols for Noiseless Channels
A noiseless channel is an ideal communication channel in which:
- No frame is lost.
- No frame is damaged.
- No bits are changed.
- The receiver always receives the frame correctly.
Therefore, we don’t need complicated error-control mechanisms.
Two basic protocols are generally discussed:
- Simplest Protocol
- Stop-and-Wait Protocol
2. Simplest Protocol
The Simplest Protocol assumes that the channel is completely noiseless and that the receiver can always accept data immediately.
Working
Sender Receiver
│ │
│────── Frame 1 ───────────────>│
│ │
│────── Frame 2 ───────────────>│
│ │
│────── Frame 3 ───────────────>│
│ │
The sender continuously sends frames.
There is:
- No ACK
- No NAK
- No retransmission
- No sequence number
- No flow control
Why?
Because the channel is assumed to be perfect.
Example
Suppose a computer wants to send three frames:
Frame 1 → Frame 2 → Frame 3
The sender simply sends:
F1 ────────→
F2 ────────→
F3 ────────→
The receiver receives them correctly.
Advantage
- Extremely simple.
- Very little overhead.
- High efficiency on an ideal channel.
Disadvantage
- Not suitable for real networks because real channels can have errors and congestion.
3. Stop-and-Wait Protocol for Noiseless Channel
The Stop-and-Wait protocol introduces flow control.
The sender sends one frame at a time and waits before sending the next one.
Sender Receiver
│ │
│────── Frame 1 ───────────────>│
│ │
│────── Frame 2 ───────────────>│
│ │
│────── Frame 3 ───────────────>│
│ │
In the simplest noiseless version, the receiver can send an acknowledgement before the sender continues.
Sender Receiver
│ │
│────── Frame 1 ───────────────>│
│<──────── ACK ─────────────────│
│ │
│────── Frame 2 ───────────────>│
│<──────── ACK ─────────────────│
Why Stop-and-Wait?
Suppose the receiver is slower than the sender.
If the sender continuously sends:
F1 F2 F3 F4 F5 F6 F7...
the receiver may not be able to process all frames.
Stop-and-Wait controls the sender’s speed.
Main idea
Send one frame → wait → send next frame.
4. Difference Between Simplest and Stop-and-Wait
| Feature | Simplest Protocol | Stop-and-Wait |
|---|---|---|
| Channel | Noiseless | Noiseless |
| Error control | No | No |
| Flow control | No | Yes |
| Frames sent | Continuously | One at a time |
| ACK | Not required | Used for flow control in the basic teaching model |
| Complexity | Very low | Low |
5. Data Link Protocols for Noisy Channels
A noisy channel is one in which transmitted frames can:
- Become corrupted
- Be lost
- Be duplicated
- Arrive incorrectly
For example:
Sender Receiver
10110110 ───────X────────────> 10100110
↑
Noise
Therefore, the Data Link Layer needs mechanisms such as:
- Error detection
- ACK
- NAK
- Timeout
- Retransmission
- Sequence numbers
- Flow control
Important protocols include:
- Stop-and-Wait ARQ
- Go-Back-N ARQ
- Selective Repeat ARQ
ARQ means:
Automatic Repeat reQuest
The basic idea is:
If a frame is lost or damaged, ask the sender to transmit it again.
6. Stop-and-Wait ARQ
This is the simplest protocol for a noisy channel.
Working
Sender Receiver
│ │
│────── Frame 0 ───────────────>│
│ │
│<──────── ACK 0 ───────────────│
│ │
│────── Frame 1 ───────────────>│
│ │
│<──────── ACK 1 ───────────────│
If the frame is damaged:
Sender Receiver
│ │
│────── Frame 0 ───────────X │
│ │
│ Timeout │
│ │
│────── Frame 0 ───────────────>│
│ │
│<──────── ACK 0 ───────────────│
The sender waits for an ACK.
If ACK doesn’t arrive within a specified time:
Timeout occurs → retransmit the frame.
Why Sequence Numbers?
Consider this situation:
Sender → Frame 0 → Receiver
Receiver → ACK 0 → X
The receiver received Frame 0, but ACK was lost.
The sender doesn’t know that and retransmits Frame 0.
Sender → Frame 0 → Receiver
The receiver must recognize:
“This is a duplicate of the frame I already received.”
Therefore, sequence numbers are used.
Frame 0
Frame 1
Frame 0
Frame 1
...
Usually, a small sequence-number space is sufficient for Stop-and-Wait.
7. Go-Back-N ARQ
Stop-and-Wait sends only one frame at a time.
Go-Back-N allows multiple frames to be transmitted before receiving individual acknowledgements.
This uses a sliding window.
Example
Suppose the sender can send four frames:
F0 F1 F2 F3
It sends:
F0 ───────→
F1 ───────→
F2 ───────→
F3 ───────→
Suppose F2 is damaged:
F0 ───────→ ✓
F1 ───────→ ✓
F2 ───────→ ✗
F3 ───────→
The receiver cannot accept F3 as the next in-order frame in the basic Go-Back-N model.
The sender goes back and retransmits from F2:
F2 ───────→
F3 ───────→
Hence the name:
Go-Back-N
It goes back to the erroneous frame and retransmits that frame and subsequent outstanding frames.
8. Selective Repeat ARQ
Selective Repeat is more efficient than Go-Back-N on a noisy channel.
Suppose:
F0 ✓
F1 ✓
F2 ✗
F3 ✓
The receiver can keep the correctly received F3 while waiting for F2.
The sender retransmits only F2:
F2 ───────→
Main idea
Only the damaged or missing frame is retransmitted.
9. Comparison of Noisy-Channel Protocols
| Feature | Stop-and-Wait ARQ | Go-Back-N | Selective Repeat |
|---|---|---|---|
| Frames in transit | One | Multiple | Multiple |
| Window | 1 | Sliding window | Sliding window |
| Error recovery | Retransmit one | Retransmit error + following outstanding frames | Retransmit only erroneous/missing frame |
| Efficiency | Low | Better | Highest in many noisy conditions |
| Complexity | Low | Medium | High |
| Receiver buffering | Very little | Limited | More |
| Suitable for | Simple/slow links | General reliable transmission | Noisy links where retransmission cost is high |
10. Noiseless vs Noisy Channel
| Feature | Noiseless Channel | Noisy Channel |
|---|---|---|
| Errors | No | Possible |
| Frame loss | Assumed absent | Possible |
| Error detection | Not required | Required |
| Retransmission | Not required | Required |
| ACK/NAK | Minimal/not needed in simplest protocol | Important |
| Sequence numbers | Usually not needed in simplest protocol | Important |
| Main protocols | Simplest, Stop-and-Wait | Stop-and-Wait ARQ, Go-Back-N, Selective Repeat |
| Complexity | Low | Higher |
11. Overall Picture
DATA LINK PROTOCOLS
│
┌──────────┴──────────┐
│ │
NOISELESS NOISY
CHANNEL CHANNEL
│ │
┌─────┴─────┐ ┌──────┴─────────┐
↓ ↓ ↓ ↓ ↓
Simplest Stop-and- Stop-and Go-Back Selective
Protocol Wait Wait ARQ -N Repeat
ARQ
⭐ Exam Summary
Noiseless Channel
1. Simplest Protocol
- Assumes perfect channel.
- Sender sends frames continuously.
- No error control.
- No retransmission.
2. Stop-and-Wait
- Sends one frame and waits.
- Provides flow control.
- Suitable for an ideal/noiseless channel in the basic model.
Noisy Channel
1. Stop-and-Wait ARQ
- One frame at a time.
- Uses ACK, timeout and retransmission.
- Simple but slow.
2. Go-Back-N ARQ
- Multiple frames can be sent.
- If one frame is lost/damaged, retransmission starts from that frame.
- Faster than Stop-and-Wait.
3. Selective Repeat ARQ
- Multiple frames can be sent.
- Only the missing/damaged frame is retransmitted.
- Efficient but more complex.
Easy memory trick
Noiseless → Simply Send / Stop-and-Wait
Noisy → Stop-and-Wait ARQ → Go-Back-N → Selective Repeat
And remember:
ARQ = Automatic Repeat reQuest → “If something goes wrong, send it again.”
