: An Introduction to Computer Networks

Slides:



Advertisements
Similar presentations
Noise, Information Theory, and Entropy (cont.) CS414 – Spring 2007 By Karrie Karahalios, Roger Cheng, Brian Bailey.
Advertisements

Computer Interfacing and Protocols
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.
Fundamentals of Computer Networks ECE 478/578 Lecture #4: Error Detection and Correction Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
EE 122: Error detection and reliable transmission Ion Stoica September 16, 2002.
Error detection and correction
Chapter 2 : Direct Link Networks (Continued). So far... Modulation and Encoding Link layer protocols Error Detection -- Parity Check.
Error Detection and Correction
Error Detection and Reliable Transmission EECS 122: Lecture 24 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
Error Detection and Correction Rizwan Rehman Centre for Computer Studies Dibrugarh University.
Data link layer: services
Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,
Cyclic Codes for Error Detection W. W. Peterson and D. T. Brown by Maheshwar R Geereddy.
Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.
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
Data Link Layer. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Computer Science Division
1 © Unitec New Zealand CRC calculation and Hammings code.
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.
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.
Lecture 4 Error Detecting and Correcting Techniques Dr. Ghalib A. Shah
Dr. Clincy Professor of CS
Modulo-2 Digital coding uses modulo-2 arithmetic where addition becomes the following operations: 0+0= =0 0+1= =1 It performs the.
2.8 Error Detection and Correction
Physical Link Layer.
The Data Link Layer.
Computer Architecture and Assembly Language
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
Subject Name: COMPUTER NETWORKS-1
Communication Networks: Technology & Protocols
DATA COMMUNICATION AND NETWORKINGS
Dr. Clincy Professor of CS
Advanced Computer Networks
CIS 321 Data Communications & Networking
Error Detection and Correction
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.
Detecting and Correcting Bit Errors
Packetizing Error Detection
Packetizing Error Detection
EEC-484/584 Computer Networks
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Transmission Errors Error Detection and Correction
Error Detection Neil Tang 9/26/2008
Packetizing Error Detection
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
Error Detection and Correction
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.
Error detection: Outline
2.8 Error Detection and Correction
EECS 122: EE122: Error Detection and Reliable Transmission
Chapter 10 Error Detection and Correction
Presentation transcript:

371-1-0291: An Introduction to Computer Networks Homepage http://help.cse.bgu.ac.il/cse/Courses/list.asp Handout #13: Error Detection and Correction Additional Reading Text book: Chap. 2.4 Lect-11-1: Error Control Computer Networks

Outline Basic ideas: BER, PER and Hamming Distance Parity Error Detection: Cyclic Redundancy Codes Error Correction Error Detection versus Correction Lect-11-1: Error Control Computer Networks

Errors A bit error occurs when a source sends a bit, b, and the destination receives NOT b. The error can take place on the link (e.g. interference, or signal loss), in a (malfunctioning) switch or router along the path, or in the source or destination (e.g. failed hardware, or bit errors in memories). The bit error rate (BER) tells us the probability of any given bit being in error. Typical values are BER = 10-9 for an electrical link, and 10-12 for an optical link. Lect-11-1: Error Control Computer Networks

Error Detection D H H ACK An example: Assume BER and independent errors, Packet Error Rate = PER = 1 – (1 – BER)N PER ~= N (BER) if N (BER) << 1 e.g. N = 104, BER = 10-7 = PER = 10-3 Lect-11-1: Error Control Computer Networks

Error Detection In practice, bit errors occur in BURSTS: Perhaps caused by mechanical switches. Time constants. Therefore, PER is lower for a given BER Lect-11-1: Error Control Computer Networks

Encoding to detect errors We use codes to help us detect errors. The set of possible messages is mapped by a function onto the set of codes. We pick the mapping function so that it is easy to detect errors among the resulting codes. Example: Consider the function that duplicates each bit in the message. E.g. the message 1011001 would be mapped to the code 11001111000011, and then transmitted by the sender. The receiver knows that bits always come in pairs. If the two bits in a pair are different, it declares that there was a bit error. Of course, this code is quite inefficient (doubles #bits, un-detects if both bits are corrupted) Lect-11-1: Error Control Computer Networks

Hamming Distance Number of bits that differ between two codes e.g. 1 0 0 1 0 1 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 0 In our example code (replicated bits), all codes have at least two bits different from every other code. Therefore, it has a Hamming distance of at least2. HD=3 Lect-11-1: Error Control Computer Networks

Hamming Distance Set of codes - To reliably detect errors in d bits: HD > d - To reliably correct errors of d bits : HD > 2d 4 3 Example Suppose we encode “0” by “0” and “1” by “1” A corrupted single bit leads to a decoding error If we encode “0” –> “00” ; “1” –> “11”, then a single corrupted bit is detected, but from receiving “01” we don’t know if “1” or “0” has been transmitted If we encode “0” –> “000” ; “1” –> “111” and one bit is corrupted, we reliably detect the xmitted by the majority rule d 23 1 2 HD = min (dij ) ij Lect-11-1: Error Control Computer Networks

Parity: A simple error detection code We look for to add redundancy efficiently Parity: A simple error detection code 0 1 1 1 0 1 0 1 1 Parity added to make # 1s even/odd If parity is wrong ERROR If parity is right NO ERROR (or an even number of errors has occurred) Q: What is the minimum Hamming distance for this code? Lect-11-1: Error Control Computer Networks

Error Detection Cyclic Redundancy Code (CRC) Goal: Maximize the error detection prob using only a small # of redundant bits Technique comes from Finite Fields Algebra A (n+1) bit message is represented by a polynomial with degree n MSB e.g., For CRC, the XMT and RCV agree on a divisor polynomial , of degree k, e.g., for k=3 Lect-11-1: Error Control Computer Networks

T(X) is divisible by C(X) if deg[T(X)] >= deg[C(X)] The selection of C(X) has a crucial impact on what errors can be detected. E.g., for Ethernet the C(X) is a 32 degree polynomial Given M(X) and C(X), the transmitted message is (n+1)+k bits long and corresponds to a polynomial T(X) that is exactly divisible by C(X) (using binary polynomial arithmetic): T(X) is divisible by C(X) if deg[T(X)] >= deg[C(X)] If deg[T(X)] = deg[C(X)], T(X) is divisible once by C(X), and if deg[T(X)] < deg[C(X)] it is not The remainder of T(X)/C(X) is [T(X) XOR C(X)] Lect-11-1: Error Control Computer Networks

A division example will be given later A remainder computational example Example C(X) ~ 1 1 0 1 T(X) ~ 1 0 0 1 XOR 0 1 0 0 Lect-11-1: Error Control Computer Networks

T(X)= M(X) (adds k zeros at the message end) To create T(X) do: T(X)= M(X) (adds k zeros at the message end) Divide T(X) by C(X) and find the remainder R(X) T(X)=T(X) – R(X) The resulting T(X) is exactly divisible by C(X) and contains M(X) followed by R(X) (recall that by binary subtraction 0 -b = b) Lect-11-1: Error Control Computer Networks

Example: M= 110101 C = 1001 M(X) T = 1 1 0 1 0 1 0 1 1 Xmitted message 1 1 0 0 1 1 M(X) 1 0 0 1 1 1 0 1 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 1 1 0 0 1 0 1 0 0 1 1 T = 1 1 0 1 0 1 0 1 1 Xmitted message R Lect-11-1: Error Control Computer Networks

To detect an error upon receiving T(X) do: Divide T(X) by C(X) If the remainder R(X) is zero, no-error is concluded If the remainder R(X) is not zero, an error has ocured Lect-11-1: Error Control Computer Networks

Cyclic Redundancy Code (CRC) single bit error detection A single-bit error can be represented as: T(X)+E(X), where E(X) = Xi (bit i corruption) If C(X) = Xk + Xj , i.e. C(X) has any 2 terms we can detect a single bit error. Indeed, Since C(X) divides T(X) (so generated) but can’t divide E(X), all single bit errors can be detected. [ Check what happens when you divide (10000) by (101) ] Lect-11-1: Error Control Computer Networks

Cyclic Redundancy Code (CRC) Double bit error detection (ii) Two isolated errors can be represented as: E(x) = xi + xj = xj (xi-j + 1) If (xk + 1) is not a factor of C(x) for any k then: all two-bit errors are detected, or if C(x) has a 3-term factor. (In this cases, C(x) cannot divide E(x) ) (iii) Detecting an odd number of errors Theorem: If (x + 1) is a factor of C(x) then: all odd errors are detected. Proof by contradiction: Assume E has odd # of 1’s and (x + 1) is a factor: E(x) = (x +1)E’ (x) for some E’ (x) Lect-11-1: Error Control Computer Networks

Cyclic Redundancy Code (CRC) (iii) Proof (cont.) E(1) = (1 + 1) E’(1) = 0 E’(1) = 0 Evaluated at x=1 But E(x) has odd # of 1’s so : E (1) = 1 Therefore, if E has an odd # of 1’s, it is not divisible by (x + 1) Lect-11-1: Error Control Computer Networks

Cyclic Redundancy Code (CRC) (iv) Burst error of length < k (degree of C(x)) can be detected Burst of length k-1 is represented : E(x)=xi (x k-1-i + …+1), 0 <= i < k Thus, C(x) doesn't divide any factor of E(x) (v) Longer bursts can not necessarily be guaranteed to be detected. Lect-11-1: Error Control Computer Networks

Cyclic Redundancy Code (CRC) Examples of common CRC generators: CRC-8: x8 + x2 + x1 + 1 CRC-10: x10 + x9 + x5 + x4 + x1 + 1 CRC-12: x12 + x11 + x3 +x2 +1 CRC-16: x16 + x15 + x2 +1 CRC-CCITT: x16 + x12 + x5 + 1 CRC-32: x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 +x + 1 Lect-11-1: Error Control Computer Networks

Error Correction Common code used: Bose-Chaudhuri-Hocquenghem (BCH) R BCH (R + M, M, t) e.g. BCH (1023, 923, 10) Can detect all “t” bit errors If t=1 then the code is called Reed-Solomon and is used in CD players Lect-11-1: Error Control Computer Networks

Most data networks today use error detection, Detect or Correct? Advantages of Error Detection Requires smaller number of bits/overhead. Requires less/simpler processing. Advantages of Error Correction Reduces number of retransmissions. Most data networks today use error detection, not error correction. Lect-11-1: Error Control Computer Networks

Detect or Correct? An example Assume: 1. Packets are of lengths 923 bits 2. PER = 10-5 Overhead of Error Correction: Assume we use: BCH (1023, 923, 10) Therefore, we send 923 data bits as 1023 bits. Overhead of Error Detection: Assume we use: 32-bit CRC; one retransmission per error. Therefore, we send 923 data bits as 955 bits. 100 923 Transmission Overhead = ~= 10% Transmission Overhead = ~= 3% (923 + 32) 10-5 + 32 923 Lect-11-1: Error Control Computer Networks