15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 1 Data Link Control Physical layer is only responsible for data transmission Data link.

Slides:



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

William Stallings Data and Computer Communications 7th Edition
ICSA341 Data Communications and Computer Networks 1 Data Link Control •General principles.
Data Link Control We want to minimize the amount of error correcting and detecting we need to do.
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.
Chapter 7 – Data Link Control Protocols
Data Link Control Protocols Data link control protocol Provides a layer of control between systems on a transmission medium referred to as data link. DLC.
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
Data Link Control ผศ. ดร. อนันต์ ผลเพิ่ม
D ATA L INK L AYER By Dr. Nawaporn Wisitpongphan.
Data and Computer Communications Eighth & Ninth Edition by William Stallings Chapter 7 – Data Link Control Protocols.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Control and Protocols.
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.
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.
Computer Networks Module 3: Data Link Layer (Framing) Dr. Vikram Shete St. Francis Institute of Technology.
Chapter 11 Data Link Control
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.
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.
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.
Telecommunications & Networking Lesson 3. ISO Open System Interconnect (OSI) Application Presentation Session Transport Network Data Link Physical Application.
CSCI 465 D ata Communications and Networks Lecture 11 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Data and Computer Communications Data Link Control 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.
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.
PROTOCOL BASICS. 2 Introduction In chapter 3: Circuits and techniques can be employed to transmit a frame of information between 2 DTEs Error detection.
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.
Data Link Layer - 3 Dr. Sanjay P. Ahuja, Ph.D.
Part III Datalink Layer 10.
UNIT 4 Data Link Control Line Discipline Flow Control Error Control
Chap. 4 Data link layer 2.
Instructor Mazhar Hussain
CIS 321 Data Communications & Networking
Flow Control.
Data Link Layer: Data Link Control
Chapter 10 Data Link Control
Flow and Error Control.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
DATA COMMUNICATION Lecture-38.
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:

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 1 Data Link Control Physical layer is only responsible for data transmission Data link control is responsible for converting transmission to communication –Line Discipline: Who should send now? –Flow Control: How much data may be sent? –Error Control: How should the errors be detected / corrected?

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 2 Line Discipline Determine the direction of communication Make sure that receiver is ready to accept or signal the sender to start Two ways: –Enquiry / Acknowledgment (ENQ/ACK) Dedicated line between hosts –Poll / Select Multipoint connections

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 3 ENQ/ACK Dedicated line between hosts, no problem of addressing Coordinates which device may start transmission, and if the receiver is ready and enabled If both hosts have equal ranks, either can initiate the process Otherwise, only higher-ranked host is allowed to start the transmission request Can be run in either half-duplex or full-duplex modes

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 4 ENQ/ACK Establishment: Host B responds either with ACK or NAK Host A tries to send ENQ three times before concluding that Host B is down Host AHost B ENQ ACK Data ACK Data ACK EOT … Establishment Data Transfer Termination

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 5 Poll / Select Multipoint connections One primary and multiple secondary hosts Communication between secondary devices go over the primary Select mode is used when primary has something to send to a secondary (downstream) Poll mode is used to solicit transmissions from a secondary to the primary (upstream) Address must be contained in all packets

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 6 Poll / Select Select mode SEL packet contains address of B B can response either by ACK or NAK Primary sends one or more data packets, which are ACKed by B PrimarySec. A SEL ACK Data ACK … Sec. B Data ACK

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 7 Poll / Select Poll mode Poll packet contains address of recipient If the intended secondary has no data to send, replies with NAK Data is ACKed by the primary How to terminate? PrimarySec. A Poll NAK Poll Data Sec. B ACK

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 8 Flow Control Restrict the amount of data to send before waiting for acknowledgment Controls the flow of the data as not to overwhelm the receiver Categories: –Stop-and-Wait Wait for an ACK before sending the next frame –Continous (Sliding Window) Can send several windows before requiring an ACK

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 9 Stop-and-Wait Send frame, then wait until you get ACK back Advantage: Simplicity Disadvantage: Inefficiency – l-bit frame, b bits/sec transmission speed, R seconds roundtrip time, infinitely short ACK –Utilization = l / (l + bR) –Not suited for high bandwidth-delay product lines

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 10 Sliding Window Send multiple frames before waiting for ACK Several frames can be in transit at a time Sender window vs. receiver window Frames can be ACKed without waiting for the receiver window to fill up Frames may be sent as long as there are unsent packets in the sender window

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 11 Sliding Window Sliding window scheme uses modulo-n arithmetic The addresses range between 0 and n-1 The size of the window is n-1 to prevent ambiguity in ACKs, which contains sequence number of next frame expected –Assume window size is n-1 –Sender can sends frames 0 to n-2 to start –Receiver ACKs frame 0 –Does it mean that it is ready for the next frames?

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 12 Sliding Window Sender window: –Shrink from left as frames are sent –Expand from right as you receive ACKs Receiver window: –Shrink from left as frames are received –Expand from right as ACKs are sent

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 13 Error Control Error control in data link layer is based on retransmissions (backward Error Control) Any time an error is detected, a NAK is returned to sender Automatic Repeat Request (ARQ) –Retransmission in case of damaged frame, lost frame, and lost ACK Stop-and-Wait ARQ Sliding Window ARQ –Go-Back-n –Selective Repeat

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 14 Stop-and-Wait ARQ Number frames as 0 and 1 alternately Keep a copy of the last sent frame Receiver ACKs the receipt of frame 0 by sending ACK 1 (waiting for frame 1) If NAK is received, resend the last frame (no numbering necessary) –Takes care of damaged data frames Start a timer for every frame sent If it expires before an ACK is received, resend the frame –Takes care of lost data frame and lost ACKs / NAKs –Receiver discards duplicate frames in case ACK is lost

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 15 Sliding Window ARQ Number frames modulo n Keep a copy of all unACKed frames Single ACK for multiple frames –If last ACK was for 2 (waiting for 3) and new ACK is for 6, frames 3, 4, 5, and 6 are ACKed Timers are used to signal retransmissions Response to NAKs and expiring timers determine the style of ARQ –Go-Back-n –Selective Repeat

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 16 Go-Back-n ARQ All frames after damaged or lost frame are discarded Damaged Frames: –Say, frames 0-5 are sent and all but frame # 3 is correctly received –Receiver sends NAK 3 and discards subsequent frames –This signals to sender that frames 0, 1, and 2 are correctly received and frame 3 is damaged –Sender retransmits frames 3, 4, and 5 –Same procedure for lost data frames

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 17 Go-Back-n ARQ Host AHost B Data 0 NAK 3 Data 1 Data 2 Data 3 Data 4 Data 5 Error, discard Data 3 Data 4 Data 5 Discard Window size 7 Error in data frame 3

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 18 Go-Back-n ARQ Lost ACK: –When sender reaches window capacity, it starts a timer –If timer expires, it resends all outstanding (unACKed) frames –The receiver discards possible duplicate frames and sends another ACK

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 19 Go-Back-n ARQ Host AHost B Data 0 ACK 3 Data 1 Data 2 Data 0 Data 1 Data 2 Lost Window Size 3 Lost ACK case Timer expires

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 20 Selective Repeat ARQ Only damaged and lost frames are retransmitted ACK numbers refer to the last correctly received frame, not next frame expected! If go-back-n window size is n-1, SR widow size must be at most n/2 (why?) Damaged Frames: –After receiving a damaged frame, receiver sends a NAK and continues accepting other frames –Sender only retransmits the missing frame

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 21 Selective Repeat ARQ Host AHost B Data 0 NAK 3 Data 1 Data 2 Data 3 Data 4 Data 5 Error, discard Data 3 Window size 7 Error in data frame 3 Data 6

15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 22 Selective Repeat ARQ Lost Data Frames: –Out-of-sequence delivery is permitted, but out-of-sequence ACK is not –When a lost frame is detected, NAK is sent –If last frame is lost, then receiver does nothing Lost ACK: –Handled the same way as in go-back-n