7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 1/22
The most important responsibility :Flow Control and Error Control
1
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 2/22
•
amount of data that the sender can send beforewaiting for acknowledgment.
• Error Correction is both error detection and error
correction. (Simply : Anytime an error is detectedin an exchange, specified frames areretransmitted. This process called Automatic
.
2
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 3/22
• Stop-and-Wait ARQ• Go-Back-N-ARQ
3
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 4/22
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
un rece ves an ac now e gmen or a rame. – For identification purpose, both Data Frame and
Acknowledgment (ACK) frame are numbered alternately 0 and.
duplicate transmission.
A data 0 frame ACK 1 - A damaged and lost frame is treated in the same manner by the
receiver. ( Its simply discards ).- ,
variable R.- The sender start a timer when it send a frame.-
4
received safe and sound.
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 5/22
There are four situation in a frame transmission : Normal situation,, ,
acknowledgment is delayed.
Normal si tuation
5
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 6/22
Lost or Damaged Frame
6
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 7/22
Lost ACK Frame
The receiverdiscards the 2 nd
7
copy of Frame 1
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 8/22
the acknowledgment is delayed
8
Numbered ACKs are needed of an acknowledgment is delayed
and the frame is lost.
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 9/22
If station A and B both have data to send. Piggybacking is amethod to combine a data frame and an acknowledgment.
9
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 10/22
Go-Back N ARQ
• Go-Back-N ARQ improves the efficiency of Stop andWait ARQ in term of using transmission medium.
• It lets more than one frame be outstanding; It can sendup to W frames before worrying about acknowledgment.
with a range from 0 to 2 m -1.
• The window slides to includes new unsent frames whenthe correct acknowledgments are received (SlidingWindow).
10
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 11/22
Example : Sender Sliding Window
Receiver SlidingWindow
The receiver is alwayslooking for the specific
11
rame o arr ve n a spec corder.
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 12/22
Control Variables
S = Variable holds the sequence number of the recently
sent frame.S F= Holds the sequence number of the first frame.
S L= Holds the sequence number of the last frame.
The size of the window :
= –
The receiver only has onevariable “ R” that only hold
12
e sequence o e rame
expect to receive
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 13/22
• Acknowledgment – The receiver send positive ACK if a frame has arrived and
sound and in order. – If frame is dama ed or is received out of order the
receiver is silent and will discard all subsequent framesuntil receives the one it is expecting. –
unacknowledged frame to expire.
– It causes the sender to go back and resend all frame,eg nn ng w e one w exp re mer.• For Example, suppose the sender has already sent
frame 6, but the timer for frame 3 expires. This meansthat frame 3 has not been acknowledged, so thesender goes back and send frame 3, 4, 5, 6 again. ( Go-Back-N ARQ .
13
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 14/22
Go-Back-N ARQ Normal Operation
14
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 15/22
Go-Back-N ARQ; Damaged or Lost Frame
15
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 16/22
Damaged or Lost Acknowledgment …..?e aye c now e gmen …
16
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 17/22
Sender Window Size
17
- - ,than 2 m; the size of the receiver window is always 1
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 18/22
Selective Repeat ARQ
• The Go-Back-N protocol is very inefficient.
• The Selective Repeat ARQ only resendone rame s amage . ore e c ent or
noisy link but more complex process att e rece ver .• The window size at the sender and the
receiver is the same size:• W = one half of the value 2 m
18
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 19/22
,
RF = Receive First
L = ece ve as
19
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 20/22
Selective Repeat ARQ; Lost Frame
e ec ve epea ARQ also definesa negativeacknowledgment(NAK) that reportsthe sequencenumber of adamaged framebefore the timer
expires
20
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 21/22
Selective Repeat ARQ; Lost andDela ed ACKs and
NAKs……….???
21
7/21/2019 Data Link Control Protocol_Flow Control and Error Control
http://slidepdf.com/reader/full/data-link-control-protocolflow-control-and-error-control 22/22
Selective Repeat ARQ, Sender and Window Size
22