Flow Control & Error control in Data Link Layer .ppt
ErAnjuBala
752 views
45 slides
Mar 27, 2024
Slide 1 of 45
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
About This Presentation
computer Network
Size: 1.21 MB
Language: en
Added: Mar 27, 2024
Slides: 45 pages
Slide Content
1
It coordinates the amount of data that can be sent before
receiving acknowledgment.
It provides the receiver’s acknowledgment of frames
received corrupted.
Flow control
2
Stop and Wait
3
Normal operation
In Stop-and-Wait ARQ, numbering frames prevents the
retaining of duplicate frames.
4
Stop-and-Wait ARQ, lost frame
5
Stop-and-Wait ARQ, lost ACK frame
6
7
Sliding Window
8
Sliding Window
Sender Sliding Window
9
Sliding Window
Receiver Sliding Window
10
Sliding Window Example
11
12
13
Error Control
14
Go Back N ARQ
What is Go Back N ARQ?
•Thisprotocolisbasedonthemethodofusingthe
SlidingWindowProtocolasthebasisofdata
exchange,wherethe’N’intheprotocolrepresents
thewindowsize.
•ThetermARQrepresentstheAutomaticRepeat
Request,whichreferstosendingmultipleframes
simultaneouslyfromthesendertothereceiverend.
15
Go Back N ARQ
Important Feature of the Protocol
•Theframessharedintheprotocolaresequencedfor
betterefficiency,toavoidanyretransmissionof
shareddata,anddifferentiatebetweentheframes.
16
0 1 2 3 4 5 6 7
Sequence Number
Go Back N ARQ
Important Feature of the Protocol
17
Theprotocolisdesignedtoshare
multipleframesatatime,withthe
receiverend,beforeexpectingany
acknowledgmentfromit.This
simultaneousexchangeofdatais
termedprotocolpipelining.
Go Back N ARQ
Important Feature of the Protocol
18
Iftheacknowledgmentisnot
sharedtothesendersidewithina
certaintimeframe,alltheframes
afterthenon-acknowledgedframe
aretoberetransmittedtothe
receiverside.
Go Back N ARQ
Working of the Protocol
TheworkingoftheGo-Back-NARQprotocol
involvesapplyingtheslidingwindowmethodforthe
basisofsharingdata,andthenumberofframestobe
sharedisdecidedbythewindowsize.
19
Go Back N ARQ
Working of the Protocol
1.Tobeginwith,thesendersidewillsharethedata
framessimultaneouslyaccordingtothewindowsize
assigned,overtothereceiverside,andwaitforthe
acknowledgment.
20
Go Back N ARQ
Working of the Protocol
2.Afterthereceiversidereceivestheframes,itwill
usethefirstframeandsendtheacknowledgmentto
thesenderside.
21
Go Back N ARQ
Working of the Protocol
3.Afterthesenderreceivestheacknowledgmentfor
thefirstframe,thesenderwillsharethenextframe
withthereceiver.
22
Go Back N ARQ
Working of the Protocol
4.Thisexchangecontinuesuntil,duetosomeexternal
orinternalinterruptioninthenetwork,the
acknowledgmentisnotreceivedbythesenderside
23
Go Back N ARQ
Working of the Protocol
5.Then,thesendersidewillgobacktothe
unacknowledgedframeandretransmitthatframe,
alongwithalltheframessharedafterthatframewith
thereceiver.ThisrepresentstheGo-Back-NARQ
protocolmethod.
24
Go Back N ARQ
Advantages
•Multipleframescanbesimultaneoustothereceiver
side.
•Increasetheefficiencyofthedatatransferandhas
morecontrolovertheflowofframes.
•Timedelayislessforsharingdataframes.
25
Go Back N ARQ
Disadvantages
•Thestorageofdataframesatthereceiverside.
•Retransmissionofframes,when the
acknowledgementisnotreceivedbythesenderend.
26
Go Back N ARQ
Problem Statement
Inanetworkchannel,thenumberofframesgivenis
10withthewindow’ssizeassignedas3andevery4
th
packetislost.Findthetotalnumberofmessagessent
fromthesendertothereceiverside.
a)27
b)25
c)22
d)29
27
Go Back N ARQ
Problem Statement
Inanetworkchannel,thenumberofframesgivenis
10withthewindow’ssizeassignedas3andevery4
th
packetislost.Findthetotalnumberofmessagessent
fromthesendertothereceiverside.
123456456756786789789108910910
28
Go Back N ARQ
Problem Statement
Inanetworkchannel,thenumberofframesgivenis
10withthewindow’ssizeassignedas3andevery4
th
packetislost.Findthetotalnumberofmessagessent
fromthesendertothereceiverside.
a)27
b)25
c)22
d)29
29
30
31
32
33
34
Comparison
Stop and Wait
ARQ
Go back N
Selective
Repeat
Remarks
Efficiency 1 / (1+2a)N / (1+2a)N / (1+2a)
Go back N and
Selective
Repeat gives
better
efficiency than
Stop and Wait
ARQ.
35
Comparison
Stop and Wait
ARQ
Go back N
Selective
Repeat
Remarks
Window Size
Sender Window
Size = 1
Receiver
Window Size =
1
Sender Window
Size = N
Receiver
Window Size =
1
Sender Window
Size = N
Receiver
Window Size =
N
Buffer
requirement in
Selective
Repeat is very
large.
If the system
does not have
lots of memory,
then it is better
to choose Go
back N.
36
Comparison
Stop and Wait
ARQ
Go back N
Selective
Repeat
Remarks
Minimum
number of
sequence
numbers
required
2 N+1 2 x N
Selective
Repeat requires
large number of
bits in sequence
number field.
37
Comparison
Stop and Wait
ARQ
Go back N
Selective
Repeat
Remarks
Retransmissions
required if a
packet is lost
Only the lost
packet is
retransmitted
The entire
window is
retransmitted
Only the lost
packet is
retransmitted
Selective Repeat
is far better than
Go back N in
terms of
retransmissions
required.
38
Comparison
Stop and Wait
ARQ
Go back N
Selective
Repeat
Remarks
Bandwidth
Requirement
Bandwidth
requirement is
Low
Bandwidth
requirement is
high because
even if a single
packet is lost,
entire window
has to be
retransmitted.
Thus, if error rate
is high, it wastes
a lot of
bandwidth.
Bandwidth
requirement is
moderate
Selective Repeat
is better than Go
back N in terms
of bandwidth
requirement.
39
Comparison
Stop and Wait
ARQ
Go back N
Selective
Repeat
Remarks
CPU usage Low Moderate
High due to
searching and
sorting required
at sender and
receiver side
Go back N is
better than
Selective Repeat
in terms of CPU
usage.
40
Comparison
Stop and Wait
ARQ
Go back N
Selective
Repeat
Remarks
Level of
difficulty in
Implementation
Low Moderate
Complex as it
requires extra
logic and sorting
and searching
Go back N is
better than
Selective Repeat
in terms of
implementation
difficulty.
41
Comparison
Stop and Wait
ARQ
Go back N
Selective
Repeat
Remarks
Acknowledgeme
nts
Uses independent
acknowledgemen
t for each packet
Uses cumulative
acknowledgemen
ts (but may use
independent
acknowledgemen
ts as well)
Uses independent
acknowledgemen
t for each packet
Sending
cumulative
acknowledgemen
ts reduces the
traffic in the
network but if it
is lost, then the
ACKs for all the
corresponding
packets are lost.
42
Comparison
Stop and Wait
ARQ
Go back N
Selective
Repeat
Remarks
Type of
Transmission
Half duplex Full duplex Full duplex
Go back N and
Selective Repeat
are better in
terms of channel
usage.
43