Data Link Layer: Error Detection and Correction

Slides:



Advertisements
Similar presentations
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Advertisements

Introduction to Information Technologies
CSE 461: Error Detection and Correction. Next Topic  Error detection and correction  Focus: How do we detect and correct messages that are garbled during.
NETWORKING CONCEPTS. ERROR DETECTION Error occures when a bit is altered between transmission& reception ie. Binary 1 is transmitted but received is binary.
Error Detection and Correction
Transmission Errors Error Detection and Correction
Chapter 10 Error Detection and Correction
Error Detection and Correction
Fundamentals of Computer Networks ECE 478/578 Lecture #4: Error Detection and Correction Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
Error Detection and Correction
PART III DATA LINK LAYER. Position of the Data-Link Layer.
Transmission Errors1 Error Detection and Correction.
Error detection and correction
Error Detection and Correction
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
Error Detection and Correction Rizwan Rehman Centre for Computer Studies Dibrugarh University.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 PART III: DATA LINK LAYER ERROR DETECTION AND CORRECTION 7.1 Chapter 10.
Transmission Errors Error Detection and Correction
Copyright © NDSL, Chang Gung University. Permission required for reproduction or display. Chapter 10 Error Detection and Correction 長庚大學資訊工程學系 陳仁暉 副教授.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
British Computer Society
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 1 Communication Reliability Asst. Prof. Chaiporn Jaikaeo, Ph.D.
CIT 307 Online Data Communications Error Detection Module 11 Kevin Siminski, Instructor.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 10. Error Detection and Correction
Data Communications, Kwangwoon University10-1 Part 3 Data Link Layer Chapter 10 Error Detection and Correction Chapter 11 Data Link Control Chapter 12.
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)
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
Error Detection and Correction
Error Detection and Correction
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
Lecture Focus: Data Communications and Networking  Data Link Layer  Error Control Lecture 19 CSCS 311.
CHAPTER 3: DATA LINK CONTROL Flow control, Error detection – two dimensional parity checks, Internet checksum, CRC, Error control, Transmission efficiency.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.
Review.
10.1 Chapter 10 Error Detection and Correction Data can be corrupted during transmission. Some applications require that errors be detected and.
1 Kyung Hee University Position of the data-link layer.
Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can.
Chapter 10 Error Detection And Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link Layer. Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless.
Error Detection and Correction
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 PART III: DATA LINK LAYER ERROR DETECTION AND CORRECTION 7.1 Chapter 10.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
Hamming Distance & Hamming Code
Transmission Errors Error Detection and Correction.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Part III: Data Link Layer Error Detection and Correction
Data Link Layer 1. 2 Single-bit error 3 Multiple-bit error 4.
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.
Error Detection and Correction
Subject Name: COMPUTER NETWORKS-1
DATA COMMUNICATION AND NETWORKINGS
Part III Datalink Layer 10.
Chapter 10 Error Detection And Correction
Error Detection Bit Error Rate(BER): It is the ratio of number Ne of errors appearing over a certain time interval t to the number Nt of 1 and 0 pulses.
Transmission Errors Error Detection and Correction
Protocols and the TCP/IP Suite
Error Detection and Correction
Error Detection and Correction
Error Detection and Correction
Reliability and Channel Coding
Transmission Errors Error Detection and Correction
Types of Errors Data transmission suffers unpredictable changes because of interference The interference can change the shape of the signal Single-bit.
Chapter 10 Error Detection and Correction
Presentation transcript:

Data Link Layer: Error Detection and Correction 01204325: Data Communication and Computer Networks Asst. Prof. Chaiporn Jaikaeo, Ph.D. chaiporn.j@ku.ac.th http://www.cpe.ku.ac.th/~cpj Computer Engineering Department Kasetsart University, Bangkok, Thailand Adapted from lecture slides by Behrouz A. Forouzan © The McGraw-Hill Companies, Inc. All rights reserved

Outline Overview of Data Link Layer Types of errors Redundancy Correction vs. detection Coding

Data Link Layer

Error Control Detecting errors Correcting errors Forward error correction Automatic repeat request

Types of Errors Single-bit errors Burst errors

Redundancy To detect or correct errors, redundant bits of data must be added

Coding Process of adding redundancy for error detection or correction Two types: Block codes Divides the data to be sent into a set of blocks Extra information attached to each block Memoryless Convolutional codes Treats data as a series of bits, and computes a code over a continuous series The code computed for a set of bits depends on the current and previous input

XOR Operation Main operation for computing error detection/correction codes Similar to modulo-2 addition

Block Coding Message is divided into k-bit blocks Known as datawords r redundant bits are added Blocks become n=k+r bits Known as codewords

Example: 4B/5B Block Coding Data Code 0000 11110 1000 10010 0001 01001 1001 10011 0010 10100 1010 10110 0011 10101 1011 10111 0100 01010 1100 11010 0101 01011 1101 11011 0110 01110 1110 11100 0111 01111 1111 11101 k = ? r = ? n = ?

Error Detection in Block Coding

Notes An error-detecting code can detect only the types of errors for which it is designed Other types of errors may remain undetected. There is no way to detect every possible error

Error Correction

Example: Error Correction Code k, r, n = ? The receiver receives 01001, what is the original dataword?

Hamming Distance d(01, 00) = ? d(11, 00) = ? d(010, 100) = ? Hamming Distance between two words is the number of differences between corresponding bits. d(01, 00) = ? d(11, 00) = ? d(010, 100) = ? d(0011, 1000) = ? How many 8-bit words are n bits away from 10000111?

Minimum Hamming Distance The minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words. Find the minimum Hamming Distance of the following codebook 00000 01011 10101 11110

Detection Capability of Code To guarantee the detection of up to s-bit errors, the minimum Hamming distance in a block code must be dmin = s + 1

Correction Capability of Code To guarantee the correction of up to t-bit errors, the minimum Hamming distance in a block code must be dmin = 2t + 1

Example: Hamming Distance A code scheme has a Hamming distance dmin = 4. What is the error detection and correction capability of this scheme?

Common Detection Methods Parity check Cyclic Redundancy Check Checksum

Parity Check Most common, least complex Single bit is added to a block Two schemes: Even parity – Maintain even number of 1s E.g., 1011  10111 Odd parity – Maintain odd number of 1s E.g., 1011  10110

Example: Parity Check Suppose the sender wants to send the word world. In ASCII the five characters are coded (with even parity) as 1110111 1101111 1110010 1101100 1100100 The following shows the actual bits sent 11101110 11011110 11100100 11011000 11001001

Example: Parity Check Receiver receives this sequence of words: 11111110 11011110 11101100 11011000 11001001 Which blocks are accepted? Which are rejected?

Parity-Check: Encoding/Decoding

Performance of Parity Check Can 1-bit errors be detected? Can 2-bit errors be detected? :

2D Parity Check What is its performance?

2D Parity Check: Performance

2D Parity Check: Performance

Cyclic Redundancy Check In a cyclic code, rotating a codeword always results in another codeword Example:

CRC Encoder/Decoder

CRC Generator

Checking CRC

Polynomial Representation More common representation than binary form Easy to analyze Divisor is commonly called generator polynomial

Division Using Polynomial

Strength of CRC M(x)xn = Q(x)G(x) + R(x) Can be analyzed using polynomial M(x) – Original message G(x) – Generator polynomial of degree n R(x) – Generated CRC Transmitted message is M(x)xn – R(x) which is divisible by G(x) M(x)xn = Q(x)G(x) + R(x)

Strength of CRC Received message is M(x)xn – R(x) + E(x) where E(x) represents bit errors Receiver does not detect any error when E(x) is divisible by G(x), which means either: E(x) 0  No error E(x)  0  Undetectable error

Strength of CRC If G(x) contains at least two terms, then all single-bit errors can be detected If G(x) cannot divide xt + 1 (0 t < n), then all isolated double errors can be detected If G(x) contains a factor of (x+1), all odd-numbered errors can be detected

Properties of Good Polynomial It should have at least two terms The coefficient of the term x0 should be 1 It should not divide xt + 1, for t between 2 and n − 1 It should have the factor x + 1

CRC's Strength Summary All burst errors with L ≤ n will be detected All burst errors with L = n + 1 will be detected with probability 1 – (1/2)n–1 All burst errors with L > n + 1 will be detected with probability 1 – (1/2)n

Example: CRC Generators Which of the following polynomials guarantees that a single-bit error can be detected (a) x+1 (b) x3 (c) 1

Example: CRC Generators Criticize the following CRC generators x3 x10 + x9 + x5 x6+1

Standard Polynomials

Error Correction Two methods Retransmission after detecting error Forward error correction (FEC)

Forward Error Correction Consider only a single-bit error in k bits of data k possibilities for an error One possibility for no error #possibilities = k + 1 Add r redundant bits to distinguish these possibilities; we need 2r  k+1 But the r bits are also transmitted along with data; hence 2r  k+r+1

Number of Redundant Bits Number of data bits k Number of redundancy bits r Total bits k + r 1 2 3 5 6 4 7 9 10 11

Hamming Code Simple, powerful FEC Widely used in computer memory Known as ECC memory error-correcting bits

Redundant Bit Calculation

Example: Hamming Code

Example: Correcting Error Receiver receives 10010100101

Strength of Hamming Code Minimum Hamming Distance is 3 It can correct at most 1 bit error It can detect at most 2 bit error But… not both!!! (Why?) SECDED – Extended Hamming code with one extra parity bit Achieves minimum Hamming distance of 4 Can distinguish between one bit and two bit errors

Burst Error Correction