SlideShare a Scribd company logo
Datalink control(framing,protocols)
BrAinY 4
Presented to:-
Ma’am Sumbal and class
Group Members
ZUPASH
SANA
MARHABA
Group Leader
HiRA
DATA LINK CONTROL:-
Framing
Error control &flow controls
Protocols
Noiseless channel
Noisy channel
Topics to be discussed:-
FRAMING
Zupash Kiramat
Datalink control(framing,protocols)
FRAMING
The data link layer needs to pack bits into
frames. So that each frame is distinguishable
from another.
TYPES
Fixed size framing
Variable sized framing
•Data to be carried are of 8 bits character from
a coding system such as ASCII.
•The header carries the source and destination
addresses and other control information .
•Trailer which carries error detection or error
correction redundant bits, are also multiple of
8 bits.
•To separate one fame from the next an 8bits
frame is added at the beginning and at the end
of a frame.
Character oriented protocol:
A frame in character oriented protocol
Stuffing
11.10
Byte stuffing and unstuffing
Byte stuffing is the process of adding 1
extra byte whenever there is a flag or
escape character in the text
Note:
11.12
Bit stuffing is the process of adding one extra 0 whenever
five consecutive 1s follow a 0 in the data, so that the
receiver does not mistake
the pattern 0111110 for a flag.
Note
Bit oriented protocol:
the data section of a frame is a sequence
of bits to be Interpreted by the upper
layer as text, graphic, audio, video and
so on.
Figure shows a frame in a bit oriented
protocol.
Bit stuffing and unstuffing
 ERROR CONTROL AND FLOW
CONTROL
 PROTOCOLS
SANA AYUB
Data link control
 The most important responsibilities of the
data link layer are flow control and error
control. Collectively, these functions are
known as data link control.
 Data link control=flow +error control
Flow control
 Flow control refers to a set of procedures
used to restrict the amount of data that the
sender can send before waiting for
acknowledgment.
 Receiving device has
 Limited speed
 Limited amount of memory.
 So the sending device must not send frame at
a rate faster than a receiving station can
absorb them.
Error control
 Error control includes both error control
and error detection.
 Allows reciever to inform the sender if a
frame is lost or damaged during
transmission and coordinates the
retransmission of those frames by the
sender.
 Whenever an error is detected,specified
frames are retransmitted.
PROTOCOLS:
Protocols
 Now let us see how the data link layer can
combine framing, flow control, and error
control to achieve the delivery of data from
one node to another. The protocols are
normally implemented in software by using
one of the common programming languages.
To make our discussions language-free, we
have written in pseudocode a version of each
protocol that concentrates mostly on the
procedure instead of delving into the details of
language rules.
Datalink control(framing,protocols)
 NOISELESS CHANNEL
 simplest protocol
 stop-and-wait protocol
MARHABA WAZIR
NOISELESS CHANNEL
1. NOISELESS CHANNEL
lets assume that we have an ideal
channel in which no frames are lost,
corrupted or duplicated.
We introduce two protocols for this
type channel:
a. Simplest protocol
b. STOP-and-WAIT protocol
The design of the simplest protocol with no
flow or error control
Figure shows an example of communication using this protocol
a.Simplest protocol
 It is very simple.
 The sender sends a sequence of frames
without even thinking about the receiver.
 To send three frames, three events occur at
the sender site and three events at the
receiver site.
 Note
that the data frames are shown by tilted
boxes; the height of the box defines the
transmission time difference between the
first bit and the last bit in the frame.
Flow diagram for simplest protocol
b.STOP and WAIT Protocol
Stop-and-Wait Protocol
 Simple tokens ofACK and flow control added
Stop-and-Wait Protocol flow diagram
Stop-and-Wait protocol
 At most one packet in flight at any time.
 Sender sends one packet.
 Reciver sends acknowledgment packet when
it receive data.
THINKING CORNER
What type of a link we need here?
(Simplex, half duplex, full duplex)
NOISY CHANNEL
1) Stop-and-waitARQ
2) Go-back-N ARQ
3) Selective repeatARQ
HIRA ANWAR
2.NOISEY CHANNEL
Noisy channel
 Realistic
• error can and will happen.
• needs error control.
 Mechanisms
1) Stop-and-waitARQ
2) Go-back-N ARQ
3) Selective repeatARQ
STOP AND WAIT ARQ
Frames
Packet Error Free Packet
Transmitter Receiver
Information Frame
Control Frame
Timer is set after
each frame
transmission
38
Stop-and-Wait ARQ(Automatic
Repeat reQuest
 Sender keeps a copy of sent frame until
successful delivery is ensured.
 Receiver responds with an ack when it
successfully receives a frame.
 Both data and ack frames must be numbered.
 When sender does not receive an ack within
certain time, it assumes frame is lost, then
retransmits the same frame.
39
Stop-and-Wait ARQ
1. Normal operation
2. The frame is lost
3. The ACK is lost
4. The ACK is delayed
40
Flow Diagram: Normal Operation
Time
Sender Receiver
Time
S = 0
S = 1
R = 0
R = 1
R = 0
Deliver
Deliver
41
Flow Diagram: Lost Frame
Time
Sender Receiver
Time
S = 0 R = 0
R = 1
R = 0
S = 1
Timeout
Deliver
Deliver
42
Flow Diagram: Delayed ACK
Sender Receiver
S = 0 R = 0
R = 1
R = 0
Timeout
S = 1
S = 0
R = 1
Frame 0 expected;
discard
Deliver
Timeout
Deliver
 THINKINGCORNER: Why
Data frames & ACK frames need
to be sequentially numbered?
Need for Sequence Numbers
(a) Frame 1 lost
A
B
Frame
0
Frame
1
ACK
Frame
1
ACK
Time
Time-out
Frame
2
(b) ACK lost
A
B
Frame
0
Frame
1
ACK
Frame
1
ACK
Time
Time-out
Frame
2
ACK
45
Drawbacks of Stop-and-Wait
ARQ
 After each frame sent the host must wait for an ACK.
 inefficient use of bandwidth.
 To improve efficiencyACK should be sent after
multiple frames.
 Alternatives: SlidingWindow protocols
1. Go-back-NARQ
2. Selective Repeat ARQ
46
Pipelining
 One task begins before the other one ends.
 increases efficiency in transmission.
 There is no pipelining in Stop-and-Wait ARQ.
 In sliding window protocol pipelining is
implemented.
Sliding window
 The sliding window is an theoretical concept
that defines the range of sequence numbers
that is the concern of the sender and receiver.
2.GO BACK N ARQ
(Automatic Repeat
reQuest)
49
(sliding window protocol)
Go-Back-N ARQ
 Allows multiple frames to be sent before
waiting for ACK.
 These frames must be numbered differently.
 Frame numbers are called Sequence numbers.
 Frames must be received in the correct order.
 If a frame is lost, the lost frame and all of the
following frames must be retransmitted.
Datalink control(framing,protocols)
51
The name of Go-back-N: why?
 Re-sending frame
 when the frame is damaged the sender goes back and sends
a set of frames starting from the last one ACKn’d
 the number of retransmitted frames is N
 Example:
 The window size is 4.
 A sender has sent frame 6 and the timer expires for
frame 3 (frame 3 not ACKn’d).The sender goes back
and re-sends the frames 3, 4, 5 and 6.
Sequence numbers
 Frame header contains m bits for sequence
number.
 That allows up to 2m different frame
numbers.
 We can repeat sequence numbers.
53
Sending Window
 Sending more than one frame at once requires
sender to buffer multiple frames.
 Known as "sending window"
 Any of these frames in the window can be lost.
54
"Sliding" Window
 Once the first frames in the window is ACKed
 ACKed frames are removed from the buffer
 More frames are transmitted
 Result:The window slides to the right
55
Receiving Window
 Receiver expects one frame at a time
56
Go-back-N
-Control variables-
 S- holds the sequence number of the recently sent frame
 SF – holds sequence number of the first frame in the window
 SL – holds the sequence number of the last frame
 R – sequence number of the frame expected to be received
57
Go-Back-N: Window Sizes
 For m-bit sequence numbers.
 Send window size: at most 2m-1.
 Up to 2m-1 frames can be sent without ACK.
 Receive window size: 1
 Frames must be received in order.
58
Go-Back-N: Normal Operation
59
Go-Back-N: Lost Frame
ACKs are
cumulative
60
Go-back-N
 Inefficient
 all out of order received packets are discarded
 This is a problem in a noisy link
 many frames must be retransmitted -> bandwidth
consuming
 Solution
 re-send only the damaged frames
 Selective RepeatARQ
 avoid unnecessary retransmissions
61
 Thinking Corner
 Stop-and-Wait is a special case of Go-Back-N.
 What is the send window size in Stop-and-Wait?
SELECTIVE REPEAT ARQ
63
Selective Repeat ARQ
 Go-Back-N always discards out-of-order
frames
 Losing one frame may result in retransmission of
multiple frames
 Very inefficient in noisy link
 Selective Repeat ARQ allows frames to be
received out of order
 Therefore, receive window > 1
64
Send and Receive Windows
 Sender and receiver share window space
equally
 For m-bit sequence numbers
 Send window: up to 2m-1
 Receive window: up to 2m-1
65
Send Window
66
Receive Window
67
Negative ACK
 Used by receiver to indicate missing frame
68
Selective Repeat: Window
Size
69
PIGGY BACKING
(Bidirectional Transmission)
 Data are transferred both ways
 ACK are "piggybacked" with data frames
Queries??????
links
 https://youtu.be/Ms1XEMZbjgM
 https://youtu.be/Cs8tR8A9jm8
 https://youtu.be/ovEQhPCbSGI
Datalink control(framing,protocols)
THANKYOU

More Related Content

What's hot (20)

PPTX
Unit 2 data link control
Vishal kakade
 
PPT
Mac sub layer
DIKSHA_LAHRANI
 
PDF
Chapter 7 - Data Link Control Protocols 9e
adpeer
 
PPT
csma ca
Haroon Khan
 
PPT
Ch11
Nitesh Singh
 
PPTX
Chapter 11: Data Link Control
JeoffnaRuth
 
PPTX
ALOHA Protocol (in detail)
Hinal Lunagariya
 
PPSX
Flow Control
selvakumar_b1985
 
PPT
Chapter 12
Faisal Mehmood
 
PPT
Data Link Control Protocols
TechiNerd
 
PDF
Cse3213 11 flow_errorcontrol_f2010
namokar
 
PPTX
Data link control & protocol concepts
Raji Lakshmi
 
PDF
Importance of sliding window protocol
eSAT Journals
 
PPTX
Stop-and-Wait ARQ Protocol
praneetayargattikar
 
PPTX
Sliding window protocol(ARQ technique)
shilpa patel
 
PPT
Flow & Error Control
tameemyousaf
 
PDF
Importance of sliding window protocol
eSAT Publishing House
 
PPT
aloha
DeepikaT13
 
PPT
Stop and Wait arq
pramodmmrv
 
Unit 2 data link control
Vishal kakade
 
Mac sub layer
DIKSHA_LAHRANI
 
Chapter 7 - Data Link Control Protocols 9e
adpeer
 
csma ca
Haroon Khan
 
Chapter 11: Data Link Control
JeoffnaRuth
 
ALOHA Protocol (in detail)
Hinal Lunagariya
 
Flow Control
selvakumar_b1985
 
Chapter 12
Faisal Mehmood
 
Data Link Control Protocols
TechiNerd
 
Cse3213 11 flow_errorcontrol_f2010
namokar
 
Data link control & protocol concepts
Raji Lakshmi
 
Importance of sliding window protocol
eSAT Journals
 
Stop-and-Wait ARQ Protocol
praneetayargattikar
 
Sliding window protocol(ARQ technique)
shilpa patel
 
Flow & Error Control
tameemyousaf
 
Importance of sliding window protocol
eSAT Publishing House
 
aloha
DeepikaT13
 
Stop and Wait arq
pramodmmrv
 

Viewers also liked (18)

DOCX
English as an Additional Language
The Higher Education Academy
 
PPTX
35 05-10-ธนทัต-layer
Ntun Workcom
 
PPT
Transmission Media
Devika Rangnekar
 
PPTX
Atm
Atul Khanna
 
PPTX
TRANSMISSION MEDIA
MERCYERICKKASHOMA
 
PPTX
New framing-protocols
Nitesh Singh
 
PPSX
Framing Protocols
selvakumar_b1985
 
PPTX
Osi reference model
prashob7
 
PPT
Connection( less & oriented)
ymghorpade
 
PPT
Point to-point-protocol
amigurumi21
 
PDF
Sliding window
radhaswam
 
PDF
Case Study for Bank ATM Queuing Model
IOSR Journals
 
PPSX
Issues in Data Link Layer
selvakumar_b1985
 
PDF
Unit 4 data link layer
mekind
 
PPT
The Data Link Layer
robbbminson
 
PPT
Guided Transmission Media
asrabatool
 
PPTX
Data link layer
Mukesh Chinta
 
PPT
OSI Model
Rahul Bandhe
 
English as an Additional Language
The Higher Education Academy
 
35 05-10-ธนทัต-layer
Ntun Workcom
 
Transmission Media
Devika Rangnekar
 
TRANSMISSION MEDIA
MERCYERICKKASHOMA
 
New framing-protocols
Nitesh Singh
 
Framing Protocols
selvakumar_b1985
 
Osi reference model
prashob7
 
Connection( less & oriented)
ymghorpade
 
Point to-point-protocol
amigurumi21
 
Sliding window
radhaswam
 
Case Study for Bank ATM Queuing Model
IOSR Journals
 
Issues in Data Link Layer
selvakumar_b1985
 
Unit 4 data link layer
mekind
 
The Data Link Layer
robbbminson
 
Guided Transmission Media
asrabatool
 
Data link layer
Mukesh Chinta
 
OSI Model
Rahul Bandhe
 
Ad

Similar to Datalink control(framing,protocols) (20)

PPT
CN_unit2.ppt Data Link Layer characteristics, categories
VSrilakshmi2
 
PPT
DataLinkControl.ppt
MaddalaSeshu
 
PPTX
Lecture 36-43_DATA_COMMUNICATION_PPT.pptx
SuhaniTalreja
 
PPT
session -7 - Sliding Window Protocol 1- N oisy Channels.ppt
nanisrikar276711
 
PPTX
CS3591- Computer Networks Unit-2 Transport layer
LOGANATHANK24
 
PPT
JNTUHS-18-12-2024 - Copy.ppt computer networks notes
latanowpada
 
PPTX
Presentation on Flow Control (noisy and non-noisy channels))
TheYoutubester
 
PPT
09 Data Link LayerFlow Control.ppt
ShaliniKumariGupta1
 
PPTX
Unit IV_Flow.pptx
TejasRao8
 
PPT
07 data linkcontrol
Srinivasa Rao
 
PPT
3a data link layer
kavish dani
 
PPTX
go back n protocol
shivani monga
 
PPTX
Different protocols for data communication networks
Nt Arvind
 
PPT
stop and wait _
SwatiHans10
 
PPTX
Data Link Layer_Data Communications&Computer Neworks.pptx
AllankiSanyasiRao
 
PDF
advances in computer networks Notes M.tech
1JT19IS042SandhyaH
 
PDF
14-Error Detection Techniques-22-01-2025.pdf
abhimanyuyadav2022
 
PPTX
Transport layer
arvind pandey
 
PDF
Ch05_OSI_Reference_Model - Compressed.pdf
mengeshasefa835
 
CN_unit2.ppt Data Link Layer characteristics, categories
VSrilakshmi2
 
DataLinkControl.ppt
MaddalaSeshu
 
Lecture 36-43_DATA_COMMUNICATION_PPT.pptx
SuhaniTalreja
 
session -7 - Sliding Window Protocol 1- N oisy Channels.ppt
nanisrikar276711
 
CS3591- Computer Networks Unit-2 Transport layer
LOGANATHANK24
 
JNTUHS-18-12-2024 - Copy.ppt computer networks notes
latanowpada
 
Presentation on Flow Control (noisy and non-noisy channels))
TheYoutubester
 
09 Data Link LayerFlow Control.ppt
ShaliniKumariGupta1
 
Unit IV_Flow.pptx
TejasRao8
 
07 data linkcontrol
Srinivasa Rao
 
3a data link layer
kavish dani
 
go back n protocol
shivani monga
 
Different protocols for data communication networks
Nt Arvind
 
stop and wait _
SwatiHans10
 
Data Link Layer_Data Communications&Computer Neworks.pptx
AllankiSanyasiRao
 
advances in computer networks Notes M.tech
1JT19IS042SandhyaH
 
14-Error Detection Techniques-22-01-2025.pdf
abhimanyuyadav2022
 
Transport layer
arvind pandey
 
Ch05_OSI_Reference_Model - Compressed.pdf
mengeshasefa835
 
Ad

Recently uploaded (20)

PPTX
Mrs Mhondiwa Introduction to Algebra class
sabinaschimanga
 
PPTX
Presentation: Climate Citizenship Digital Education
Karl Donert
 
PDF
A guide to responding to Section C essay tasks for the VCE English Language E...
jpinnuck
 
PPTX
ARAL-Guidelines-Learning-Resources_v3.pdf.pptx
canetevenus07
 
PPTX
How to Consolidate Subscription Billing in Odoo 18 Sales
Celine George
 
PDF
Right to Information.pdf by Sapna Maurya XI D
Directorate of Education Delhi
 
PPTX
DIARRHOEA & DEHYDRATION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PPTX
Accounting Skills Paper-I, Preparation of Vouchers
Dr. Sushil Bansode
 
PDF
Stepwise procedure (Manually Submitted & Un Attended) Medical Devices Cases
MUHAMMAD SOHAIL
 
PPTX
10CLA Term 3 Week 4 Study Techniques.pptx
mansk2
 
PPTX
national medicinal plants board mpharm.pptx
SHAHEEN SHABBIR
 
PDF
07.15.2025 - Managing Your Members Using a Membership Portal.pdf
TechSoup
 
PDF
Tips for Writing the Research Title with Examples
Thelma Villaflores
 
PPTX
quizbeenutirtion-230726075512-0387d08e.pptx
domingoriahlyne
 
PDF
FULL DOCUMENT: Read the full Deloitte and Touche audit report on the National...
Kweku Zurek
 
PPTX
Modern analytical techniques used to characterize organic compounds. Birbhum ...
AyanHossain
 
PDF
Living Systems Unveiled: Simplified Life Processes for Exam Success
omaiyairshad
 
PPTX
ENGLISH LEARNING ACTIVITY SHE W5Q1.pptxY
CHERIEANNAPRILSULIT1
 
PDF
Exploring-the-Investigative-World-of-Science.pdf/8th class curiosity/1st chap...
Sandeep Swamy
 
PPTX
Various Psychological tests: challenges and contemporary trends in psychologi...
santoshmohalik1
 
Mrs Mhondiwa Introduction to Algebra class
sabinaschimanga
 
Presentation: Climate Citizenship Digital Education
Karl Donert
 
A guide to responding to Section C essay tasks for the VCE English Language E...
jpinnuck
 
ARAL-Guidelines-Learning-Resources_v3.pdf.pptx
canetevenus07
 
How to Consolidate Subscription Billing in Odoo 18 Sales
Celine George
 
Right to Information.pdf by Sapna Maurya XI D
Directorate of Education Delhi
 
DIARRHOEA & DEHYDRATION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
Accounting Skills Paper-I, Preparation of Vouchers
Dr. Sushil Bansode
 
Stepwise procedure (Manually Submitted & Un Attended) Medical Devices Cases
MUHAMMAD SOHAIL
 
10CLA Term 3 Week 4 Study Techniques.pptx
mansk2
 
national medicinal plants board mpharm.pptx
SHAHEEN SHABBIR
 
07.15.2025 - Managing Your Members Using a Membership Portal.pdf
TechSoup
 
Tips for Writing the Research Title with Examples
Thelma Villaflores
 
quizbeenutirtion-230726075512-0387d08e.pptx
domingoriahlyne
 
FULL DOCUMENT: Read the full Deloitte and Touche audit report on the National...
Kweku Zurek
 
Modern analytical techniques used to characterize organic compounds. Birbhum ...
AyanHossain
 
Living Systems Unveiled: Simplified Life Processes for Exam Success
omaiyairshad
 
ENGLISH LEARNING ACTIVITY SHE W5Q1.pptxY
CHERIEANNAPRILSULIT1
 
Exploring-the-Investigative-World-of-Science.pdf/8th class curiosity/1st chap...
Sandeep Swamy
 
Various Psychological tests: challenges and contemporary trends in psychologi...
santoshmohalik1
 

Datalink control(framing,protocols)

  • 2. BrAinY 4 Presented to:- Ma’am Sumbal and class Group Members ZUPASH SANA MARHABA Group Leader HiRA
  • 3. DATA LINK CONTROL:- Framing Error control &flow controls Protocols Noiseless channel Noisy channel Topics to be discussed:-
  • 6. FRAMING The data link layer needs to pack bits into frames. So that each frame is distinguishable from another. TYPES Fixed size framing Variable sized framing
  • 7. •Data to be carried are of 8 bits character from a coding system such as ASCII. •The header carries the source and destination addresses and other control information . •Trailer which carries error detection or error correction redundant bits, are also multiple of 8 bits. •To separate one fame from the next an 8bits frame is added at the beginning and at the end of a frame. Character oriented protocol:
  • 8. A frame in character oriented protocol
  • 11. Byte stuffing is the process of adding 1 extra byte whenever there is a flag or escape character in the text Note:
  • 12. 11.12 Bit stuffing is the process of adding one extra 0 whenever five consecutive 1s follow a 0 in the data, so that the receiver does not mistake the pattern 0111110 for a flag. Note
  • 13. Bit oriented protocol: the data section of a frame is a sequence of bits to be Interpreted by the upper layer as text, graphic, audio, video and so on. Figure shows a frame in a bit oriented protocol.
  • 14. Bit stuffing and unstuffing
  • 15.  ERROR CONTROL AND FLOW CONTROL  PROTOCOLS SANA AYUB
  • 16. Data link control  The most important responsibilities of the data link layer are flow control and error control. Collectively, these functions are known as data link control.  Data link control=flow +error control
  • 17. Flow control  Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment.  Receiving device has  Limited speed  Limited amount of memory.  So the sending device must not send frame at a rate faster than a receiving station can absorb them.
  • 18. Error control  Error control includes both error control and error detection.  Allows reciever to inform the sender if a frame is lost or damaged during transmission and coordinates the retransmission of those frames by the sender.  Whenever an error is detected,specified frames are retransmitted.
  • 20. Protocols  Now let us see how the data link layer can combine framing, flow control, and error control to achieve the delivery of data from one node to another. The protocols are normally implemented in software by using one of the common programming languages. To make our discussions language-free, we have written in pseudocode a version of each protocol that concentrates mostly on the procedure instead of delving into the details of language rules.
  • 22.  NOISELESS CHANNEL  simplest protocol  stop-and-wait protocol MARHABA WAZIR
  • 24. 1. NOISELESS CHANNEL lets assume that we have an ideal channel in which no frames are lost, corrupted or duplicated. We introduce two protocols for this type channel: a. Simplest protocol b. STOP-and-WAIT protocol
  • 25. The design of the simplest protocol with no flow or error control Figure shows an example of communication using this protocol
  • 26. a.Simplest protocol  It is very simple.  The sender sends a sequence of frames without even thinking about the receiver.  To send three frames, three events occur at the sender site and three events at the receiver site.
  • 27.  Note that the data frames are shown by tilted boxes; the height of the box defines the transmission time difference between the first bit and the last bit in the frame.
  • 28. Flow diagram for simplest protocol
  • 29. b.STOP and WAIT Protocol
  • 30. Stop-and-Wait Protocol  Simple tokens ofACK and flow control added
  • 32. Stop-and-Wait protocol  At most one packet in flight at any time.  Sender sends one packet.  Reciver sends acknowledgment packet when it receive data. THINKING CORNER What type of a link we need here? (Simplex, half duplex, full duplex)
  • 33. NOISY CHANNEL 1) Stop-and-waitARQ 2) Go-back-N ARQ 3) Selective repeatARQ HIRA ANWAR
  • 35. Noisy channel  Realistic • error can and will happen. • needs error control.  Mechanisms 1) Stop-and-waitARQ 2) Go-back-N ARQ 3) Selective repeatARQ
  • 37. Frames Packet Error Free Packet Transmitter Receiver Information Frame Control Frame Timer is set after each frame transmission
  • 38. 38 Stop-and-Wait ARQ(Automatic Repeat reQuest  Sender keeps a copy of sent frame until successful delivery is ensured.  Receiver responds with an ack when it successfully receives a frame.  Both data and ack frames must be numbered.  When sender does not receive an ack within certain time, it assumes frame is lost, then retransmits the same frame.
  • 39. 39 Stop-and-Wait ARQ 1. Normal operation 2. The frame is lost 3. The ACK is lost 4. The ACK is delayed
  • 40. 40 Flow Diagram: Normal Operation Time Sender Receiver Time S = 0 S = 1 R = 0 R = 1 R = 0 Deliver Deliver
  • 41. 41 Flow Diagram: Lost Frame Time Sender Receiver Time S = 0 R = 0 R = 1 R = 0 S = 1 Timeout Deliver Deliver
  • 42. 42 Flow Diagram: Delayed ACK Sender Receiver S = 0 R = 0 R = 1 R = 0 Timeout S = 1 S = 0 R = 1 Frame 0 expected; discard Deliver Timeout Deliver
  • 43.  THINKINGCORNER: Why Data frames & ACK frames need to be sequentially numbered?
  • 44. Need for Sequence Numbers (a) Frame 1 lost A B Frame 0 Frame 1 ACK Frame 1 ACK Time Time-out Frame 2 (b) ACK lost A B Frame 0 Frame 1 ACK Frame 1 ACK Time Time-out Frame 2 ACK
  • 45. 45 Drawbacks of Stop-and-Wait ARQ  After each frame sent the host must wait for an ACK.  inefficient use of bandwidth.  To improve efficiencyACK should be sent after multiple frames.  Alternatives: SlidingWindow protocols 1. Go-back-NARQ 2. Selective Repeat ARQ
  • 46. 46 Pipelining  One task begins before the other one ends.  increases efficiency in transmission.  There is no pipelining in Stop-and-Wait ARQ.  In sliding window protocol pipelining is implemented.
  • 47. Sliding window  The sliding window is an theoretical concept that defines the range of sequence numbers that is the concern of the sender and receiver.
  • 48. 2.GO BACK N ARQ (Automatic Repeat reQuest)
  • 49. 49 (sliding window protocol) Go-Back-N ARQ  Allows multiple frames to be sent before waiting for ACK.  These frames must be numbered differently.  Frame numbers are called Sequence numbers.  Frames must be received in the correct order.  If a frame is lost, the lost frame and all of the following frames must be retransmitted.
  • 51. 51 The name of Go-back-N: why?  Re-sending frame  when the frame is damaged the sender goes back and sends a set of frames starting from the last one ACKn’d  the number of retransmitted frames is N  Example:  The window size is 4.  A sender has sent frame 6 and the timer expires for frame 3 (frame 3 not ACKn’d).The sender goes back and re-sends the frames 3, 4, 5 and 6.
  • 52. Sequence numbers  Frame header contains m bits for sequence number.  That allows up to 2m different frame numbers.  We can repeat sequence numbers.
  • 53. 53 Sending Window  Sending more than one frame at once requires sender to buffer multiple frames.  Known as "sending window"  Any of these frames in the window can be lost.
  • 54. 54 "Sliding" Window  Once the first frames in the window is ACKed  ACKed frames are removed from the buffer  More frames are transmitted  Result:The window slides to the right
  • 55. 55 Receiving Window  Receiver expects one frame at a time
  • 56. 56 Go-back-N -Control variables-  S- holds the sequence number of the recently sent frame  SF – holds sequence number of the first frame in the window  SL – holds the sequence number of the last frame  R – sequence number of the frame expected to be received
  • 57. 57 Go-Back-N: Window Sizes  For m-bit sequence numbers.  Send window size: at most 2m-1.  Up to 2m-1 frames can be sent without ACK.  Receive window size: 1  Frames must be received in order.
  • 60. 60 Go-back-N  Inefficient  all out of order received packets are discarded  This is a problem in a noisy link  many frames must be retransmitted -> bandwidth consuming  Solution  re-send only the damaged frames  Selective RepeatARQ  avoid unnecessary retransmissions
  • 61. 61  Thinking Corner  Stop-and-Wait is a special case of Go-Back-N.  What is the send window size in Stop-and-Wait?
  • 63. 63 Selective Repeat ARQ  Go-Back-N always discards out-of-order frames  Losing one frame may result in retransmission of multiple frames  Very inefficient in noisy link  Selective Repeat ARQ allows frames to be received out of order  Therefore, receive window > 1
  • 64. 64 Send and Receive Windows  Sender and receiver share window space equally  For m-bit sequence numbers  Send window: up to 2m-1  Receive window: up to 2m-1
  • 67. 67 Negative ACK  Used by receiver to indicate missing frame
  • 69. 69 PIGGY BACKING (Bidirectional Transmission)  Data are transferred both ways  ACK are "piggybacked" with data frames