Protocols

580 views 28 slides May 01, 2021
Slide 1
Slide 1 of 28
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

About This Presentation

To transmit the data from one node to another, data link layer combines framing, flow control & error control schemes.
We divide the discussion protocols into those that can be used for noiseless(error free) channels and those that can be used for noisy (error creating...


Slide Content

Protocols
Dr R Jegadeesan Prof & Head
Jythishmathi Institute of Technology and
Science, Karimnagar

PROTOCOLS
Totransmitthedatafromonenodetoanother,datalink
layercombinesframing,flowcontrol&errorcontrol
schemes.
Wedividethediscussionprotocolsinto
thosethatcanbeusedfornoiseless(errorfree)channels
andthosethatcanbeusedfornoisy(errorcreating)
channels.

Taxonomy of protocols

NOISELESS CHANNELS
Letusfirstassumewehaveanidealchannelinwhich
noframesarelost,duplicated,orcorrupted.We
introducetwoprotocolsforthistypeofchannel.
➢Simplest Protocol
➢Stop and wait Protocol

Simplest protocol
◼Simplest protocol is a unidirectional protocol in which data
frames are travelling in only one direction from sender to
receiver.
◼In this there are no errors that take place in physical channel.
◼The data link layer on the sender side takes the packet from
the network layer & then adds the headerand trailerto create
frame& transmit it to the physical layer.
◼The receiver side data link layer removes the headerfrom
frameand transmits as packet to the network layer.
◼In this protocol the receiver will never be overwhelmed.

The design of the simplest protocol with no flow or error control

➢Figurebelowshowsanexampleofcommunicationusingthis
protocol.
➢Thesendersendsasequenceofframeswithouteventhinking
aboutthereceiver.
➢Tosendthreeframes,threeeventsoccuratthesendersiteand
threeeventsatthereceiversite.
Note:thatthedataframesareshownbytiltedboxes;theheightof
theboxdefinesthetransmissiontimedifferencebetweenthefirst
bitandthelastbitintheframe.
Example

Stop and wait protocol
◼Stopandwaitisaprotocolwheresendersendsoneframeand
thenwaitsforacknowledgment,beforefurtherproceedings.
◼Theadvantageofstopandwaitprotocolisitssimplicity.Each
frameischeckedandacknowledgedbeforethenextframeis
sent.
◼Thedisadvantageisitsinefficiency.Stop&waitisveryslow.
◼Eachframemusttravelallthewaytothereceiverandan
acknowledgementmusttravelallthewaybackbeforenext
framecanbetransmitted.

Design of Stop-and-Wait Protocol

Figurebelowshowsanexampleofcommunicationusingthis
protocol.Thesendersendsoneframeandwaitsforfeedbackfrom
thereceiver.WhentheACKarrives,thesendersendsthenext
frame.Notethatsendingtwoframesintheprotocolinvolvesthe
senderinfoureventsandthereceiverintwoevents.

NOISY CHANNELS
AlthoughtheStop-and-WaitProtocolgivesusanidea
ofhowtoaddflowcontrol,noiselesschannelsare
nonexistent.
Wediscussthreeprotocolsinthissectionthatuse
errorcontrol.
Stop-and-Wait Automatic Repeat Request
Go-Back-N Automatic Repeat Request
Selective Repeat Automatic Repeat Request

Stop-and-Wait Automatic Repeat Request(ARQ)
◼Error correction in Stop-and-Wait ARQ is done by
keeping a copy of the sent frame and retransmitting
of the frame when the timerexpires.
◼InStop-and-WaitARQ,weusesequencenumbersto
numbertheframes.Thesequencenumbersis
representedinmodulo-2arithmetic.
◼InStop-and-WaitARQ,theacknowledgment
numberalwaysannouncesthesequencenumberof
thenextframeexpected.

Example of Stop-and-Wait
ARQ.
◼Frame 0 is sent and
acknowledged.
◼Frame 1 is lost and resent
after the time-out. The resent
frame 1 is acknowledged and
the timer stops.
◼Frame 0 is sent and
acknowledged, but the
acknowledgment is lost. The
sender has no idea if the
frame or the
acknowledgment is lost, so
after the time-out, it resends
frame 0, which is
acknowledged.

Go Back-N Automatic Repeat Request(ARQ)
◼Inthisprotocolwecansendseveralframesbeforereceiving
acknowledgements.Wekeepacopyofthisframesuntilthe
acknowledgementsarrive.
◼Framesfromasendingstationarenumberedsequentially.In
theGo-Back-NProtocol,thesequencenumbersaremodulo
2
m
,wheremisthesizeofthesequencenumberfieldinbits,the
sequencenumberrangefrom0to2m-1.
◼Forexampleifmis4thesequencenumbersare0through
15.howeverwecanrepeatsequencenumbersare
◼0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7,8,9,10,11….

◼Sliding window is concept that defines the range of sequence
numbersthat is concern of the sender and receiver.
◼In other words sender and receiver need to deal with only
part of possible sequence numbers.
◼The range which is concern of the sender is called send
sliding window.
◼The range which is concern of the receiver is called receiver
sliding window.

Thesendslidingwindowisandefineanimaginaryboxof
size2
m
−1withthreevariables:Sf,Sn,andSsize.
Thesendslidewindowcanslideoneormoreslotswhenavalid
acknowledgementarrives.

The receive window is define an imaginary box of size1 with
one single variable Rn. The window slides when a correct
frame has arrived; sliding occurs one slot at a time.

Figure below shows us design for this Go-Back N protocol. As we can see
multiple frames can be transmit in forward direction and multiple ACK in
reverse direction. The idea is similar to stop and wait ARQ but difference is
that send window allows us to have many frames in transition as there are
slots in send window.

➢ThereceiversendspositiveACKifaframehasarrivedsafe.Ifaframeis
damagedorreceivedoutoforderthereceiverwillsentNACKframeand
willdiscardallsubsequentframesuntilitreceivestheoneexpecting.
➢Whenthetimerexpiresthesenderresendsalloutstandingframes.For
examplesupposethesenderhasalreadysentframe0,1,2,3butthetimer
forframe1expires.Thismeansthatframe1hasnotbeenACK:thesender
goesbackandsendsframes1,2,3again.Thatiswhytheprotocoliscalled
Go-Back-NARQ

Selective repeat ARQ
◼The specific damaged or lost frames are retransmitted in
selective repeat ARQ.
◼The receiver sends positive ACK if a frame has arrived safe
and sound. If a frame is damagedor receivedout of order
the receiver will sent NAK frame and it will not discard
previously sent frames.

The send window is an abstract concept defining an imaginary
box of size 2
m
− 1 with three variables: Sf, Sn, and Ssize.
In Selective Repeat ARQ, the size of the sender and receiver
window must be at most one-half of 2
m
.

The receive window is an abstract concept defining an
imaginary box of size 2
m
− 1 with variable Rn

Design of selective repeat ARQ

Piggy backing
◼Data frames flow in only one direction although control
information such as ACK and NAK frames can travel in the
other direction.
◼In real life, data frames are normally flowing in both
directions from node A to node B and from node B to node A.
◼This means that the control information also needs to flow in
both directions.
◼A technique called piggybacking is used to improve the
efficiency of the bidirectional protocols.
◼When a frame is carrying data from A to B, it can also carry
control information about arrived (or lost) frames from B;
when a frame is carrying data from B to A, it can also carry
control information about the arrived (or lost) frames from A.

Thank you