EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.

Slides:



Advertisements
Similar presentations
William Stallings Data and Computer Communications 7th Edition
Advertisements

EIE325: Telecommunication TechnologiesMaciej J. Ogorza ł ek, PolyU, EIE Telecommunication Technologies Week 8 Flow Control Error Control.
William Stallings Data and Computer Communications 7th Edition
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 7 – Data Link Control Protocols.
Data and Computer Communications Updated: 2/9/2009.
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.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Data Link Control Slide 1 Data Link Control Chapter 7.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 7 – Data Link Control Protocols.
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Chapter 7 – Data Link Control Protocols
Coding and Error Control
Lecture 9-10: Error Detection and Correction Anders Västberg Slides are a selection from the slides from chapter 8 from:
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.
1 Data Link Layer Lesson 6 NETS2150/ Position of the data-link layer McGraw-Hill © The McGraw-Hill Companies, Inc., 2004.
EE 122: Error detection and reliable transmission Ion Stoica September 16, 2002.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
William Stallings Data and Computer Communications 7 th Edition Chapter 7 Data Link Control Protocols.
1 Comnet 2006 Communication Networks Recitation 8 ARQ Protocols & Performance.
1 K. Salah Module 4.0: Data Link Layer The Logical Link Control (LLC) sublayer –Framing –Flow Control –Error Control The Media Access Control (MAC) sublayer.
Chapter 9: Data Link Control Business Data Communications, 4e.
Semester EEE449 Computer Networks The Data Link Layer En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room.
Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection.
Spring 2003CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Error Control.
Semester Copyright USM EEE442 Computer Networks The Data Link / Network Layer Functions: Flow Control and Error Control En. Mohd Nazri Mahmud.
EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
18-Aug-154/598N: Computer Networks Overview Direct link networks –Error detection - Section 2.4 –Reliable transmission - Section 2.5.
Data and Computer Communications Eighth & Ninth Edition by William Stallings Chapter 7 – Data Link Control Protocols.
Data Link Control Protocols
Data Communications and Networking
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.
William Stallings Data and Computer Communications 7th Edition
Data and Computer Communications Ninth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data and Computer Communications, Ninth Edition.
Data and Computer Communications Tenth Edition by William Stallings Data and Computer Communications, Tenth Edition by William Stallings, (c) Pearson Education.
Chapter 3 THE DATA LINK LAYER
Lecture 6: Framing and Error Detection-Data Link Layer Functions
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.
Lecture 3-2: Coding and Error Control (Cont.) ECE
1 Chapter 8. Coding and Error Control Wen-Shyang Hwang KUAS EE.
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.
Spring 2001CS 5851 Outline Building Blocks Shannon’s Theorem Encoding 11. Physical Layer.
CIS : Data Link Control. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow Transmission.
1 FIT1005 Topic 6 - Data Link Layer Reference: Chapter 7 -Stallings.
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.
Chapter 9: Data Link Control Business Data Communications, 4e.
Data and Computer Communications Data Link Control Protocols.
William Stallings Data and Computer Communications Chapter 7 Data Link Control.
Data Link Control Protocols  need layer of logic above Physical  to manage exchange of data over a link frame synchronization frame synchronization flow.
Coding and Error Control
Chapter 3 The Data Link Layer.
MODULE I NETWORKING CONCEPTS.
Chapter 9: Data Link Control
William Stallings Data and Computer Communications 7th Edition
The Data Link Layer Supplementery Slides
Data Link Layer Flow Control.
Data link layer (LLC).
Chap. 4 Data link layer 2.
Instructor Mazhar Hussain
Chapter 14: Data Link Control
Point-to-Point Links Outline Encoding Framing Error Detection
Chapter 14: Data Link Control
William Stallings Data and Computer Communications
Chapter 9: Data Link Control
Presentation transcript:

EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving stations Requirements:  Frame Synchronization: Data are sent in blocks called frames. The beginning & end of each frame must be recognizable.  Flow Control: The sending station must not send frames at a rate faster the receiving station can absorb them.  Error Detection: There is no 100% reliable data transmission existing, bit errors should at least be detected.  Error Control: Bit errors introduced by the transmission system should be corrected.

EE 4272Spring, 2003 Flow Control Ensuring the sending entity does not overwhelm the receiving entity  Preventing buffer overflow Transmission time  Time taken to emit all bits into medium Propagation time  Time for a bit to traverse the link

EE 4272Spring, 2003 Model of Frame Transmission

EE 4272Spring, 2003 Stop and Wait Source transmits frame Destination receives frame and replies with acknowledgement Source waits for ACK before sending next frame Destination can stop flow by not send ACK SenderReceiver

EE 4272Spring, 2003 Stop and Wait Link Utilization Large block of data may be split into small frames  Limited buffer size  Errors detected sooner (when whole frame received)  On error, retransmission of smaller frames is needed Prevents one station occupying medium for long periods Stop and wait becomes inadequate

EE 4272Spring, 2003 Stop and Wait Link Utilization

EE 4272Spring, 2003 Sliding Windows Flow Control Allow multiple frames to be in transit Receiver has buffer W long Transmitter can send up to W frames without ACK Each frame is numbered ACK includes the number of next frame expected Sequence number bounded by size of field (k)  Frames are numbered modulo 2 k SenderReceiver T ime … … … W

EE 4272Spring, 2003 Sliding Window Diagram

EE 4272Spring, 2003 Example Sliding Window

EE 4272Spring, 2003 Sliding Window Enhancements Receiver can acknowledge frames without permitting further transmission (Receive Not Ready) Must send a normal acknowledge to resume If duplex, use piggybacking  If no data to send, use acknowledgement frame  If data but no acknowledgement to send, send last acknowledgement number again, or have ACK valid flag (TCP)

EE 4272Spring, 2003 Error Detection Additional bits added by transmitter for error detection code Parity Check  Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones -> even number of bit errors goes undetected  Two-dimensional parity: catches all 1-, 2-, and 3-bit errors, and most 4-bit errors

EE 4272Spring, 2003 Cyclic Redundancy Check Theoretical Foundation: a branch of mathematics called “finite fields” Add k bits of redundant data to an n-bit message –want k << n –e.g., k = 32 and n = 12,000 (1500 bytes) Represent n-bit message as n-1 degree polynomial –e.g., MSG= as M(x) = x 7 + x 4 + x 3 + x 1 Let k be the degree of some divisor polynomial –e.g., C(x) = x 3 + x 2 + 1

EE 4272Spring, 2003 CRC (cont) Transmit polynomial P(x) that is evenly divisible by C(x) –shift left k bits ( k is the degree of C(x) ), i.e., M(x)x k –subtract remainder of M(x)x k /C(x) from M(x)x k Receiver polynomial P(x) + E(x) –E(x) = 0 implies no errors Divide (P(x) + E(x)) by C(x); remainder zero if: –E(x) was zero (no error), or –E(x) is exactly divisible by C(x)

EE 4272Spring, 2003 Selecting C(x) It is possible to prove that the following types of errors can be detected by a C(x) with the stated properties:  All single-bit errors, as long as the x k and x 0 terms have non- zero coefficients.  All double-bit errors, as long as C(x) contains a factor with at least three terms  Any odd number of errors, as long as C(x) contains the factor (x + 1)  Any ‘burst’ error (i.e., sequence of consecutive error bits) for which the length of the burst is less than k bits.  Most burst errors of larger than k bits can also be detected

EE 4272Spring, 2003 Error Control at Data Link Layer Detection and correction of errors that occur in the trans. of frames  Lost frames: a frame fails to arrive the other side.  Damaged frames: some bits of the arrival frame are in error Error Control Ingredients  Error detection  Positive acknowledgment (ACK)  Retransmission after timeout  Negative acknowledgement and retransmission (NACK) Automatic Repeat Request (ARQ) : Three versions of ARQ standardized  Stop and wait ARQ  Go back N ARQ  Selective reject (selective retransmission) ARQ

EE 4272Spring, 2003 Stop and Wait Source transmits single frame Wait for ACK If received frame damaged, discard it  Transmitter has timeout  If no ACK within timeout, retransmit If ACK damaged,transmitter will not recognize it  Transmitter will retransmit  Receive gets two copies of frame ->  Use ACK0 and ACK1 Pros and Cons  Simple  Inefficient

EE 4272Spring, 2003 Go Back N ARQ Based on sliding window If no error, ACK as usual with next frame expected  Use window to control number of outstanding frames If error (damaged/lost), reply with NACK  Receiver discard that frame and all future incoming frames until error frame received correctly  Transmitter must go back and retransmit that frame and all subsequent frames

EE 4272Spring, 2003 Go Back N - Damaged Frame Receiver detects error in frame i Receiver sends rejection-i (REJ) Transmitter gets rejection- i (REJ) Transmitter retransmits frame i and all subsequent F1 RR2 F2 REJ2 F3 F4 F2 F3 F4

EE 4272Spring, 2003 Go Back N – Lost Frame (1) Frame i lost Transmitter sends i+1 Receiver gets frame i+1 out of sequence Receiver send reject i Transmitter goes back to frame i and retransmits

EE 4272Spring, 2003 Go Back N – Lost Frame (2) Frame i lost and no additional frame sent Receiver gets nothing and returns neither acknowledgement (ACK) nor rejection (REJ) Transmitter times out and sends acknowledgement frame with P bit set to 1 Receiver interprets this as command which it acknowledges with the number of the next frame it expects (frame i ) – by sending RR Transmitter then retransmits frame i F1 RR2 F2 RR3 F3 RR (P bit=1) RR3 timeout F3 F4

EE 4272Spring, 2003 Go Back N – Damaged/lost Acknowledgement (RR) Receiver gets frame i and send RR (i+1) which is lost Acknowledgements are cumulative, so next acknowledgement (i+n) may arrive before transmitter times out on frame i If transmitter times out, it sends acknowledgement with P bit set as before ( Lost Frame (2) ) This can be repeated a number of times before a reset procedure is initiated

EE 4272Spring, 2003 Selective Reject ARQ Also called selective retransmission Only rejected frames are retransmitted Subsequent frames are accepted by the receiver and buffered Pros: minimizes retransmission -> more efficient Cons:  Receiver must maintain large enough buffer to save post- SREJ frames until the frame in error is retransmitted  More complex logic in transmitter: be able to send out a frame out of sequence.

EE 4272Spring, 2003 Selective Reject - Diagram

EE 4272Spring, 2003 Maximum Seq # and Maximum Window Size Note: in real world, most of the transmissions are full-duplex, therefore, temporarily delaying outgoing ACK so that they can be hooked onto the next outgoing data frame -> Piggybacking Maximum Seq #: S =2 m Maximum Window Size: W s  Without error or “out of order”, Sliding Window Flow Control: W s = 2 m (textbook error on P199, P211)  Go-Back-N ARQ: W s = 2 m -1 (textbook error on P211)  Selective Repeat ARQ: W s = 2 m-1 Reading Assignment: P of Leon-Garcia; Textbook: relevant pages; P of Tanenbaum;

EE 4272Spring, 2003 Maximum Window Size in Go-Back-N ARQ F0 F1 F2 F3 F4 F5 F6 F7 RR0 F0 F1 F2 F3 F4 F5 F6 F7 RR0 F0 F1 F2 F3 F4 F5 F6 F7 RR0 F0 F1 F2 F3 F4 F5 F6 F7 RR0 F0 F1 F2 F3 F4 F5 F6 F7 RR7 F0 F1 F2 F3 F4 F5 F0 F1 F2 F3 F4 F5 F6 F7 RR7 F0 F1 F2 F3 F4 F5 RR7 RR6