David Wetherall Professor of Computer Science & Engineering Introduction to Computer Networks Error Coding Overview (§3.2)

Slides:



Advertisements
Similar presentations
Network Technologies essentials Week 2: Physical layer & direct links Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,
Advertisements

10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Lecture 12 Layer 2 – Data Link Layer Protocols
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
Chapter 6 Errors, Error Detection, and Error Control.
Fundamentals of Computer Networks ECE 478/578 Lecture #4: Error Detection and Correction Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
1 ITC242 – Introduction to Data Communications Week 10 Topic 16 Data link control.
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.
Reliability and Channel Coding
Error Detection and Correction
Error Detection and Reliable Transmission EECS 122: Lecture 24 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
Lecture 3: Controlling Errors CS 3035/GZ01: Networked Systems Kyle Jamieson Department of Computer Science University College London.
Data link layer: services
COM342 Networks and Data Communications
Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,
Data Link Layer - 1 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.
Data and Computer Communications
Part 2: Packet Transmission Packets, frames Local area networks (LANs) Wide area networks (LANs) Hardware addresses Bridges and switches Routing and protocols.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 14.
Data Link Layer: Error Detection and Correction
Lecture 6: Framing and Error Detection-Data Link Layer Functions
4: DataLink Layer1 Chapter 4: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York University Section M Topics: 1. Error Detection Techniques:
Error Detection and Correction
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
5: DataLink Layer5-1 Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields.
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
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.
10.1 Chapter 10 Error Detection and Correction Data can be corrupted during transmission. Some applications require that errors be detected and.
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
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.
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.
CS 457 – Lecture 3 Link Layer Protocols Fall 2011.
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.
Introduction to Information Technologies
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Part III. Data Link Layer
Communication Networks: Technology & Protocols
Where we are in the Course
Advanced Computer Networks
CIS 321 Data Communications & Networking
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.
Link Layer and LANs Its not about how hard you hit... It's about how hard you can get hit and keep moving forward 5: DataLink Layer.
Introduction to Information Technologies
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Error Detection Neil Tang 9/26/2008
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
CSE 461: Framing, 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.
Presentation transcript:

David Wetherall Professor of Computer Science & Engineering Introduction to Computer Networks Error Coding Overview (§3.2)

CSE 461 University of Washington2 Topic Some bits will be received in error due to noise. What can we do? – Detect errors with codes » – Correct errors with codes » – Retransmit lost frames Reliability is a concern that cuts across the layers – we’ll see it again Later

Problem – Noise may flip received bits CSE 461 University of Washington3 Signal Slightly Noisy Very noisy

CSE 461 University of Washington4 Approach – Add Redundancy Error detection codes – Add check bits to the message bits to let some errors be detected Error correction codes – Add more check bits to let some errors be corrected Key issue is now to structure the code to detect many errors with few check bits and modest computation

CSE 461 University of Washington5 Motivating Example A simple code to handle errors: – Send two copies! Error if different. How good is this code? – How many errors can it detect/correct? – How many errors will make it fail?

CSE 461 University of Washington6 Motivating Example (2) We want to handle more errors with less overhead – Will look at better codes; they are applied mathematics – But, they can’t handle all errors – And they focus on accidental errors (will look at secure hashes later)

CSE 461 University of Washington7 Using Error Codes Codeword consists of D data plus R check bits (=systematic block code) Sender: – Compute R check bits based on the D data bits; send the codeword of D+R bits DR=fn(D) Data bits Check bits

CSE 461 University of Washington8 Using Error Codes (2) Receiver: – Receive D+R bits with unknown errors – Recompute R check bits based on the D data bits; error if R doesn’t match R’ DR’ Data bits Check bits R=fn(D) =?

CSE 461 University of Washington9 Intuition for Error Codes For D data bits, R check bits: Randomly chosen codeword is unlikely to be correct; overhead is low All codewords Correct codewords

CSE 461 University of Washington10 R.W. Hamming ( ) Much early work on codes: – “Error Detecting and Error Correcting Codes”, BSTJ, 1950 See also: – “You and Your Research”, 1986 Source: IEEE GHN, © 2009 IEEE

CSE 461 University of Washington11 Hamming Distance Distance is the number of bit flips needed to change D 1 to D 2 Hamming distance of a code is the minimum distance between any pair of codewords

CSE 461 University of Washington12 Hamming Distance (2) Error detection: – For a code of distance d+1, up to d errors will always be detected

CSE 461 University of Washington13 Hamming Distance (3) Error correction: – For a code of distance 2d+1, up to d errors can always be corrected by mapping to the closest codeword

CSE 461 University of Washington14 Topic Some bits may be received in error due to noise. How do we detect this? – Parity » – Checksums » – CRCs » Detection will let us fix the error, for example, by retransmission (later).

CSE 461 University of Washington15 Simple Error Detection – Parity Bit Take D data bits, add 1 check bit that is the sum of the D bits – Sum is modulo 2 or XOR

CSE 461 University of Washington16 Parity Bit (2) How well does parity work? – What is the distance of the code? – How many errors will it detect/correct? What about larger errors?

CSE 461 University of Washington17 Checksums Idea: sum up data in N-bit words – Widely used in, e.g., TCP/IP/UDP Stronger protection than parity 1500 bytes16 bits

CSE 461 University of Washington18 Internet Checksum Sum is defined in 1s complement arithmetic (must add back carries) – And it’s the negative sum “The checksum field is the 16 bit one's complement of the one's complement sum of all 16 bit words …” – RFC 791

CSE 461 University of Washington19 Internet Checksum (2) Sending : 1.Arrange data in 16-bit words 2.Put zero in checksum position, add 3.Add any carryover back to get 16 bits 4.Negate (complement) to get sum 0001 f203 f4f5 f6f7 +(0000) ddf0 ddf ddf2 220d

CSE 461 University of Washington20 Internet Checksum (3) Sending : 1.Arrange data in 16-bit words 2.Put zero in checksum position, add 3.Add any carryover back to get 16 bits 4.Negate (complement) to get sum 0001 f203 f4f5 f6f7 +(0000) ddf0 ddf ddf2 220d

CSE 461 University of Washington21 Internet Checksum (4) Receiving : 1.Arrange data in 16-bit words 2.Checksum will be non-zero, add 3.Add any carryover back to get 16 bits 4.Negate the result and check it is f203 f4f5 f6f d fffd fffd ffff 0000

CSE 461 University of Washington22 Internet Checksum (5) Receiving : 1.Arrange data in 16-bit words 2.Checksum will be non-zero, add 3.Add any carryover back to get 16 bits 4.Negate the result and check it is f203 f4f5 f6f d fffd fffd ffff 0000

CSE 461 University of Washington23 Internet Checksum (6) How well does the checksum work? – What is the distance of the code? – How many errors will it detect/correct? What about larger errors?

CSE 461 University of Washington24 Cyclic Redundancy Check (CRC) Even stronger protection – Given n data bits, generate k check bits such that the n+k bits are evenly divisible by a generator C Example with numbers: – n = 302, k = one digit, C = 3

CSE 461 University of Washington25 CRCs (2) The catch: – It’s based on mathematics of finite fields, in which “numbers” represent polynomials – e.g, is x 7 + x 4 + x 3 + x 1 What this means: – We work with binary values and operate using modulo 2 arithmetic

CSE 461 University of Washington26 CRCs (3) Send Procedure: 1.Extend the n data bits with k zeros 2.Divide by the generator value C 3.Keep remainder, ignore quotient 4.Adjust k check bits by remainder Receive Procedure: 1.Divide and check for zero remainder

CRCs (4) CSE 461 University of Washington27 Data bits: Check bits: C(x)=x 4 +x 1 +1 C = k =

CRCs (5) CSE 461 University of Washington28

CSE 461 University of Washington29 CRCs (6) Protection depend on generator – Standard CRC-32 is Properties: – HD=4, detects up to triple bit errors – Also odd number of errors – And bursts of up to k bits in error – Not vulnerable to systematic errors like checksums

CSE 461 University of Washington30 Error Detection in Practice CRCs are widely used on links – Ethernet, , ADSL, Cable … Checksum used in Internet – IP, TCP, UDP … but it is weak Parity – Is little used