DATA COMMUNICATION (ELA…)
description
Transcript of DATA COMMUNICATION (ELA…)
![Page 1: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/1.jpg)
DATA COMMUNICATION(ELA…)
DATA LINK CONTROL PROTOCOLS1
![Page 2: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/2.jpg)
INTRODUCTION
Synchronization and Interfacing are insufficient due toProbability of transmission errorsNeed of receiver to regulate arrival rate of
data Layer of logic is added
Data Link Control
Key mechanisms
2
![Page 3: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/3.jpg)
FLOW CONTROL
![Page 4: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/4.jpg)
FLOW CONTROL
4
Rcv Data from Tx
Is there buffercapacity left?
Stop Rcv’ng Data from Tx
Transfer Data to next upper layer
Process Data
No
Yes
Begin
Clear Buffer More data
to Tx?Yes
No
Stop
![Page 5: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/5.jpg)
MODEL OF FRAME TRANSMISSION
5
![Page 6: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/6.jpg)
FLOW CONTROL
DefinitionsTransmission time
Time taken to emit all bits onto the medium Proportional to length of frame
Propagation time Time for a bit to traverse the link
OptionsStop-and-WaitSliding Window
6
![Page 7: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/7.jpg)
STOP-AND-WAIT FLOW CONTROL
How does it work? Source transmits frame Destination receives frame and replies with
acknowledgement Source waits for ACK before sending next frame Destination can stop flow by not sending ACK
Works well for a few large frames Not good when fragmentation is used
7
![Page 8: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/8.jpg)
PERFORMANCE ISSUES
Where d Link distance (m) V Velocity of propagation (m/s) L Length of frame in bits R Data Rate (bps)
8
a =Propagation TimeTransmission Time
d/VL/R
RdVL
= =
![Page 9: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/9.jpg)
STOP-AND-WAIT – LINK UTILIZATION
9
Tx Time = 1, Propagation time = a
a > 1 a < 1
![Page 10: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/10.jpg)
SLIDING WINDOW FLOW CONTROL
How does it work?Allows multiple frames to be in transitReceiver has buffer of length = WTransmitter can send up to W frames
without ACKEach frame is numberedACK includes number of next frame
expectedSequence number bounded by size of field
(k) Frames are numbered modulo 2k
10
![Page 11: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/11.jpg)
SLIDING WINDOW DIAGRAM
11
![Page 12: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/12.jpg)
SLIDING WINDOW ENHANCEMENTS
Receiver can acknowledge frames without permitting further transmission RNR Receive Not Ready Must send a normal ACK to resume
If duplex, use piggybacking If no data to send, use ACK frame If data but no ACK to send
Send last ACK number again, or have ACK valid flag (TCP)
12
![Page 13: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/13.jpg)
ERROR CONTROL
![Page 14: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/14.jpg)
ERROR CONTROL
Detection and correction of errorsLost framesDamaged frames
Automatic Repeat RequestError detectionPositive acknowledgmentRetransmission after timeoutNegative acknowledgement and
retransmission
14
![Page 15: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/15.jpg)
AUTOMATIC REPEAT REQUEST (ARQ) These techniques are all based on either
Stop-and-wait or Sliding Window flow control techniques Stop-and-wait ARQ Go-back-N ARQ Selective reject ARQ
Selective retransmission
15
![Page 16: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/16.jpg)
STOP-AND-WAIT ARQ
Basic Operation
16
T
RF(0)
F(0)
AC
K(1
)
t<To ….t=To
F(1) F(1)
AC
K(0
)
t<To
Duplicate detected/discarded
t
tF(1) F(1) F(1)
t=To….
AC
K(0
)
![Page 17: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/17.jpg)
STOP-AND-WAIT ARQ
Pros and Cons
SimpleInefficient
Referred to as Idle RQ
17
![Page 18: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/18.jpg)
GO-BACK-N ARQ
Most common implementation of Sliding Window flow control
Uses window to control number of outstanding frames
If no error, ACK as usual with next frame expected
If error, reply with rejection (REJ)Discard that frame and all future frames until
error frame received correctlyTransmitter must go back and retransmit
that frame and all subsequent frames18
![Page 19: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/19.jpg)
GO-BACK-N ARQ
19
![Page 20: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/20.jpg)
SELECTIVE REJECT
Also called selective retransmission Advantages
Only rejected frames are retransmittedSubsequent frames are accepted by the
receiver and bufferedMinimizes retransmission
DisadvantagesReceiver must maintain large enough
bufferMore complex logic in transmitter
20
![Page 21: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/21.jpg)
SELECTIVE REJECT ARQ
21
![Page 22: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/22.jpg)
PERFORMANCE ISSUES
![Page 23: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/23.jpg)
PERFORMANCE ISSUES
Stop-and-Wait Flow Control (No Errors)A sends a frame to BAfter receiving frame, B sends and ACK to AProcess is repeated n timesThus, total time to transmit n frames can be
expressed as
WhereTF Time to send a frame and receive
and ACK
23
![Page 24: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/24.jpg)
PERFORMANCE ISSUES
Where tprop Propagation time from A to B
tframe Time to transmit a frame
tproc Processing time at each station
tack Time to transmit and ACK
24
procackpropprocframepropF ttttttT
![Page 25: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/25.jpg)
PERFORMANCE ISSUES
Since a = tprop / tframe
25
procackpropprocframepropF ttttttT
)2( framepropF ttnnTT
frameprop
frame
frameprop
frame
tt
t
ttn
tnU
2)2(
aU
21
1
![Page 26: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/26.jpg)
PERFORMANCE ISSUES
Sliding Window Flow Control (No Errors)
26
U
12 aW
12 aW12 a
W
1
![Page 27: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/27.jpg)
PERFORMANCE ISSUES
Stop-and-Wait ARQ (With Errors)
Where Nr Expected # of transmissions of a frame
27
)21(
1
aNU
r
a
P
aNU
r 21
1
)21(
1
PNr
1
1
![Page 28: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/28.jpg)
PERFORMANCE ISSUES
Selective Reject ARQ (With Errors)
28
U
12 aW
12 aW12
)1(
a
PW
P1
![Page 29: DATA COMMUNICATION (ELA…)](https://reader035.fdocuments.in/reader035/viewer/2022062315/56815ab4550346895dc8677b/html5/thumbnails/29.jpg)
PERFORMANCE ISSUES
Go-back-N ARQ (With Errors)
29
U
12 aW
12 aW)1)(12(
)1(
WPPa
PW
aP
P
21
1