Data Link Control and Protocols Flow and Error
Data Link Control and Protocols Flow and Error
Flow Control
Flow control coordinates the amount of data that can be
sent before receiving acknowledgement
It is one of the most important functions of data link layer.
Flow control is a set of procedures that tells the sender
how much data it can transmit before it must wait for an
acknowledgement from the receiver.
Receiver has a limited speed at which it can process
incoming data and a limited amount of memory in which
to store incoming data.
Receiver must inform the sender before the limits are
reached and request that the transmitter to send fewer
frames or stop temporarily.
Since the rate of processing is often slower than the rate
of transmission, receiver has a block of memory (buffer)
for storing incoming data until they are processed.
Error Control
Error control includes both error detection
and error correction.
It allows the receiver to inform the sender
if a frame is lost or damaged during
transmission and coordinates the
retransmission of those frames by the
sender.
Error control in the data link layer is based
on automatic repeat request (ARQ).
Whenever an error is detected, specified
frames are retransmitted.
Stop-andWait
Stop-and-Wait, lost
ACK frame
If the sender
receives a damaged
ACK, it discards it.
When the timer of
the sender expires,
the sender
retransmits frame 1.
Receiver has already
received frame 1
and expecting to
receive frame 0
(R=0). Therefore it
discards the second
copy of frame 1.
Stop-and-Wait, delayed
The ACK can be
ACK frame
delayed at the
receiver or due to
some problem
It is received after
the timer for frame
0 has expired.
Sender
retransmitted a
copy of frame 0.
However, R =1
means receiver
expects to see
frame 1. Receiver
discards the
duplicate frame 0.
Sender receives 2
ACKs, it discards
the second ACK.
Piggybacking
A method to
combine a data
frame with ACK.
Station A and B
both have data to
send.
Instead of sending
separately, station
A sends a data
frame that includes
an ACK.
Station B does the
same thing.
Piggybacking saves
bandwidth.
Disadvantage of Stop-andWait
In stop-and-wait, at any point in time, there
is only one frame that is sent and waiting to
be acknowledged.
This is not a good use of transmission
medium.
To improve efficiency, multiple frames
should be in transition while waiting for ACK.
Two protocol use the above concept,
Go-Back-N ARQ
Selective Repeat ARQ