McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.

Slides:



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

11-1 FRAMING The data link layer needs to pack bits into frames, so that each frame is distinguishable from another. Our postal system practices a type.
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 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.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 7 – Data Link Control Protocols
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 13 Introduction to Computer Networks.
1 Reliable Data Transfer. 2 r Problem: Reliability  Want an abstraction of a reliable link even though packets can be corrupted or get lost r Solution:
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
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.
Data Link Layer We have now discussed the prevalent shared channel technologies  Ethernet/IEEE  Wireless LANs (802.11) We have now covered chapters.
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.
Chapter 3 THE DATA LINK LAYER
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.
THE DATA LINK LAYER Chapter 3 1. H YBRID M ODEL The hybrid reference model to be used in this book. 2.
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.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
Eighth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data Link Control Protocols need layer of logic above Physical to manage exchange.
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.
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.
1 FIT1005 Topic 6 - Data Link Layer Reference: Chapter 7 -Stallings.
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.
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.
1 Direct Link Networks: Reliable Transmission Sections 2.5.
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 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.
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.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer.
Data Link Layer.
PROTOCOL BASICS. 2 Introduction In chapter 3: Circuits and techniques can be employed to transmit a frame of information between 2 DTEs Error detection.
Computer Communication & Networks
2.10 Flow and Error Control Before that ...
Data Link Layer Flow Control.
Part III Datalink Layer 10.
Chapter 11 Data Link Control
Chapter 23 Introduction To Transport Layer
Chapter 11 Data Link Control
Instructor Mazhar Hussain
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
Presentation transcript:

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

McGraw-Hill©The McGraw-Hill Companies, Inc., Flow and 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 from the receiver If the channel is error-free: Stop-and-Wait flow control Sliding-Window flow control Error Control Refers to procedures to detect and correct errors Includes the following actions: 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)

McGraw-Hill©The McGraw-Hill Companies, Inc., Flow and Error Control Usually Error and flow control protocols are combined together to provide reliable data transfer service called data link control Stop-and-Wait ARQ Go-Back-N ARQ Selective repeat ARQ ARQ provide reliable data transfer service over unreliable networks ARQ ensure that transmitted data is delivered accurately to the destination despite errors that occur during transmission and satisfies the following: Error free Without duplicates Same order in which they are transmitted No loss

McGraw-Hill©The McGraw-Hill Companies, Inc., Stop-and-Wait ARQ Simplest flow and error control protocol Data frames and ACK frames are numbered alternately (0,1) When receiver sends ACK1: it acknowledges data frame 0 and is expecting data frame 1, ACK0 acknowledges data frame 1 and is expecting data frame 0 Sequence Numbers are incremented modulo = 0, and 0+1=1 Receiver has a counter (R ) which hold the number of the expected frame to be received. R is incremented by 1 modulo 2 when the expected frame is received. The sender keeps a counter (S ) which holds the number of the last transmitted frame. S is incremented by 1 modulo 2 when the acknowledgement of the last transmitted frame is received and the next frame is transmitted

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Normal operation Expected frame to be received Last transmitted frame

McGraw-Hill©The McGraw-Hill Companies, Inc., Stop-and-Wait ARQ – Cont’d If the receiver detects an error in the frame it discards it If the receiver receives an out-of-order frame ( frame 0 instead of frame 1 or vice versa), it knows that the expected frame is lost or damaged and discards the out- of-order frame and resend the previous ACK If the sender receives an ACK with a different number than the current value of S+1, it discards it The sending device keeps a copy of the last frame transmitted until it receives the right acknowledgment (ACK) for the frame The sender starts a timer when it sends a frame. If an ACK is not received within the allocated time, the sender assumes that the frame was lost or damaged and resends it

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Stop-and-Wait ARQ, lost frame

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Flow diagram for Example 11.3 Frame 1

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 In Stop-and-Wait ARQ, numbering frames prevents the retaining of duplicate frames. Note:

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Numbered acknowledgments are needed if an acknowledgment for frame is delayed and the next frame is lost. Note:

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Performance At any time, there is one frame, the one sent and waiting to be acknowledged. Works well when propagation time is much less than transmission time Once the sender finishes from transmitting the frame it will arrive in very short time to the receiver because propagation time is very small. The acknowledgement frame has very small transmission time so it will arrive quickly to the sender. As a result, the sender will not stay idle for long period of time. To improve efficiency, multiple frames should be in transition while sender is waiting for ACK. This is implemented in sliding window algorithms

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Bidirectional Transmission The previous protocol is unidirectional (data is transmitted in one direction) For bidirectional both nodes can send data To save bandwidth data frame to be sent and control information (ACK) of the received frame are combined into one frame (Piggybacking) If a node receive a frame and does not have data to be sent then an ACK frame is sent alone

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Piggybacking A is ready to receive frame 0

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Assume that, in a Stop-and-Wait ARQ system, the bandwidth of the line is 1 Mbps, and propagation time is 10 ms. What is the bandwidth-delay product? If the system data frames are 1000 bits in length Solution The bandwidth-delay product is (1 x 10 6 ) x (10 x ) = 10,000 bits What is the time needed for an ACK to arrive? (ignore the ACK frame transmission time)? =Frame Transmission time + 2*Propagation time = 1000/ x 10 x = sec How many frames can be transmitted during that time? = (time * bandwidth) / (frame size in bits) x (1 x 10 6 ) = bits / 1000 = 21 frames What is the Link Utilization if stop-and-wait ARQ is used? Link Utilization = (number of actually transmitted frame/ # frames that can be transmitted )*100 (1/21) x 100 = 5 % Example 11.4

McGraw-Hill©The McGraw-Hill Companies, Inc., Go-Back-N ARQ Setup – Sender sliding window Frames are numbered sequentially using m-bit in the frame header For m bits frame sequence numbers 0 – (2 m –1), repeated m=3  (0,1,2,3,4,5,6,7,0, 1,2,3,4,5,6,7,…) Sender can send multiple frames while waiting for ACK, but total number of unacknowledged frames should not exceed 2 m –1 which is called window Window is an imaginary placeholder that covers the frames sequence numbers which can be in transit The frames to the left of the window are already acknowledged and to the right can not be sent until window slides over them Frames inside the window are outstanding (have been sent but not yet acknowledged OR will be sent soon once received from upper-layer) Sender window will slide to frame number (i ) when (ACK i) is received.

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Send window for Go-Back-N ARQ

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Receive window for Go-Back-N ARQ Once a frame is received without error and in order, the window will slides over to the next placeholder Possibly acknowledged

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 The receive window is an abstract concept defining an imaginary box of size 1 with one single variable R n. The window slides when a correct frame has arrived; sliding occurs one slot at a time. Note

McGraw-Hill©The McGraw-Hill Companies, Inc., Go-Back-N ARQ Setup –Receiver sliding window The size of the receiver window is always 1 and points to the next expected frame number to arrive This means that frames should arrive in order If the expected frame is received without errors, the receiver window slides over the next sequence number. Operation The receiver sends a positive ACK if a frame has arrived without error and in order (with the expected sequence number ) Receiver does not have to acknowledge each individual frame received correctly and in order. Receiver can send cumulative ACK for several frames (ACK 5 acknowledges frames (0,1,2,3,4) and expecting frame 5) If the frame is damaged or out-of-order, the receiver discards it (and stay silent) and also discards all subsequent frames until it receives the one expected. In this case, no ACK will be transmitted If the sender timer expires before receiving an ACK, it will resend ALL frames beginning with the one expired until the last one sent (Go-Back-N).

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Go-Back-N ARQ, normal operation Sender window will slide to frame number (i ) when (ACK i) is received.

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Go-Back-N ARQ, lost frame

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Flow diagram for Example 11.7 Timeout for frame 1 expired

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 In Go-Back-N ARQ, the size of the send window must be less than 2 m ; the size of the receiver window is always 1. Note

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Window size for Go-Back-N ARQ

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Performance Better than Stop and wait because it keeps the sender busy while waiting for acknowledgement Does not allow error free but out of order frames to be accepted by the receiver This protocol can waste a lot of bandwidth if the error rate is high because it requests the sender to retransmit the frame in error and all the subsequently transmitted frames

McGraw-Hill©The McGraw-Hill Companies, Inc., Selective-Repeat ARQ Setup-Window size (for both sender and receiver) For m bit sequence number the maximum window size 2 m-1 Operation Sender in case of damaged or lost frame retransmits Those which are negatively acknowledged Those for which timer expires Receiver can accept out of order frames and buffer (store) them until the lost, damaged, or delayed frame arrives. Receiver does not acknowledge out of order frames but buffers them only If the receiver receives an out-of-order, error free frame, it will send a frame called Negative Acknowledge (NAK) with the number of the frame to be retransmitted only. NAK improves the performance because it requests retransmission of the lost frame before the corresponding sender timer expires

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Send window for Selective Repeat ARQ

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Receive window for Selective Repeat ARQ  Receiver window is shifted to position ( i ) only when receiver sends ACK i  ACK i can be sent if all frames up to ( i-1 ) have been received without error

McGraw-Hill©The McGraw-Hill Companies, Inc., Selective Repeat ARQ, lost frame ACK

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Performance More efficient than the other two protocols because it reduces number of retransmissions for noisy links The receiver and transmitter processing logic is more complex Receiver must be able to reinsert the retransmitted (lost, delayed, damaged) frame in the proper sequence after it arrives The sender should be able to send out of order frame when requested by the sender using NAK Needs more memory than Go-Back-N ARQ at the receiver side. The receiver memory is large if the window size is large

McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Pipelining Pipelining: beginning a task before the previous task has ended No pipelining in Stop-And-Wait ARQ Pipelining in Go-Back-N ARQ and Selective repeat ARQ (Several frames can be sent before we a sender receive any news about the previous frames) Pipelining increases the efficiency because it keeps the line busy instead of waiting