SlideShare a Scribd company logo
1 of 20
DATA COMMUNICATIONS &
NETWORKING
                LECTURE-
23

          Course Instructor : Sehrish Rafiq
          Department Of Computer Science
          University Of Peshawar
LECTURE OVERVIEW
 Flow Control
 Error Control

 Stop &Wait ARQ
DATA LINK CONTROL
 The most important responsibilities of the data
  link layer are flow control and error control.
 Collectively ,these functions are known as
  datalink control.
FLOW CONTROL
 Flow control coordinates the amount of data that
  can be sent before receiving acknowledgement
  and is one of the most important duties of the
  data link layer.
 In most cases flow control is a set of procedures
  that tells the sender how much data it can
  transmit before it must wait for an
  acknowledgement from the receiver.
 The flow of data must not be allowed to
  overwhelm the receiver.
WHY WE NEED FLOW CONTROL???
 Any receiving device has a limited speed at which
  it can process incoming data and a limited
  amount of memory in which to store incoming
  data.
 The receiving device must be able to inform the
  sending device before that limit is reached.
 And to request that the transmitting device send
  fewer frames or stop temporarily.
 Incoming data must be checked and processed
  before they can be used.
 The rate of such processing is slower than the
  rate of transmission.
ERROR CONTROL
 Error control is both error detection and error
  correction.
 It allows the receiver to inform the sender of any
  frames lost or damaged in transmission and
  coordinates the retransmission of those frames
  by the sender.
 In data link layer the term error control refers
  primarily to methods of error detection and
  retransmission.
 Any time an error is detected in an exchange
  specified frames are retransmitted.
 This process is called Automatic Repeat
  Request(ARQ).
FLOW AND ERROR CONTROL
           MECHANISMS
 Stop and Wait ARQ
 Go-Back N-ARQ

 Selective Repeat ARQ
STOP & WAIT ARQ
   The sending device keeps a copy of the last frame
    transmitted until it receives an
    acknowledgement for that frame.

   For identification purposes both data frames and
    acknowledgement (ACK) frames are numbered
    alternately 0 and 1.

   This numbering allows for identification of data
    frames in case duplicate transmission.
NORMAL OPERATION
STOP & WAIT ARQ CONT…
 The sender has a control variable which we call S
  that holds the number of the recently sent
  frame(0 or 1).
 The receiver has a control variable which we call
  R that holds the number of the next frame
  expected (0 or 1).
 The receiver sends only positive
  acknowledgements for frames received safe and
  sound.
 It is silent about the frames damaged or lost.

 The acknowledgement number always defines
  the number of the next expected frame.
DAMAGED OR LOST FRAME
   A damaged or lost frame is treated in the same
    manner by the receiver.

   If the receiver detects an error in the received
    frame, It simply discard the frame and sends no
    acknowledgement.

   If the receiver receives a frame that is out of
    order, It knows that the frame is lost.
DAMAGED OR LOST FRAME
              CONT…
   It discards the out of order received frame.

   The sender starts a timer when it sends a frame.

   If an acknowledgement is not received within an
    allotted time period, the sender assumes that the
    frame was lost or damaged and resends it.
LOST FRAME
LOST ACKNOWLEDGEMENT
 A lost or damaged acknowledgement is handled
  in the same way by the sender.
 If the sender receives a damaged
  acknowledgement ,it discards it.
 The waiting sender does not know if frame 1 has
  been received.
 When the timer for frame1 expires, the sender
  retransmits frame 1.
 The receiver has already received frame 1 and is
  expecting to receive frame 0(R=0),therefore it will
  silently discard the second copy of frame 1.
LOST ACKNOWLEDGEMENT
DELAYED ACKNOWLEDGEMENT
   An acknowledgement can be delayed at the
    receiver or by some problem with the link.
DELAYED ACKNOWLEDGEMENT
BIDIRECTIONAL TRANSMISSION
   The stop and wait mechanism we have discussed
    is unidirectional.

   However we have bidirectional transmission If
    the two parties have separate channels for full
    duplex transmission or share the same channel
    for half duplex transmission.

   In this case each party needs both S and R
    variables to track frames sent and expected.
PIGGYBACKING
   Piggybacking is a method to combine a data
    frame with an acknowledgement .
THANKS!!!

More Related Content

What's hot

New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocols
Nitesh Singh
 
Data Link Control Protocols
Data Link Control ProtocolsData Link Control Protocols
Data Link Control Protocols
TechiNerd
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
mekind
 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocol
ranakishi
 

What's hot (20)

Flow control and error control techniques in the data link layer protocol
Flow control and error control techniques in the data link layer protocolFlow control and error control techniques in the data link layer protocol
Flow control and error control techniques in the data link layer protocol
 
6 data linkcontrol
6  data linkcontrol6  data linkcontrol
6 data linkcontrol
 
Ch 11
Ch 11Ch 11
Ch 11
 
New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocols
 
Advance Repeat reQuest (ARQ)
Advance Repeat reQuest (ARQ)Advance Repeat reQuest (ARQ)
Advance Repeat reQuest (ARQ)
 
Data Link Control Protocols
Data Link Control ProtocolsData Link Control Protocols
Data Link Control Protocols
 
Data link control
Data link controlData link control
Data link control
 
Flow control
Flow controlFlow control
Flow control
 
Data link layer
Data link layerData link layer
Data link layer
 
Data link control & protocol concepts
Data link control & protocol conceptsData link control & protocol concepts
Data link control & protocol concepts
 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocol
 
Simplex stop and_wait_protocol
Simplex stop and_wait_protocolSimplex stop and_wait_protocol
Simplex stop and_wait_protocol
 
Error control
Error controlError control
Error control
 
Chapter3
Chapter3Chapter3
Chapter3
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
 
Data link layer tutorial
Data link layer tutorialData link layer tutorial
Data link layer tutorial
 
Unit 2 data link control
Unit 2 data link controlUnit 2 data link control
Unit 2 data link control
 
Go Back N Arq1
Go  Back N Arq1Go  Back N Arq1
Go Back N Arq1
 
Stop-and-Wait ARQ Protocol
Stop-and-Wait ARQ ProtocolStop-and-Wait ARQ Protocol
Stop-and-Wait ARQ Protocol
 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocol
 

Viewers also liked (20)

Lecture 19
Lecture 19Lecture 19
Lecture 19
 
Lecture 06
Lecture 06Lecture 06
Lecture 06
 
Lecture 14
Lecture 14Lecture 14
Lecture 14
 
Lecture 15
Lecture 15Lecture 15
Lecture 15
 
Lecture 22
Lecture 22Lecture 22
Lecture 22
 
Lecture 03
Lecture 03Lecture 03
Lecture 03
 
Lecture 18
Lecture 18Lecture 18
Lecture 18
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 
Lecture 07
Lecture 07Lecture 07
Lecture 07
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
Data Communications and Networking Lecture 16
Data Communications and Networking Lecture 16Data Communications and Networking Lecture 16
Data Communications and Networking Lecture 16
 
Lecture 21
Lecture 21Lecture 21
Lecture 21
 
Lecture 20
Lecture 20Lecture 20
Lecture 20
 
Lecture 17
Lecture 17Lecture 17
Lecture 17
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Data communication - Lecture-01
Data communication - Lecture-01 Data communication - Lecture-01
Data communication - Lecture-01
 
RTOS APPLICATIONS
RTOS  APPLICATIONSRTOS  APPLICATIONS
RTOS APPLICATIONS
 
Message Authentication: MAC, Hashes
Message Authentication: MAC, HashesMessage Authentication: MAC, Hashes
Message Authentication: MAC, Hashes
 
Data communications Class notes
Data communications  Class notesData communications  Class notes
Data communications Class notes
 

Similar to Lecture 23

session -7 - Sliding Window Protocol 1- N oisy Channels.ppt
session -7 - Sliding Window Protocol 1- N oisy Channels.pptsession -7 - Sliding Window Protocol 1- N oisy Channels.ppt
session -7 - Sliding Window Protocol 1- N oisy Channels.ppt
nanisrikar276711
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
tameemyousaf
 

Similar to Lecture 23 (20)

Presentation on dll
Presentation on dllPresentation on dll
Presentation on dll
 
session -7 - Sliding Window Protocol 1- N oisy Channels.ppt
session -7 - Sliding Window Protocol 1- N oisy Channels.pptsession -7 - Sliding Window Protocol 1- N oisy Channels.ppt
session -7 - Sliding Window Protocol 1- N oisy Channels.ppt
 
09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt
 
Flowctrl
FlowctrlFlowctrl
Flowctrl
 
07 data linkcontrol
07 data linkcontrol07 data linkcontrol
07 data linkcontrol
 
Unit IV_Flow.pptx
Unit IV_Flow.pptxUnit IV_Flow.pptx
Unit IV_Flow.pptx
 
PROTOCOL ICT.pptx
PROTOCOL ICT.pptxPROTOCOL ICT.pptx
PROTOCOL ICT.pptx
 
DATA LINK LAYER.pdf
DATA LINK LAYER.pdfDATA LINK LAYER.pdf
DATA LINK LAYER.pdf
 
Micro project on ARQ
Micro project on ARQMicro project on ARQ
Micro project on ARQ
 
stop and wait
stop and waitstop and wait
stop and wait
 
Flow control & error control
Flow control & error controlFlow control & error control
Flow control & error control
 
Different protocols for data communication networks
Different protocols for data communication networks Different protocols for data communication networks
Different protocols for data communication networks
 
8th lec flow and error control
8th lec   flow and error control8th lec   flow and error control
8th lec flow and error control
 
DATA LINK CONTROL.pptx
DATA LINK CONTROL.pptxDATA LINK CONTROL.pptx
DATA LINK CONTROL.pptx
 
computer network
computer networkcomputer network
computer network
 
Data link layer (Unit 2).pdf
Data link layer (Unit 2).pdfData link layer (Unit 2).pdf
Data link layer (Unit 2).pdf
 
07 data linkcontrol
07 data linkcontrol07 data linkcontrol
07 data linkcontrol
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
 
Flow control main
Flow control mainFlow control main
Flow control main
 
Flow Control (1).ppt
Flow Control (1).pptFlow Control (1).ppt
Flow Control (1).ppt
 

More from Sehrish Rafiq

More from Sehrish Rafiq (13)

Introduction to Computers Lecture # 14
Introduction to Computers Lecture # 14Introduction to Computers Lecture # 14
Introduction to Computers Lecture # 14
 
Introduction to Computers Lecture # 13
Introduction to Computers Lecture # 13Introduction to Computers Lecture # 13
Introduction to Computers Lecture # 13
 
Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12
 
Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11
 
Introduction to Computers Lecture # 10
Introduction to Computers Lecture # 10Introduction to Computers Lecture # 10
Introduction to Computers Lecture # 10
 
Introduction to Computers Lecture # 9
Introduction to Computers Lecture # 9Introduction to Computers Lecture # 9
Introduction to Computers Lecture # 9
 
Introduction to Computers Lecture # 8
Introduction to Computers Lecture # 8Introduction to Computers Lecture # 8
Introduction to Computers Lecture # 8
 
Introduction to Computers Lecture # 7
Introduction to Computers Lecture # 7Introduction to Computers Lecture # 7
Introduction to Computers Lecture # 7
 
Introduction to computers Lecture # 4
Introduction to computers Lecture # 4Introduction to computers Lecture # 4
Introduction to computers Lecture # 4
 
Introduction to Computers Lecture # 5
Introduction to Computers Lecture # 5Introduction to Computers Lecture # 5
Introduction to Computers Lecture # 5
 
Introduction to Computers Lecture # 3
Introduction to Computers Lecture # 3Introduction to Computers Lecture # 3
Introduction to Computers Lecture # 3
 
Introduction to Computers Lecture # 2
Introduction to Computers Lecture # 2Introduction to Computers Lecture # 2
Introduction to Computers Lecture # 2
 
Introduction to Computers Lecture # 1
Introduction to Computers Lecture # 1Introduction to Computers Lecture # 1
Introduction to Computers Lecture # 1
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Lecture 23

  • 1. DATA COMMUNICATIONS & NETWORKING LECTURE- 23 Course Instructor : Sehrish Rafiq Department Of Computer Science University Of Peshawar
  • 2. LECTURE OVERVIEW  Flow Control  Error Control  Stop &Wait ARQ
  • 3. DATA LINK CONTROL  The most important responsibilities of the data link layer are flow control and error control.  Collectively ,these functions are known as datalink control.
  • 4. FLOW CONTROL  Flow control coordinates the amount of data that can be sent before receiving acknowledgement and is one of the most important duties of the data link layer.  In most cases flow control is a set of procedures that tells the sender how much data it can transmit before it must wait for an acknowledgement from the receiver.  The flow of data must not be allowed to overwhelm the receiver.
  • 5. WHY WE NEED FLOW CONTROL???  Any receiving device has a limited speed at which it can process incoming data and a limited amount of memory in which to store incoming data.  The receiving device must be able to inform the sending device before that limit is reached.  And to request that the transmitting device send fewer frames or stop temporarily.  Incoming data must be checked and processed before they can be used.  The rate of such processing is slower than the rate of transmission.
  • 6. ERROR CONTROL  Error control is both error detection and error correction.  It allows the receiver to inform the sender of any frames lost or damaged in transmission and coordinates the retransmission of those frames by the sender.  In data link layer the term error control refers primarily to methods of error detection and retransmission.  Any time an error is detected in an exchange specified frames are retransmitted.  This process is called Automatic Repeat Request(ARQ).
  • 7. FLOW AND ERROR CONTROL MECHANISMS  Stop and Wait ARQ  Go-Back N-ARQ  Selective Repeat ARQ
  • 8. STOP & WAIT ARQ  The sending device keeps a copy of the last frame transmitted until it receives an acknowledgement for that frame.  For identification purposes both data frames and acknowledgement (ACK) frames are numbered alternately 0 and 1.  This numbering allows for identification of data frames in case duplicate transmission.
  • 10. STOP & WAIT ARQ CONT…  The sender has a control variable which we call S that holds the number of the recently sent frame(0 or 1).  The receiver has a control variable which we call R that holds the number of the next frame expected (0 or 1).  The receiver sends only positive acknowledgements for frames received safe and sound.  It is silent about the frames damaged or lost.  The acknowledgement number always defines the number of the next expected frame.
  • 11. DAMAGED OR LOST FRAME  A damaged or lost frame is treated in the same manner by the receiver.  If the receiver detects an error in the received frame, It simply discard the frame and sends no acknowledgement.  If the receiver receives a frame that is out of order, It knows that the frame is lost.
  • 12. DAMAGED OR LOST FRAME CONT…  It discards the out of order received frame.  The sender starts a timer when it sends a frame.  If an acknowledgement is not received within an allotted time period, the sender assumes that the frame was lost or damaged and resends it.
  • 14. LOST ACKNOWLEDGEMENT  A lost or damaged acknowledgement is handled in the same way by the sender.  If the sender receives a damaged acknowledgement ,it discards it.  The waiting sender does not know if frame 1 has been received.  When the timer for frame1 expires, the sender retransmits frame 1.  The receiver has already received frame 1 and is expecting to receive frame 0(R=0),therefore it will silently discard the second copy of frame 1.
  • 16. DELAYED ACKNOWLEDGEMENT  An acknowledgement can be delayed at the receiver or by some problem with the link.
  • 18. BIDIRECTIONAL TRANSMISSION  The stop and wait mechanism we have discussed is unidirectional.  However we have bidirectional transmission If the two parties have separate channels for full duplex transmission or share the same channel for half duplex transmission.  In this case each party needs both S and R variables to track frames sent and expected.
  • 19. PIGGYBACKING  Piggybacking is a method to combine a data frame with an acknowledgement .