Data Link Control
Data Link Control
Data Link Control
Control
Note
Flow control refers to a set of procedures
used to restrict the amount of data that the
sender can send before waiting for
acknowledgment.
Note
Error control in the data link layer is based
on automatic repeat request, which is the
retransmission of data.
PROTOCOLS
Now let us see how the data link layer can combine
framing, flow control, and error control to achieve the
delivery of data from one node to another. The protocols
are normally implemented in software by using one of
the common programming languages.
Taxonomy of protocols
NOISELESS CHANNELS
Let us first assume we have an ideal channel in which
no frames are lost, duplicated, or corrupted. We
introduce two protocols for this type of channel.
Flow diagram
Flow diagram
NOISY CHANNELS
Although the Stop-and-Wait Protocol gives us an idea
of how to add flow control to its predecessor, noiseless
channels are nonexistent. We discuss three protocols in
this section that use error control.
Note
Error correction in Stop-and-Wait ARQ is
done by keeping a copy of the sent frame
and retransmitting of the frame when the
timer expires.
Note
In Stop-and-Wait ARQ, we use sequence numbers
to number the frames. The sequence numbers are
based on modulo-2 arithmetic.
In Stop-and-Wait ARQ, the acknowledgment
number always announces in modulo-2 arithmetic
the sequence number of the next frame expected.
Stop-AND-WAIT
ARQ
Go-BACK-N
ARQ
SELECTIVE REPEAT
ARQ
Stop-and-Wait ARQ
Keep a copy of the frame until ACK is received.
Frame 0 is acknowledged by ACK 1 and viceversa.
Lost and corrupted frames are considered as
same and No ACK is sent.
Senders control variable
S = holds number of recently sent frame
Receivers control variable
R = holds number of the next frame expected
Sender starts a timer when it sends a frame.
If an ack does not arrive within an allotted time
period, sender assumes that packet is corrupted
or lost. Sender will resend the same packet.
Piggybacking
Bidirectional transmission
Method to combine a data frame with
an acknowledgement.
Go-back-N ARQ
Sending multiple frames at a time.
Keep the copy of the frames before ACK is received.
Sequence number is included in each frame in the
header. If there are m bits for sequence number then
we can have maximum 2m 1.
Sender Sliding Window
Window size is fixed here.
Note
Note
Note
Note
Note
If size of window is less than 2m, and all three ACK are
lost, the frame 0 timer expires and all three frames are
resent. Receiver discards them as duplicate.
If size of window is equal to 2m, and all three ACK are
lost, sender will send the duplicate frame 0 but receiver
will accept it as next frame as it expects that