March 21, 2001 Recall we have talked about the Sliding Window Protocol for Flow Control Review this protocol A window of size I can contain at most I.

Slides:



Advertisements
Similar presentations
Sliding window protocols:  Window: subset of consecutive frames  only frames in window can be sent.
Advertisements

Assume that a file is transferred from a node A to a node B. The file has been fragmented in 5 frames. Frame 0 is corrupted, the ACK of frame 1 is corrupted,
William Stallings Data and Computer Communications 7th Edition
Data Link Control We want to minimize the amount of error correcting and detecting we need to do.
Chapter 11 Data Link Control
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.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 13 Introduction to the Transport.
Data Link Layer as a Reliable Data Transport Protocol Computer Networks Computer Networks Term B10.
Data Link Layer Review Advanced Computer Networks.
Networks: Data Link Layer1 Data Link Layer. Networks: Data Link Layer2 Data Link Layer Provides a well-defined service interface to the network layer.
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
Data Link Control Protocols
Data Link Control Protocols Dr. Muazzam A. Khan. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow.
Aegis School of Telecommunication Chapter 7 Data Link Control Protocols Telecom Systems I by Dr. M. G. Sharma, Phd.
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.
CSC 311 Chapter Eight FLOW CONTROL TECHNIQUES. CSC 311 Chapter Eight How do we manage the large amount of data on the network? How do we react to a damaged.
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.
Chapter 3: Channel Coding (part 3). Automatic repeat request (ARQ) protocols ▫Used in combination with error detection/correction ▫Block of data with.
Lecture Focus: Data Communications and Networking  Data Link Layer  Data Link Control Lecture 22 CSCS 311.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Principles of reliable data transfer 0.
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York University Section M Topics: 1.Flow Control and ARQ Protocols.
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.
Data Link Layer. Data link layer The communication between two machines that can directly communicate with each other. Basic property – If bit A is sent.
Part III. Data Link Layer Chapter 11. Data Link Control COMP 3270 Computer Networks Computing Science Thompson Rivers University.
1 The Data Link Layer A. S. Tanenbaum Computer Networks W. Stallings Data and Computer Communications Chapter 3.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer.
Data Link Layer.
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lec # 15.
Computer Communication & Networks
2.10 Flow and Error Control Before that ...
Reliable Transmission
Chapter 11 Data Link Control and Protocols
Data Link Layer Flow Control.
Data Link Layer - 3 Dr. Sanjay P. Ahuja, Ph.D.
Part III Datalink Layer 10.
Ch 16 Protocols and Layering
Net 221D : Computer Networks Fundamentals
Data Communications and Networking Pipelined reliable data transfer
CMPT 371 Data Communications and Networking
6 Transport Layer Computer Networks Tutun Juhana
Instructor Mazhar Hussain
Data Link Layer What does it do?
CIS 321 Data Communications & Networking
Flow Control.
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Data Link Layer: Data Link Control
Chapter 10 Data Link Control
Introduction to the Transport Layer
Flow and Error Control.
Data Link Layer as a Reliable Data Transport Protocol
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Transport Layer Our goals:
Data Link Layer (cont’d)
Sliding Window Protocol
Kendali Data Link dan Protokol
Chapter 11 Data Link Control
Data Link Layer (cont’d)
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
data link Control layer (DLC) – ARQ protocols
Presentation transcript:

March 21, 2001 Recall we have talked about the Sliding Window Protocol for Flow Control Review this protocol A window of size I can contain at most I frames that are to be transmitted The window expands in size as new frames are added to be transmitted, but the window will not grow to size larger than I See figure of sliding window on handout

Sliding Window Protocol All frames before the window must have been acknowledged Frames inside the window are either unsent or have been sent and have not been acknowledged (outstanding frames) Frames beyond the widow are not yet sent

Sliding Window Protocol – Cont If window size is equal to 1, then we have the Stop and Wait protocol If window size is greater than the number of frames, then we have the unrestricted protocol

Typical Frame Format Source address – address of station sending frame Destination address – address where frame is to be sent Frame number – The sequence number starting with 0 and numbered sequentially Ack – An integer value that corresponds to the frame being acknowledged. This avoids sending a separate acknowledgement. The Ack is piggybacked on the data frame Type of frame Data CRC

Two implementations of the Sliding Window Protocol Go-Back-n Selective Repeat

Go-Back-n Protocol Frame numbers are numbered between 0 and (2 to the power k) –1, where k = number of bits in frame number field Suppose k = 6 Frames are numbered 0, 1, …,63 and then repeat these numbers Receiver always expects to receive frames in order (modulo ) If one frame is received out of order, it ignores the frame and sends a NAK for the frame it expected It then waits for the correct frame to arrive

Go-Back-n Protocol – Cont If a frame arrives and it is damaged, the receiving station ignores it and sends a NAK for it The receiving station does not acknowledge each received station explicitely If a sending station receives an ACK for frame j and later receives one for frame k (k>j), it assumes all frames between j and k have been received correctly A station uses the piggyback approach whenever possible to acknowledge the most recently arrived frame

Go-Back-n Protocol – Cont The sending station buffers all the frames in the window in case it has to resend one or more Frames are removed from the buffer as they are acknowledged If a station does not receive an ACK over a period of time, it assumes something went wrong. It uses a frame timer, one for each frame, which is set when the data goes out The frame timer counts down and stops when an ACK is received for that frame If the frame timer expires then every frame in the window is resent (Explain this!) The name of the protocol comes from the fact that all n frames in the window are sent again

Go-Back-n Protocol – Cont What is the maximum window size? The window size can’t be larger than 2 to the power k, where k = # of bits of frame number field Why? Otherwise you could have two frames with the same number outstanding and the sender would have no way of knowing which frame is being acknowledged If the window size = 2 to the power k, the protocol can still fail See handout that shows failure in this case

Go-Back-n Protocol – Cont Works well especially over reliable channels When frames are rarely lost, the assumption that they arrive in the order they were sent is usually valid In the unusual case that a frame is lost, little time will be spent in resending all the outstanding frames As reliability decreases, the overhead of this approach increases

Selective Repeat Protocol Another implementation of the sliding window protocol Similar to Go-Back-n Frames are numbered using a k-bit field The sender has a window defining the maximum number of outstanding frames Piggyback ACKs are used whenever possible If a frame is acknowledged, the sending station assumes all prior ones have been received as well NAKs are sent for damaged frames and frames sent out of order Timer is used to resend frames that have not been acknowledged for a while

Differences in Selective Repeat Protocol Two sliding windows are defined, one for the sender and one for the receiver Thus each station has both a sending and a receiving window The sending window is the same as the Go-Back-n protocol window- it defines which frames may be outstanding The receiving window defines what frames can be received Frames in the receiving window are numbered consecutively The receiving station is not required to receive the frames in order A frame arriving out of order can be received as long as its number is in the receiving window Out of order frames are buffered until their predecessors arrive

Homework Questions Which type of Sliding Window Protocol does TCP use? Examine the code of the Go-Back-n protocol to answer the following questions: How many events are in the main while loop? What are these events? Where in the code does it indicate that the receiver B will send a second ACK should the first one be lost?