5-1 Data Link Layer l Objective: to achieve reliable and efficient communication between 2 adjacent machines l Data link layer design issues n services.

Slides:



Advertisements
Similar presentations
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 1 Chapter 3 The Data Link Layer user A user B reliable transmission over unreliable physical link.
Advertisements

Computer Interfacing and Protocols
Introduction to Information Technologies
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
1 Lecture #12: Data Link Layer. Error Control. C o n t e n t s l Services Provided by DLL l DLL data structures l Error Control Mechanisms –Error correcting.
Transmission Errors Error Detection and Correction
Error Detection and Correction
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
CSC 3352 Computer Communications Chapter 3&41 The Link Layer Has 2 main Components The Data Link Layer Medium Access Control (MAC) Examples:SLIP, PPP,
PART III DATA LINK LAYER. Position of the Data-Link Layer.
The Data Link Layer Chapter 3. Position of the data-link layer.
The OSI Reference Model
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 11 Introduction to Computer Networks.
Error detection and correction
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
7/2/2015Errors1 Transmission errors are a way of life. In the digital world an error means that a bit value is flipped. An error can be isolated to a single.
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Transmission Errors Error Detection and Correction
Data link layer: services
CSE331: Introduction to Networks and Security Lecture 3 Fall 2002.
Data and Computer Communications. The Data Link Layer.
Data Link Layer - 1 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
CS3502: Data and Computer Networks DATA LINK LAYER - 1.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
جلسه هشتم شبکه های کامپیوتری به نــــــــــــام خدا.
Lecture 6: Framing and Error Detection-Data Link Layer Functions
Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent.
Data Link Layer. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Data Link Layer : Services, Framing, Error Detection and Correction2.
The Data Link Layer Goal –As reliable as possible, efficient communication Point-to-Point –single connection –bits arrive in order sent Not necessarily.
The Data Link Layer. Functions of the Data Link Layer Provide service interface to the network layer Dealing with transmission errors Error detection.
Chapter 3 The Data Link Layer (60 % practical part)
Data and Computer Communications Chapter 6 – Digital Data Communications Techniques.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
ECE453 – Introduction to Computer Networks Lecture 4 – Data Link Layer (I)
Layer Two Data Link Layer Collects bits from layer 1 and organizes into frames Passes bits that make up frames to layer 1 for transmission Concerned with.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
COMPUTER NETWORKS Ms. Mrinmoyee Mukherjee Assistant Professor St. Francis Institute of Technology, Mount Poinsur, S.V.P Road, Borivli (west), Mumbai
Computer Networks Lecture 2: Data Link Based on slides from D. Choffnes Northeastern U. and P. Gill from StonyBrook University Revised Autumn 2015 by S.
1 © Unitec New Zealand CRC calculation and Hammings code.
Error Detection.
Transmission Errors Error Detection and Correction.
Network Layer4-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Error Correction/Detection.
ERROR DETECTION AND CORRECTION Chapter 8 Data Communications & Networking ERROR DETECTION AND CORRECTION Chapter 8 First Semester 2007/2008.
1 University of Calgary CS 441 Part 3 The Data Link Layer 3.1 Framing & Error Control 3.2 Error & Flow Control.
Coding and Error Control
Lecture 4 Error Detecting and Correcting Techniques Dr. Ghalib A. Shah
CS4470 Computer Networking Protocols
Simple Parity Check The simplest form of error detection is the parity check used with ASCII codes, originally on asynchronous modem links Each 7 bit ASCII.
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
ERROR DETECTION AND CORRECTION
Data Link Layer.
Part III. Data Link Layer
CIS 321 Data Communications & Networking
Data Link Layer What does it do?
Part III Datalink Layer 10.
CS412 Introduction to Computer Networking & Telecommunication
EEC-484/584 Computer Networks
Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad.
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
EEC-484/584 Computer Networks
Transmission Errors Error Detection and Correction
EECS 122: EE122: Error Detection and Reliable Transmission
Data Link Layer. Position of the data-link layer.
Presentation transcript:

5-1 Data Link Layer l Objective: to achieve reliable and efficient communication between 2 adjacent machines l Data link layer design issues n services provided to the network layer –unacknowledged connectionless service –acknowledged connectionless service –acknowledged connection-oriented service l call set-up l transmission l call release

5-2 Data Link Layer (cont’d) l Framing n character count –use a field in the header to indicate the number of characters in the frame –e.g –unreliable and rarely used n starting & ending characters, with character stuffing –STX and ETX are used for frame synchronization –DLE and DLE insertion are used for data transparency

5-3 Data Link Layer (cont’d) l Framing n starting & ending characters/flags, with bit stuffing – as flag byte (flag pattern) for frame and character sync. (for beginning and end) –zero bit insertion (bit stuffing) to achieve data transparency -- to insert a 0 after 5 contiguous 1’s –e.g. original data data sent data stored n physical layer (bit) encoding violation n hybrid methods (char. count with one of the others)

5-4 Data Link Layer (cont’d) l Error control n error detection n ACK’s and NACK’s n time-out mechanism n sequence numbers l Flow control n for speed mismatch (sender faster than receiver), finite receiver buffer or occasional unavailability of the receiver n feedback mechanism is typically required

5-5 Data Link Layer (cont’d) l Error detection and correction n causes of errors n random vs. bursty errors n error-correcting codes vs. error-detecting codes l Error-correcting codes n codeword (m data-bits + r check bits; let n=m+r) n Hamming distance (H.D.) between 2 codewords n Hamming distance of the complete code: the min. Hamming distance between any 2 distinct codewords

5-6 Data Link Layer (cont’d) l Error-correcting codes (cont’d) n to detect d errors required a distance d+1 code (e.g. d =1 for parity check where H.D.=2) n to correct d errors requires a distance 2d +1 code e.g n a lower bound on r to correct any single-bit error: Each of the 2 m legal messages has n illegal codewords at a distance of 1 from it. Then 2 m (n+1)  2 n, and 2 m (m+r+1)  2 m+r. Consequently, m+r+1  2 r.

5-7 Data Link Layer (cont’d) l Error-correcting codes (cont’d) n Hamming code (corrects only single-bit errors) e.g. m = 7. Then 7 + r + 1  2 r, and consequently r  4. Consider an ASCII code , where even parity is adopted. Then, arrange the data and error-correcting bits as follows X X 1 X X r 1 r 2 m 1 r 3 m 2 m 3 m 4 r 4 m 5 m 6 m 7

5-8 Data Link Layer (cont’d) l Error-correcting codes (cont’d) n Hamming code (cont’d) (position) r 1 r 2 r 3 r 4 (check bits) (3) m (5) m (6) m (7) m (9) m (10) m (11) m Consequently, r 1 = 0, r 2 = 0, r 3 = 1 and r 4 = 0.

5-9 Data Link Layer (cont’d) l Error-correcting codes (cont’d) n Hamming code (cont’d) –to correct at most k consecutive bit errors n k order of transmission If each row contains at most 1 bit error, then the error(s) can be corrected.

5-10 Data Link Layer (cont’d) l Error-detecting codes n parity check n block sum check n cyclic redundancy code (CRC) –using methods based upon polynomial codes which is more efficient to detect error bursts l a set of check digits is generated and appended to the end of each frame to be transmitted l the receiver performs a similar computation on the message and the check bits l if an error is found, then claim error(s); otherwise, claim correctness (true with a high probability)

5-11 Data Link Layer (cont’d) l Error-detecting codes (cont’d) n cyclic redundancy code (cont’d) –theory behind M(x) = an m-bit number (message) G(x) = an (r+1)-bit number (generator/divisor) R(x) = an r-bit number (remainder based on modulo-2 arithmetic) Q(x) = quotient Property: If M(x)*x r /G(x) = Q(x) + R(x)/G(x), then [M(x)*x r + R(x)]/G(x) = Q(x). Proof: [M(x)*x r + R(x)]/G(x) = Q(x) + R(x)/G(x) + R(x)/G(x) = Q(x)

5-12 Data Link Layer (cont’d) l Error-detecting codes (cont’d) n cyclic redundancy code (cont’d) –algorithm l sender n append r zeros to M(x) (M(x) is multiplied by x r ) n divide M(x)*x r (using modulo-2 arithmetic/bit-wise XOR) by G(x) to calculate R(x) n append R(x) to M(x) and transmit l receiver n divide the received info. (M(x)*x r +R(x)) by G(x) n if the remainder is 0, OK; otherwise, report error(s)

5-13 Data Link Layer (cont’d) l Error-detecting codes (cont’d) n cyclic redundancy code (cont’d) –example (Fig. 3-7, p. 189)

5-14 Data Link Layer (cont’d) l Error-detecting codes (cont’d) n cyclic redundancy code (cont’d) –G(x) of K bits should detect l all single-bit errors l all double-bit errors l all odd number of bit errors l all error bursts with length < K l most error bursts with length  K –example CRC l CRC-16 l CRC-CCITT l CRC-32