CS321: Computer Networks Error Detection and Correction

Similar documents
Ch. 7 Error Detection and Correction

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

Chapter 10 Error Detection and Correction 10.1

Error Correction and Detection using Cyclic Redundancy Check

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science

PART III. Data Link Layer MGH T MGH C I 204

EE 6900: FAULT-TOLERANT COMPUTING SYSTEMS

CS254 Network Technologies. Lecture 2: Network Models & Error Detection and Correction. Dr Nikos Antonopoulos

Data Link Layer. Srinidhi Varadarajan

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

CMSC 2833 Lecture 18. Parity Add a bit to make the number of ones (1s) transmitted odd.

Link Layer: Error detection and correction

TYPES OF ERRORS. Data can be corrupted during transmission. Some applications require that errors be detected and corrected.

UNIT-II 1. Discuss the issues in the data link layer. Answer:

CSE 461: Framing, Error Detection and Correction

MYcsvtu Notes DATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes

CSN Telecommunications. 5: Error Coding. Data, Audio, Video and Images Prof Bill Buchanan

Lecture 6: Reliable Transmission. CSE 123: Computer Networks Alex Snoeren (guest lecture) Alex Sn

CSEP 561 Error detection & correction. David Wetherall

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. Nov 1,

High Level View. EE 122: Error detection and reliable transmission. Overview. Error Detection

CSE 123A Computer Networks

EE 122: Error detection and reliable transmission. Ion Stoica September 16, 2002

EITF25 Internet Techniques and Applications L3: Data Link layer. Stefan Höst

Some portions courtesy Robin Kravets and Steve Lumetta

Lecture 2 Error Detection & Correction. Types of Errors Detection Correction

Fault-Tolerant Computing

Error Detection Codes. Error Detection. Two Dimensional Parity. Internet Checksum Algorithm. Cyclic Redundancy Check.

4. Error correction and link control. Contents

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

Lecture 5. Homework 2 posted, due September 15. Reminder: Homework 1 due today. Questions? Thursday, September 8 CS 475 Networks - Lecture 5 1

Chapter 5 Data-Link Layer: Wired Networks

CSE 123: Computer Networks Alex C. Snoeren. HW 1 due Thursday!

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

Where we are in the Course

CSE123A discussion session

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 4. September 09 CMSC417 Set 4 1

CSCI-1680 Link Layer Reliability John Jannotti

COMPUTER NETWORKS UNIT-3

Data Link Control Layer, Error Detection, Error Correction, and Framing

CSCI-1680 Link Layer I Rodrigo Fonseca

SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY COMPUTER NETWORKS UNIT - II DATA LINK LAYER

(Refer Slide Time: 2:20)

2.4 Error Detection Bit errors in a frame will occur. How do we detect (and then. (or both) frames contains an error. This is inefficient (and not

Introduction to Computer Networks. 03 Data Link Layer Introduction

Achieving Reliable Digital Data Communication through Mathematical Algebraic Coding Techniques

Point-to-Point Links. Outline Encoding Framing Error Detection Sliding Window Algorithm. Fall 2004 CS 691 1

Fault Tolerance & Reliability CDA Chapter 2 Additional Interesting Codes

Data Link Layer Overview

ISO/OSI Reference Model. Data Link Layer. 7. Application. 6. Presentation. 5. Session. 4. Transport. 3. Network. 2. Data Link. 1.

The Data Link Layer Chapter 3

FAULT TOLERANT SYSTEMS

Department of Computer and IT Engineering University of Kurdistan. Data Communication Netwotks (Graduate level) Data Link Layer

Data Link Networks. Hardware Building Blocks. Nodes & Links. CS565 Data Link Networks 1

Data Link Layer Overview

Chapter 3. The Data Link Layer

Communication Fundamentals in Computer Networks

Data Link Layer Overview

CSE 123: Computer Networks

LECTURE #34. Data Communication (CS601)

Data Link Layer Overview

EITF25 Internet- - Techniques and Applica8ons Stefan Höst. L4 Data link (part 1)

Inst: Chris Davison

Error Detection and Correction

CSE123A discussion session

Computer Networks. Shyam Gollakota

ENEE x Digital Logic Design. Lecture 3

COMPUTER NETWORKS UNIT I. 1. What are the three criteria necessary for an effective and efficient networks?

Telecom Systems Chae Y. Lee. Contents. Flow Control Error Detection/Correction Link Control (Error Control) Link Performance (Utility)

Overview. Data Link Technology. Role of the data-link layer. Role of the data-link layer. Function of the physical layer

T325 Summary T305 T325 B BLOCK 4 T325. Session 3. Dr. Saatchi, Seyed Mohsen. Prepared by:

Computer and Network Security

Links. CS125 - mylinks 1 1/22/14

Lecture / The Data Link Layer: Framing and Error Detection

I. INTRODUCTION. each station (i.e., computer, telephone, etc.) directly connected to all other stations

Implementation of Multidirectional Parity Check Code Using Hamming Code for Error Detection and Correction

Chapter 2. Data Representation in Computer Systems

Data Link Technology. Suguru Yamaguchi Nara Institute of Science and Technology Department of Information Science

DATA LINK LAYER UNIT 7.

The Data Link Layer Chapter 3

CS321: Computer Networks ELECTRONIC MAIL

Chapter Six. Errors, Error Detection, and Error Control. Data Communications and Computer Networks: A Business User s Approach Seventh Edition

Pending Issues. Opera,ng Systems and Networks. Network Lecture 3: Link Layer (1) Where we are in the Course. Scope of the Link Layer

CS422 Computer Networks

EE 387 course information

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 7

CSE 123: Computer Networks

P( Hit 2nd ) = P( Hit 2nd Miss 1st )P( Miss 1st ) = (1/15)(15/16) = 1/16. P( Hit 3rd ) = (1/14) * P( Miss 2nd and 1st ) = (1/14)(14/15)(15/16) = 1/16

3. Data Link Layer 3-2

P( Hit 2nd ) = P( Hit 2nd Miss 1st )P( Miss 1st ) = (1/15)(15/16) = 1/16. P( Hit 3rd ) = (1/14) * P( Miss 2nd and 1st ) = (1/14)(14/15)(15/16) = 1/16

CHAPTER 2 Data Representation in Computer Systems

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16

CHAPTER 2 Data Representation in Computer Systems

Chapter 2. Data Representation in Computer Systems. Objectives (1 of 2) Objectives (2 of 2)

Data Link Layer: Overview, operations

Ad hoc and Sensor Networks Chapter 6: Link layer protocols. Holger Karl

INPUT TO (TM/TC) CHANNEL CODING GREEN BOOK(s) AS DISCUSSED AT THE MEETING IN CRYSTAL CITY, VA (USA) on 12 March Frame Error Control Field

Link layer, LANs: outline. Chapter 5-1 Link Layer. Link layer: introduction. Link layer services

CS321: Computer Networks TELNET, SSH

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition

Transcription:

CS321: Computer Networks Error Detection and Correction Dr. Manas Khatua Assistant Professor Dept. of CSE IIT Jodhpur E-mail: manaskhatua@iitj.ac.in

Error Detection and Correction Objective: System must guarantee that the data received are identical to the data transmitted Methods: 1. If a frame is corrupted between the two nodes, it needs to be corrected 2. Drop the frame and let the upper layer (e.g. Transport) protocol to handle it by retransmission 14-01-2017 Dr. Manas Khatua 2

Types of Error Single bit error Burst error / multibit error Reason: noise in the channel 14-01-2017 Dr. Manas Khatua 3

Detection and Correction Central idea: redundancy put some extra bit with our data Achieved by coding scheme Block coding Convolution coding Error Detection : looking to see if any error has occurred Error Correction: trying to recover the corruption Need to know exact number of bits that are corrupted Needs the position of those bits 14-01-2017 Dr. Manas Khatua 4

Block Coding Add r bits How the extra r bits are chosen or calculated? How can errors be detected? Finds the existence of invalid codeword 14-01-2017 Dr. Manas Khatua 5

Example Let us assume that k = 2 and n = 3. Table shows the list of datawords and codewords. Later, we will see how to derive a codeword from a dataword. Assume the sender encodes the dataword 01 as 011 and Dataword Codeword sends it to the receiver. 00 000 01 011 10 101 11 110 Possible options at receiver (assume one bit corruption): 011 => correct 111 => invalid 001 => invalid 010 => invalid 14-01-2017 Dr. Manas Khatua 6

Hamming Distance The Hamming distance between two words (of the same size) is the number of differences between the corresponding bits. Notation: Hamming distance between two words x and y as d(x, y). Calculation: apply the XOR operation on the two words and count the number of 1 s in the result To guarantee the detection of up to s errors in all cases, the minimum Hamming distance in a block code must be d min = s + 1. 14-01-2017 Dr. Manas Khatua 7

Types of Block Codes Linear Block Code Non-linear Block Code A linear block code is a code in which the exclusive OR (addition modulo-2) of two valid codewords creates another valid codeword. Example: Reed-Solomon codes Hamming codes Parity Check Code. Dataword Codeword 00 000 01 011 10 101 11 110 Minimum Hamming distance: number of 1s in the nonzero valid codeword with the smallest number of 1s. 14-01-2017 Dr. Manas Khatua 8

Parity Check Code Dataword Codeword Dataword Codeword 0000 00000 1000 10001 0001 00011 1001 10010 0010 00101 1010 10100 0011 00110 1011 10111 14-01-2017 Dr. Manas Khatua 9

Parity Check Code Modulo arithmetic: Generator: r 0 = a 3 + a 2 + a 1 + a 0 (modulo-2) Checker: s 0 = a 3 + a 2 + a 1 + a 0 + q 0 (modulo-2) A parity-check code can detect an odd number of errors. what happens if an even number of bit errors occur? a more robust error-detection scheme is needed 14-01-2017 Dr. Manas Khatua 10

Insight into Error-Correction two-dimensional parity scheme The receiver can thus not only detect but can identify the bit that has corrupted. The ability of the receiver to both detect and correct errors is known as forward error correction (FEC). 14-01-2017 Dr. Manas Khatua 11

Cyclic Redundancy Check (CRC) It is an error-detection technique used widely in today s computer networks (e.g., LAN, WAN) It is linear block code If a codeword is cyclically shifted (rotated), the result is another codeword. E.g., if 1011000 is a codeword and we cyclically leftshift, then 0110001 is also a codeword. 14-01-2017 Dr. Manas Khatua 12

CRC code with C(7,4) C(7,4) => 4 bits dataword, 7 bits codeword 14-01-2017 Dr. Manas Khatua 13

CRC Encoding 14-01-2017 Dr. Manas Khatua 14

CRC Decoding 14-01-2017 Dr. Manas Khatua 15

CRC Decoding 14-01-2017 Dr. Manas Khatua 16

Polynomial Representation The power of each term shows the position of the bit The coefficient shows the value of the bit The degree of a polynomial is the highest power in the polynomial. 14-01-2017 Dr. Manas Khatua 17

Polynomial Operations Adding and Subtracting Polynomials Not same as it is performed in mathematics addition and subtraction are the same adding or subtracting is done by combining terms and deleting pairs of identical terms E.g., x 5 +x 4 +x 2 + x 6 +x 4 +x 2 => x 6 +x 5 Multiplying or Dividing Terms just add the powers E.g., x 4 * x 3 => x 7 x 7 /x 3 => x 4 14-01-2017 Dr. Manas Khatua 18

Cont Multiplying Two Polynomials is done term by term E.g., (x 5 +x 3 +x 2 +x)(x 2 +x+1) (x 7 +x 6 +x 5 )+(x 5 +x 4 +x 3 )+(x 4 +x 3 +x 2 )+(x 3 +x 2 +x) x 7 +x 6 +x 3 +x Dividing One Polynomial by Another Division of polynomials is conceptually the same as the binary division we discussed for an encoder. 14-01-2017 Dr. Manas Khatua 19

Cont Shifting 14-01-2017 Dr. Manas Khatua 20

Cyclic Code Encoder Using Polynomials The divisor in a cyclic code is normally called the generator polynomial or simply the generator. 14-01-2017 Dr. Manas Khatua 21

Standard Polynomials for CRC The divisor in a cyclic code is normally called the generator polynomial or simply the generator. 14-01-2017 Dr. Manas Khatua 22

Divisor Polynomial Selection This depends on the expectation we have from the code. Let, Dataword: d(x), Codeword: c(x), Generator: g(x), Syndrome: s(x), Error: e(x) If s(x) 0 --> one or more bits is corrupted If s(x) == 0 --> either no bit is corrupted or the decoder failed to detect any errors 14-01-2017 Dr. Manas Khatua 23

Cont.. Those errors that are divisible by g(x) are not caught. A good polynomial generator needs to have the following characteristics: It should have at least two terms. The coefficient of the term x 0 should be 1. It should not divide x t + 1, for t between 2 and n - 1. It should have the factor x + 1. 14-01-2017 Dr. Manas Khatua 24

Checksum Error detection technique Used in Network and Transport Layer 14-01-2017 Dr. Manas Khatua 25

Example Want to send a message represented by five 4-bit units (7,11,12,0,6) We send (7,11,12,0,6,36) Receiver checks (7+11+12+0+6-36)=? Problem: Bits required to present the units and checksum Solution using One s complement 7,11,12,0,6 require 4 bits Change the 36 (=100100) as follows: (10+0100) = 6; One s complement of 6 is 9 Send (7,11,12,0,6,6) OR (7,11,12,0,6,9) 14-01-2017 Dr. Manas Khatua 26

Internet Checksum Used a 16-bit checksum Advantage: Fast checking Small number of bits required Disadvantage: Not robust e.g., if the values of several words are incremented but the sum and the checksum do not change, the errors are not detected. Solution: weighted checksum proposed by Fletcher and Adler 14-01-2017 Dr. Manas Khatua 27

Error Correction Two ways: Forward Error Correction (FEC) Retransmission Flow Control: production and consumption rates must be balanced 14-01-2017 Dr. Manas Khatua 28

14-01-2017 Dr. Manas Khatua 29