Data Link Control Protocol - Flow Control and Error Control
Data Link Control Protocol - Flow Control and Error Control
Stop-and-Wait ARQ
Go-Back-N-ARQ
Selective-Repeat ARQ
Stop-and-Wait ARQ
This is the simplest flow and error control mechanism. It has
the following mechanism :
The sending device keep the copy of the last frame transmitted
until
til it receives
i
an acknowledgment
k
l d
t ffor th
thatt fframe.
For identification purpose, both Data Frame and
Acknowledgment (ACK) frame are numbered alternately 0 and
1 This numbering allow for identification of data frame in case of
1.
duplicate transmission.
A data 0 frame
A data 1 frame
ACK 1
ACK 0
Normal situation
The receiver
discards the 2nd
copy of Frame 1
7
Go-Back N ARQ
Go-Back-N ARQ improves the efficiency of Stop and
Wait ARQ in term of using transmission medium.
It lets more than one frame be outstanding; It can send
up to W frames before worrying about acknowledgment.
Frame from a sending station are numbered sequentially
with a range from 0 to 2m-1.
The window slides to includes new unsent frames when
the correct acknowledgments are received (Sliding
Window).
10
Receiver Sliding
Window
The receiver is always
looking for the specific
frame to arrive
arri e in a specific
order.
11
Control Variables
Acknowledgment
The receiver send positive ACK if a frame has arrived and
sound and in order.
If frame is damaged
g or is received out of order,, the
receiver is silent and will discard all subsequent frames
until receives the one it is expecting.
The silent of the receiver causes the timer of
unacknowledged frame to expire.
It causes the sender to go back and resend all frame,
b i i with
beginning
ith th
the one with
ith expired
i d titimer.
For Example, suppose the sender has already sent
frame 6, but the timer for frame 3 expires. This means
that frame 3 has not been acknowledged, so the
sender goes back and send frame 3, 4, 5, 6 again. (GoBack-N ARQ).
)
13
14
15
?
?
16
In Go-Back-N ARQ
ARQ, the size of the sender must be lest
than 2m; the size of the receiver window is always 1
17
RF = Receive First
RL = Receive
R
i L
Lastt
19
Selective
S
l ti R
Repeatt
ARQ also defines
a negative
acknowledgment
(NAK) that reports
the sequence
number of a
damaged frame
before the timer
expires
20
21
Selective Repeat
p
ARQ, Sender and Window Size
22