1 Flow&Error Control R. Supakorn. 2 Flow Control Flow control refers to a set of procedure used to restrict the amount of data that the sender can send.

Slides:



Advertisements
Similar presentations
Network Operations & administration CS 4592 Lecture 15 Instructor: Ibrahim Tariq.
Advertisements

Data Link Control We want to minimize the amount of error correcting and detecting we need to do.
Go-Back-N Improve Stop-and-Wait by not waiting!
Chapter 11 Data Link Control
Data and Computer Communications Updated: 2/9/2009.
Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.
Flow and Error Control. Flow Control Flow control coordinates the amount of data that can be sent before receiving acknowledgement It is one of the most.
11-5 NOISY CHANNELS Although the Stop-and-Wait Protocol gives us an idea of how to add flow control to its predecessor, noiseless channels are nonexistent.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 7 – Data Link Control Protocols.
ELEN 602 Lecture 5 Review of last lecture –Error Detection -- parity/CRC etc. Automatic Retransmission Request (ARQ) Reading: Chap
Chapter 9: Data Link Control Business Data Communications, 4e.
Lect11.ppt - 03/15/05 CDA 6505 Network Architecture and Client/Server Computing Lecture 11 Link-Level Flow and Error Control by Zornitza Genova Prodanoff.
Link-Level Flow and Error Control
15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 1 Data Link Control Physical layer is only responsible for data transmission Data link.
Data Link Control Protocols
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Control and Protocols.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control.
1 Transport Layer Lecture 10 Imran Ahmed University of Management & Technology.
1 Kyung Hee University Data Link Protocols. 2 Kyung Hee University 11 장 Data Link Control and Protocols 11.1 Flow and Error Control 11.2 Stop-and-Wait.
Error/Flow Control Modeling (ARQ Modeling). Modeling of Go Back N.
Computer Networks Module 3: Data Link Layer (Framing) Dr. Vikram Shete St. Francis Institute of Technology.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols.
Chapter 11 Data Link Control
Data Link Layer: Data Link Control : Data Communication and Computer Networks Asst. Prof. Chaiporn Jaikaeo, Ph.D.
Chapter 3: Channel Coding (part 3). Automatic repeat request (ARQ) protocols ▫Used in combination with error detection/correction ▫Block of data with.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CIS : Data Link Control. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow Transmission.
Lecture Focus: Data Communications and Networking  Data Link Layer  Data Link Control Lecture 22 CSCS 311.
11.1 Flow and Error Control Flow Control Error Control.
Data Link Layer Flow and Error Control. Flow Control Flow Control Flow Control Specifies the amount of data can be transmitted by sender before receiving.
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York University Section M Topics: 1.Flow Control and ARQ Protocols.
Chapter 11 Data Link Control.
CSCI 465 D ata Communications and Networks Lecture 11 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Part III. Data Link Layer Chapter 11. Data Link Control COMP 3270 Computer Networks Computing Science Thompson Rivers University.
Chapter 11 Data Link Control and Protocols Flow and Error Control Flow Control Error Control.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Data Link Layer Part II – Sliding Window Protocols.
1 The utopia protocol  Unrealistic assumptions: –processing time ignored –infinite buffer space available –simplex: data transmitted in one direction.
Data and Computer Communications Data Link Control Protocols.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Computer Networking Lecture 16 – Reliable Transport.
Chapter 9: Data Link Control Business Data Communications, 4e.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer.
Data and Computer Communications Data Link Control Protocols.
Data Link Layer.
1 Wireless Networks Lecture 5 Error Detecting and Correcting Techniques (Part II) Dr. Ghalib A. Shah.
Data Link Control Protocols  need layer of logic above Physical  to manage exchange of data over a link frame synchronization frame synchronization flow.
Computer Communication & Networks
2.10 Flow and Error Control Before that ...
Chapter 9: Data Link Control
Data Link Layer Flow Control.
Part III Datalink Layer 10.
UNIT 4 Data Link Control Line Discipline Flow Control Error Control
Chapter 11 Data Link Control
Instructor Mazhar Hussain
CIS 321 Data Communications & Networking
Flow Control.
Data Link Layer: Data Link Control
Flow and Error Control.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Chapter 11 Data Link Control
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
Chapter 9: Data Link Control
Presentation transcript:

1 Flow&Error Control R. Supakorn

2 Flow Control Flow control refers to a set of procedure used to restrict the amount of data that the sender can send before waiting for an acknowledgement

3

4 Stop and Wait

5 Sliding Window

6 Sender Sliding Window

7 Receiver Sliding Window

8 Sliding Window Example

9 Sender

10 Receiver

11

12 Stop-and-wait ARQ The simplest flow and error control mechanism Features –Sending device keeps the copy of the last frame transmitted –For identification purpose : Both data frames and acknowledgement frames are numbered alternately 0 and 1 –A data 0 frame is acknowledged by and ACK 1 frame

13 Stop-and-wait ARQ Features : lost/damaged frames –When receives a damaged frame, a receiver : Discards the frame Does not send an acknowledgement –When receives out of order frames Means lost frames Discards this frame

14 Stop-and-wait ARQ Features : control variables –A sender has a control variable called S Hold the number of recently sent frame (0 or 1) –A receiver has a variable called R Holds the number of next frame expected (0 or 1)

15 Stop-and-wait ARQ Features : a timer –The sender starts a timer when it sends a frame –If an acknowledgement is not received within the allotted time period, the sender : Assumes that the frame was lost Resends the frame

16 Stop-and-wait ARQ Features : an acknowledgement mechanism –The receiver Sends only positive acknowledgement for good frames Stays silent for damaged/lost frames –The acknowledgement number always defines the number of next expected frame

17 Stop-and-wait ARQ Operations –Normal operation –Lost or damaged frame –Lost acknowledgement –Delayed acknowledgement

18 Stop-and-wait ARQ Operations: normal operation time s= 0 s= 1 s= 0 R=0R=0 R=1R=1 Frame 0 Frame 1 ACK 1 ACK ReceiverSender

19 Stop-and-wait ARQ Operations: lost frame time s= 0 s= 1 s= 0 R=0R=0 R=1R=1 Frame 0 ReceiverSender ACK 0 Frame 1 lost R=1R=1 Frame 1 s= 1 ACK 1 Time-out R=0R=0

20 Stop-and-wait ARQ Operation : lost acknowledgement time s= 0 s= 1 s= 0 R=0R=0 R=1R=1 ReceiverSender ACK 1 Frame 0 R=0R=0 s= 1 Time-out Expecting frame 0, frame 1 is discarded Frame 1 ACK 0 Frame 1 ACK 1 ACK 0

21 Stop-and-wait ARQ Operation : delayed acknowledgement time s= 0 s= 1 R=0R=0 R=1R=1 ReceiverSender Frame 0 R=0R=0 s= 1 Frame 0 Frame 1 ACK 1 Time-out Expecting frame 1, frame 0 is discarded discarded ACK 0

22 Go-Back-N ARQ Overcomes inefficiency of Stop-and-Wait ARQ- sender continues sending enough frames to keep channel busy while waiting for ACKs A window of W s outstanding frames is allowed m-bit sequence numbers are used for both-frmaes and ACKs, and W s =2 m -1

23 Go-Back-N ARQ (cont.)

24 Sender Sliding Window All frames are stored in a buffer, outstanding frames are enclosed in window –Frames to the left of the window are already acknowledged and can be purged –Frames to the right of the window cannot be sent until the window slides over them –Whenever a new ACK arrives, the window slides to include new unsent frames –Once the window gets full (max# of outstanding frames is reached), entire window gets resent

25 Sender Sliding Window (cont.)

26 Receiver Sliding Window (cont.) The size of receiver window is always 1 –Receiver is always looking for a specific frame to arrive in a specific order –Any frame arriving out of order is discarded and needs to be resent

27 Go-Back-N with timeout Go-Back-N works correctly as long as the sender has unlimited supply of packets that need to be transmitted –But, in case when ACK packets arrive sporadically, there may not be Ws-1 subsequent transmissions => window will not be exhausted, retransmissions will not be triggered –This problem can be resolved by modifying Go-Back-N such that: Set a timer for each sent frame Resend all outstanding frames either when the window gets full or when the timer of first frame expires

28 Go-Back-N with timeout (cont.)

29 Lost frame in Go-Back-N with timeout

30 Sequence numbers and window size m bit allotted within a header for sequence numbers => 2 m possible sequence numbers –How long should the sender window be? –W > 2 m connot be accepted => ambiguous ACKs –W = 2 m can still cause some ambiguity –W = 2 m – 1 acceptable

31 Sequence numbers and window size

32 Selective Repeat ARQ Go-Back-N is NOT suitable for ‘noisy links’ –incase of a lost/damaged frame a whole window of frames need to be resent excessive retransmissions use up the bandwidth and slow down transmission Selective Repeat ARQ overcomes the limitationsof Go-Back- N by adding 2 new features (1)receiver window > 1 frame, so that out-of-order but error-free frames can be accepted (2)retransmission mechanism is modified –only individual frames are retransmitted Selective Repeat ARQ is used in TCP!!!

33 Selective Repeat ARQ (cont.)

34 Selective Repeat ARQ (cont.) Receiver: window advances whenever next in-order frame arrives out-of-order frames are accepted only if their sequence numbers satisfy R next < R frame < R next + W s -1 a negative ACK (NAK) with sequence number R next is sent whenever an out-of-sequence frame is observed

35 Selective Repeat ARQ (cont.) Sender: window advances whenever an ACK arrives if a timer expires, the corresponding frame is resent, and the timer is reset whenever a NAK arrives, R next frame is resent

36 Selective Repeat ARQ (cont.)

37 Window size – W S and W R m bits allotted within a header for sequence numbers => 2 m possible sequence numbers –how big should the windows be!? –W S and W R = 2 m -1 cannot be accepted due to possible ambiguity –W = 2 m /2 = 2 m-1 acceptable !!!

38 Window size – W S and W R (cont.)

39 HDLC General HDLC Frame Two types of control frames I (information) frames N(R) ack#,N(S)seq# S (supervisory) frames p/f = poll/final

40 HDLC control field SS=00 RR - Receiver Ready to accept more I-frames SS=01 REJ - Go-Back-N retransmission request for an I-frame SS=10 RNR - Receiver Not Ready to accept more I-frames SS=11 SREJ - Selective retransmission request for an I-frame

41 HDLC operation

42 HDLC operation (cont.)

43 HDLC operation (cont.)

44 HDLC operation (cont.)

45 HDLC operation (cont.)