Flow Control & Error control in Data Link Layer .ppt

ErAnjuBala 752 views 45 slides Mar 27, 2024
Slide 1
Slide 1 of 45
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45

About This Presentation

computer Network


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

Conclusions
44
•GobackNismoreoftenusedthanotherprotocols.
•SRprotocolislessusedbecauseofitscomplexity.
•StopandWaitARQislessusedbecauseofitslowefficiency.
•Dependingonthecontextandresourcesavailability,Go
backNorSelectiveRepeatisemployed.
•SelectiveRepeatandStopandWaitARQaresimilarin
termsofretransmissions.
•GobackNandSelectiveRepeataresimilarintermsof
efficiencyifsenderwindowsizesaresame.
•SRprotocolmaybeconsideredasacombinationof
advantagesofStopandWaitARQandGobackN.
•SRprotocolissuperiortootherprotocolsbutbecauseofits
complexity,itislessused.

Thanks!!
45