Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.

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.
Reliability & Channel Coding
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
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Fundamentals of Computer Networks ECE 478/578 Lecture #4: Error Detection and Correction Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Error detection and correction
Data Communications Chapter 7 Error Detection. Despite the best prevention techniques, errors may still happen. To detect an error, something extra has.
Chapter 2 : Direct Link Networks (Continued). So far... Modulation and Encoding Link layer protocols Error Detection -- Parity Check.
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.
Error Detection and Correction
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
Error Detection and Reliable Transmission EECS 122: Lecture 24 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 PART III: DATA LINK LAYER ERROR DETECTION AND CORRECTION 7.1 Chapter 10.
Shashank Srivastava Motilal Nehru National Institute Of Technology, Allahabad Error Detection and Correction : Data Link Layer.
Transmission Errors Error Detection and Correction
Lecture 3: Controlling Errors CS 3035/GZ01: Networked Systems Kyle Jamieson Department of Computer Science University College London.
18-Aug-154/598N: Computer Networks Overview Direct link networks –Error detection - Section 2.4 –Reliable transmission - Section 2.5.
Data link layer: services
CSE331: Introduction to Networks and Security Lecture 3 Fall 2002.
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
Lecture 7: Reliable Packet Transmission. Cyclic Redundancy Check Add k bits of extra data (the CRC field) to an n-bit message to provide error detection.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link Layer: Error Detection and Correction
Lecture 6: Framing and Error Detection-Data Link Layer Functions
27-Oct-15Computer Networks1 Outline Chapter 2: Direct Link Networks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
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.
Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
David Wetherall Professor of Computer Science & Engineering Introduction to Computer Networks Error Detection (§3.2.2)
Computer Science Division
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.
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
CSCI 465 D ata Communications and Networks Lecture 9 Martin van Bommel CSCI 465 Data Communications & Networks 1.
1 © Unitec New Zealand CRC calculation and Hammings code.
Error Detection.
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.
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.
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.
David Wetherall Professor of Computer Science & Engineering Introduction to Computer Networks Error Coding Overview (§3.2)
Winter 2007CS244a Handout 141 CS244a: An Introduction to Computer Networks Handout 14: Error Detection and Correction Nick McKeown Professor of Electrical.
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.
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.
Part III: Data Link Layer Error Detection and Correction
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
: An Introduction to Computer Networks
Advanced Computer Networks
Part III Datalink Layer 10.
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.
Error Detection Neil Tang 9/26/2008
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:

Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that some messages are invalid  Hence requires extra bits  An (n,k) code has codewords of n bits with k data bits and r = (n-k) redundant check bits Correction  Forward error correction: many related code words map to the same data word  Detect errors and retry transmission

Parity 1-bit error detection with parity  Add an extra bit to a code to ensure an even (odd) number of 1s  Every code word has an even (odd) number of 1s Valid code words Parity Encoding: White – invalid (error)

Voting 1-bit error correction with voting  Every codeword is transmitted n times Voting: White – correct to 1 Blue - correct to Valid code words

Basic Concept: Hamming Distance Hamming distance of two bit strings = number of bit positions in which they differ. If the valid words of a code have minimum Hamming distance D, then D-1 bit errors can be detected. If the valid words of a code have minimum Hamming distance D, then [(D-1)/2] bit errors can be corrected HD=2

Examples Parity Valid code words Parity Encoding: White – invalid (error) Voting: White – correct to 1 Blue - correct to Valid code words Voting

Digital Error Detection Techniques Two-dimensional parity  Detects up to 3-bit errors  Good for burst errors IP checksum  Simple addition  Simple in software  Used as backup to CRC Cyclic Redundancy Check (CRC)  Powerful mathematics  Tricky in software, simple in hardware  Used in network adapter

Two-Dimensional Parity Use 1-dimensional parity  Add one bit to a 7-bit code to ensure an even/odd number of 1s Add 2nd dimension  Add an extra byte to frame Bits are set to ensure even/odd number of 1s in that position across all bytes in frame Comments  Catches all 1-, 2- and 3-bit and most 4-bit errors Parity Bits Parity Byte Data

Internet Checksum Idea  Add up all the words  Transmit the sum Internet Checksum  Use 1’s complement addition on 16bit codewords  Example Codewords: ’s complement binary: ’s complement sum1000 Comments  Small number of redundant bits  Easy to implement  Not very robust

IP Checksum u_short cksum(u_short *buf, int count) { register u_long sum = 0; while (count--) { sum += *buf++; if (sum & 0xFFFF0000) { /* carry occurred, so wrap around */ sum &= 0xFFFF; sum++; } return ~(sum & 0xFFFF); }

Cyclic Redundancy Check (CRC) Goal  Maximize protection, Minimize extra bits Idea  Add k bits of redundant data to an n-bit message  N-bit message is represented as a n-degree polynomial with each bit in the message being the corresponding coefficient in the polynomial  Example Message = Polynomial = 1  x 7  0  x 6  0  x 5  1  x 4  1  x 3  0  x 2  1  x  0 = x 7  x 4  x 3  x

CRC Select a divisor polynomial C(x) with degree k  Example with k = 3: C(x) = x 3  x 2  1 Transmit a polynomial P(x) that is evenly divisible by C(x)  P(x) = M(x) + k bits

CRC - Sender Steps  T(x) = M(x) by x k (zero extending)  Find remainder, R(x), from T(x)/C(x)  P(x) = T(x) – R(x)  M(x) followed by R(x) Example  M(x) = = x 7  x 4  x 3  x  C(x) = 1101 = x 3  x 2  1  T(x) =  R(x) = 101  P(x) =

CRC - Receiver Receive Polynomial P(x) + E(x)  E(x) represents errors  E(x) = 0, implies no errors Divide (P(x) + E(x)) by C(x)  If result = 0, either No errors (E(x) = 0, and P(x) is evenly divisible by C(x)) (P(x) + E(x)) is exactly divisible by C(x), error will not be detected

CRC – Example Encoding k + 1 bit check sequence c, equivalent to a degree-k polynomial Remainder m mod c Message plus k zeros Result: Transmit message followed by remainder: C(x) = x 3  x 2  1 = 1101Generator M(x) = x 7  x 4  x 3  x = Message

CRC – Example Decoding – No Errors k + 1 bit check sequence c, equivalent to a degree-k polynomial Remainder m mod c Received message, no errors Result: CRC test is passed C(x) = x 3  x 2  1 = 1101Generator P(x) = x 10  x 7  x 6  x 4  x 2  1 = Received Message

CRC – Example Decoding – with Errors k + 1 bit check sequence c, equivalent to a degree-k polynomial Remainder m mod c Received message Result: CRC test failed Two bit errors C(x) = x 3  x 2  1 = 1101Generator P(x) = x 10  x 7  x 5  x 4  x 2  1 = Received Message

CRC Error Detection Properties  Characterize error as E(x)  Error detected unless C(x) divides E(x) (i.e., E(x) is a multiple of C(x)) What errors can we detect?  All single-bit errors, if x k and x 0 have non-zero coefficients  All double-bit errors, if C(x) has at least three terms  All odd bit errors, if C(x) contains the factor (x + 1)  Any bursts of length < k, if C(x) includes a constant term  Most bursts of length  k

CRC Error Detection Odd number of bit errors can be detected if C(x) contains the factor (x + 1) Proof:  C(x) = (x + 1) C’(x) => C(1) = 0 (  C(x) has an even number of terms)  P(x) = C(x) f(x) = (x + 1) C’(x) f(x) => P(1) = 0 (  P(x) has an even number of terms)  E(x) has an odd number of terms (odd number of error bits)  E(1) = 1 => P(1) + E(1) = = 1 …………………………….. (1)  Assume E(x) cannot be detected by CRC with C(x)  P(x) + E(x) = C(x)g(x) => P(1) + E(1) = C(1)g(1) = 0 ………………………………(2) (1) contradicts (2) => E(x) must be detected by C(x)

CRC Error Detection Any error bursts of length < k will be detected if C(x) includes a constant term Proof:  E(x) = x i (x k ), where i >= 0  C(x) = x f(x) + 1  No power of x can be factored out of C(x) => C(x) is not a factor of x i …………………….(1)  C(x) has a degree of k: it cannot be a factor of polynomial with smaller degree (up to k-1) => C(x) is not a factor of x k …………………….(2) (1) (2) => C(x) cannot be a factor of E(x)

Common Polynomials for C(x) CRCC(x) CRC-8 x 8  x 2  x 1  1 CRC-10 x 10  x 9  x 5  x 4  x 1  1 CRC-12 x 12  x 11  x 3  x 2  x 1  1 CRC-16 x 16  x 15  x 2  1 CRC-CCITT x 16  x 12  x 5  1 CRC-32 x 32  x 26  x 23  x 22  x 16  x 12  x 11  x 10  x 8  x 7  x 5  x 4  x 2  x 1  1

Cyclic Redundancy Codes (CRC) Commonly used codes that have good error detection properties.  Can catch many error combinations with a small number or redundant bits Based on division of polynomials.  Errors can be viewed as adding terms to the polynomial  Should be unlikely that the division will still work Can be implemented very efficiently in hardware. Examples:  CRC-32: Ethernet  CRC-8, CRC-10, CRC-32: ATM

Error Detection vs. Error Correction Detection  Pro: Overhead only on messages with errors  Con: Cost in bandwidth and latency for retransmissions Correction  Pro: Quick recovery  Con: Overhead on all messages What should we use?  Correction if retransmission is too expensive  Correction if probability of errors is high