The flow of data must not be allowed to overwhelm the receiver

Similar documents
ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

10.1 REVIEW QUESTIONS

Data Link Layer, Part 5 Sliding Window Protocols. Preface

Data Link Control Protocols

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

Analyzation of Automatic Repeat Request (ARQ) Protocols

DATA LINK LAYER UNIT 7.

The data link layer has a number of specific functions it can carry out. These functions include. Figure 2-1. Relationship between packets and frames.

The Transport Layer Reliability

Lecture 7: Flow Control"

Data Link Control. Surasak Sanguanpong Last updated: 11 July 2000

Chapter 11 Data Link Control 11.1

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science

Chapter 11 Data Link Control 11.1

Flow control: Ensuring the source sending frames does not overflow the receiver

I. INTRODUCTION. each station (i.e., computer, telephone, etc.) directly connected to all other stations

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

Lecture 7: Sliding Windows. CSE 123: Computer Networks Geoff Voelker (guest lecture)

Chapter 11 Data Link Control 11.1

CSE 123: Computer Networks Alex C. Snoeren. HW 1 due NOW!

ELEN Network Fundamentals Lecture 15

Reliable Transport : Fundamentals of Computer Networks Bill Nace

Data Link Control Protocols

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

UNIT IV -- TRANSPORT LAYER

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Data and Computer Communications

Communication Networks

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

The GBN sender must respond to three types of events:

Computer Networking. Reliable Transport. Reliable Transport. Principles of reliable data transfer. Reliable data transfer. Elements of Procedure

EECS 122, Lecture 19. Reliable Delivery. An Example. Improving over Stop & Wait. Picture of Go-back-n/Sliding Window. Send Window Maintenance

CHANNEL CODING 1. Introduction

William Stallings Data and Computer Communications. Chapter 7 Data Link Control

TCP: Flow and Error Control

TCP/IP-2. Transmission control protocol:

INTERNET ARCHITECTURE & PROTOCOLS

COMPUTER NETWORKS UNIT-3

4. Error correction and link control. Contents

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

IS370 Data Communications and Computer Networks. Chapter 5 : Transport Layer

Problem 7. Problem 8. Problem 9

TCP : Fundamentals of Computer Networks Bill Nace

TCP/IP Networking. Part 4: Network and Transport Layer Protocols

SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY COMPUTER NETWORKS UNIT - II DATA LINK LAYER

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

Communications Software. CSE 123b. CSE 123b. Spring Lecture 3: Reliable Communications. Stefan Savage. Some slides couresty David Wetherall

EE 122: Error detection and reliable transmission. Ion Stoica September 16, 2002

file:///c:/users/hpguo/dropbox/website/teaching/fall 2017/CS4470/H...

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24

NWEN 243. Networked Applications. Layer 4 TCP and UDP

2.4 Error Detection Bit errors in a frame will occur. How do we detect (and then. (or both) frames contains an error. This is inefficient (and not

Outline. EEC-484/584 Computer Networks. Data Link Layer Design Issues. Framing. Lecture 6. Wenbing Zhao Review.

Telecommunication Protocols Laboratory Course

The Data Link Layer Chapter 3

Transport Protocols and TCP: Review

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16

Data Link Layer (part 2)

Chapter Six. Errors, Error Detection, and Error Control. Data Communications and Computer Networks: A Business User s Approach Seventh Edition

Lecture 11 Overview. Last Lecture. This Lecture. Next Lecture. Medium Access Control. Flow and error control Source: Sections , 23.

Principles of Reliable Data Transfer

Department of Computer and IT Engineering University of Kurdistan. Data Communication Netwotks (Graduate level) Data Link Layer

Chapter 7: Data Link Control. CS420/520 Axel Krings Page 1

Chapter 7: Data Link Control. Data Link Control Protocols

Unit 2.

Data Link Layer. Goals of This Lecture. Engineering Questions. Outline of the Class

The Transport Layer. Part 1

CPE 448/548 Exam #1 (100 pts) February 14, Name Class: 448

Lecture 26: Data Link Layer

High Level View. EE 122: Error detection and reliable transmission. Overview. Error Detection

Outline. CS5984 Mobile Computing

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Basic Reliable Transport Protocols

Transport Layer (TCP/UDP)

STEVEN R. BAGLEY PACKETS

Data Communications. Automatic Repeat Request Medium Access Control

Transport Protocols & TCP TCP

Data link layer functions. 2 Computer Networks Data Communications. Framing (1) Framing (2) Parity Checking (1) Error Detection

Lecture 5. Homework 2 posted, due September 15. Reminder: Homework 1 due today. Questions? Thursday, September 8 CS 475 Networks - Lecture 5 1

Basic Protocols and Error Control Mechanisms

The Transport Layer: TCP & Reliable Data Transfer

Lecture 7: Flow & Media Access Control"

Request for Comments: 938 February 1985

Telecom Systems Chae Y. Lee. Contents. Flow Control Error Detection/Correction Link Control (Error Control) Link Performance (Utility)

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

Question 1 (6 points) Compare circuit-switching and packet-switching networks based on the following criteria:

C08a: Data Link Protocols

CONNECTION-ORIENTED & CONNECTIONLESS NETWORKS

Revision 6: Red text Incorporate comments from January 5, 2004 conference call. Minor wording changes.

L5: Building Direct Link Networks III. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

TYPES OF ERRORS. Data can be corrupted during transmission. Some applications require that errors be detected and corrected.

3. Data Link Layer 3-2

The Transmission Control Protocol (TCP)

User Datagram Protocol (UDP):

Jaringan Komputer. Data Link Layer. The Data Link Layer. Study the design principles

INF Data Communication Data Link Layer

Data Communication Networks Final


Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Transcription:

Data Link Layer: Flow Control and Error Control Lecture8

Flow Control Flow and Error 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 (ACK) from the receiver The flow of data must not be allowed to overwhelm the receiver The receiving device should be able to inform the sender before limits (processing speed limit and temporal storage limits) are reached and request that the sender sends fewer frames or stop temporarily.

The rate of processing is often slower than the rate of transmission. The receiver has a block of memory called buffer, reserved for storing incoming data until they are processed. Two method to the flow of data across communication link are Stop-and-wait and sliding window

Categories of flow control

Stop-and-Wait In Stop-and-Wait method of flow control, the sender waits for an acknowledgement (ACK) after every frame it sends. When an acknowledgement has been received it send the next frame. This process of alternately sending and waiting repeats until the sender transmits an end of transmission (EOT) frame.

Stop-and-Wait

Stop-And-Wait Frame types Data: Contain information to be sent ACK: Acknowledges receipt of data Rules: Source transmits Data frame Source waits for ACK frame before sending next Data frame Destination receives Data frame and replies with ACK frame if ready for more Destination can stop flow of data by not sending ACK frame

Stop-And-Wait..cont Advantage of Stop- and -Wait Simplicity: Each frame is checked and acknowledged before the next frame is sent Disadvantage of Stop-and-Wait Inefficiency: Stop-and-wait is slow. Each frame must travel all the way to the receiver and the acknowledgement must travel all the way back before the next frame can be sent

Sliding window In sliding window method, multiple frames are sent by sender at a time before needing an acknowledgment. Multiple frames sent by source are acknowledged by receiver using a single ACK frame.

Sliding Window Sliding window refers to an imaginary boxes that hold the frames on both sender and receiver side. It provides the upper limit on the number of frames that can be transmitted before requiring an acknowledgment. Frames may be acknowledged by receiver at any point even when window is not full on receiver side. Frames may be transmitted by source even when window is not yet full on sender side.

Sliding Window The windows have a specific size in which the frames are numbered modulo- n, which means they are numbered from 0 to n-l. For e.g. if n = 8, the frames are numbered 0, 1,2,3,4,5,6, 7, 0, 1,2,3,4,5,6, 7, 0, 1,... The size of window is n-1. For e.g. In this case it is 7. Therefore, a maximum of n-l frames may be sent before an acknowledgment.

When the receiver sends an ACK, it includes the number of next frame it expects to receive. For example, in order to acknowledge the group of frames ending in frame 4, the receiver sends an ACK containing the number 5. When sender sees an ACK with number 5, it comes to know that all the frames up to number 4 have been received. The window can hold n-1 frames at either side; therefore, a maximum of n-1 frames may be sent before an acknowledgement is required.

Example of Sliding Window

Error control When data-frame is transmitted, there is a probability that dataframe may be lost in the transit or it is received corrupted. In both cases, the receiver does not receive the correct data-frame and sender does not know anything about any loss. In such case, both sender and receiver are equipped with some protocols which helps them to detect transit errors such as loss of data-frame. Either the sender retransmits the data-frame or the receiver may request to resend the previous data-frame.

Error Control -Refers to procedures to detect and correct errors Requirement for error control mechanism: Error detection Positive Acknowledgement (ACK): if the frame arrived with no errors Negative Acknowledgement (NAK): if the frame arrived with errors Retransmissions after timeout: Frame is retransmitted after certain amount of time if no acknowledgement was received These actions are called Automatic Repeat Request (ARQ)

Error Control Automatic Repeat Request (ARQ) ARQ: anytime an error is detected in an exchange, a negative acknowledgement is returned (NAK) and the specified frame is retransmitted. ARQ s main function is the retransmission of damaged frames and lost frames including lost ACK and NAK where the loss is detected by the sender instead of the receiver. There are three types of techniques available which Data-link layer may deploy to control the errors by ARQ

Error Control

Stop-and-Wait ARQ In Stop-and-Wait ARQ, Stop-and-Wait is extended to include retransmission of frames in case of lost or damaged frames For retransmission to work four features are required: 1. The sending device keeps a copy of last frame transmitted until it receives acknowledgement of that frame. 2. For identification purpose, both data frame and ACK frames are numbered alternately 0 and 1. 3. If an error is discovered in a data frame, indicating that it had been corrupted in the transit, a NAK frame is returned. NAK is not numbered and it tells the sender to retransmit the last sent frame

Stop-and-Wait ARQ 4 The sending device is equipped with timer. If an expected acknowledgement is not received within an allotted time period, the sender assumes that the last data frame was lost in transit and sends again

Stop-and-Wait ARQ, damaged data frame

Stop-and-Wait ARQ, lost data frame

Stop-and-Wait ARQ, lost ACK frame

The following transition may occur in Stop-and-Wait ARQ: 1. The sender maintains a timeout counter. 2. When a frame is sent, the sender starts the timeout counter. 3. If acknowledgement of frame comes in time, the sender transmits the next frame in queue. 4. If acknowledgement does not come in time, the sender assumes that either the frame or its acknowledgement is lost in transit. Sender retransmits the frame and starts the timeout counter. 5. If a negative acknowledgement is received, the sender retransmits the frame.

Sliding Window ARQ To extend sliding window to cover retransmission damaged frames, three features are added to the basic control mechanism of lost or flow 1. The sending device keeps copies of all transmitted frames until they have been acknowledged. 2. Since sliding window is continuous transmission mechanism, ACK and NAK frames must be number for identification. 3. The sending device in sliding window ARQ is equipped with a timer to enable it to handle lost acknowledgment

Go-back-in "Go-back-N" Protocols When errors occur in a continuous ARQ protocol, the simplest solution is to repeat the frame in error and all subsequent frames, thus:

How it works In Go-Back-N ARQ method, both sender and receiver maintain a window. The sending-window size enables the sender to send multiple frames without receiving the acknowledgement of the previous ones. The receiving-window size enables the receiver to receive multiple frames and acknowledge them. The receiver keeps track of incoming frame s sequence number. When the sender sends all the frames in window, it checks up to what sequence number it has received positive acknowledgement. If all frames are positively acknowledged, the sender sends next set of frames. If sender finds that it has received NACK or has not receive any ACK for a particular frame, it retransmits all the frames after which it does not receive any positive ACK.

Go-back-n, damaged data frame

Go-back-in, lost data frame

Go-back-in, lost ACK

Selective-reject ARQ Selective Reject An alternative approach is to only repeat those frames received in error. This is more complicated and is rarely implemented, despite having the attraction of apparently greater efficiency. Problems with selective reject include: 1. Receiver must have storage to save post-nak frames until the erroneous frame is received, and logic to re-insert it in the correct sequence. 2. The sender must be able to send frames out of sequence. 3. The window size for a given size of sequence number is somewhat less than for go-back-n.

Selective-reject, damage data frame

Lost Frames

Lost Acknowledgment Lost ACK and NAK frames are treated by selective-reject ARQ just as they are by Go-back in ARQ. When the sending devices reaches either the capacity of its window or the end of transmission, it sets a timer. If no acknowledgement arrives in the time allotted, the sender retransmits all the frames that remain unacknowledged. In case the receiver recognize any duplications, it will discard them.