Applied Algorithmics - week8

Slides:



Advertisements
Similar presentations
Networks: Transmission Errors1 Transmission Errors Error Detection and Correction.
Advertisements

Applied Algorithmics - week7
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
Error Detection and Correction
Chapter 6 Errors, Error Detection, and Error Control.
Transmission Errors Error Detection and Correction
Error Detection and Correction
Error Detection and Correction
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Transmission Errors1 Error Detection and Correction.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Error Control.
Unit 1 Protocols Learning Objectives: Understand the need to detect and correct errors in data transmission.
Error Detection and Reliable Transmission EECS 122: Lecture 24 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
Rutvi Shah1 ERROR CORRECTION & ERROR DETECTION Rutvi Shah2 Data can be corrupted during transmission. For reliable communication, errors must be detected.
Transmission Errors Error Detection and Correction
Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 1 Communication Reliability Asst. Prof. Chaiporn Jaikaeo, Ph.D.
Data and Computer Communications Chapter 6 – Digital Data Communications Techniques.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Lecture 3-2: Coding and Error Control (Cont.) ECE
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York University Section M Topics: 1. Error Detection Techniques:
EEC4113 Data Communication & Multimedia System Chapter 5: Error Control by Muhazam Mustapha, October 2011.
Basics of Networking Laboratory Lecture no. 1 Basics of Networking Historical Background Networking began its infancy in the mid -1960’s. by the US Department.
Overview All data can be corrupted, for reliable communications we must be able to detect and correct errors implemented at the data link and transport.
1 © Unitec New Zealand CRC calculation and Hammings 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.
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.
Practical Session 10 Computer Architecture and Assembly Language.
Chapter Nine: Data Transmission. Introduction Binary data is transmitted by either by serial or parallel methods Data transmission over long distances.
Recap of Layers Application, Data Link and Physical.
10.1 Types of Errors 10.2 Detection 10.3 Error Correction.
Coding and Error Control
Lecture 4 Error Detecting and Correcting Techniques Dr. Ghalib A. Shah
Error Detection and Correction
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.
CSE 5345 – Fundamentals of Wireless Networks
Chapter 9: Data Link Control
Computer Architecture and Assembly Language
Introduction to Information Technologies
Data Link Layer.
Chapter Six Errors, Error Detection, and Error Control
Communication Networks: Technology & Protocols
DATA COMMUNICATION AND NETWORKINGS
The Three Main Sources of Transmission Errors
Advanced Computer Networks
CIS 321 Data Communications & Networking
Data Link Layer What does it do?
Data Link Layer.
Digital data communication (Error control)
EEC4113 Data Communication & Multimedia System Chapter 5: Error Control by Muhazam Mustapha, August 2010.
Packetizing Error Detection
Packetizing Error Detection
Basic concepts Networks must be able to transfer data from one device to another with complete accuracy. Data can be corrupted during transmission. For.
Chapter 7 Error Detection and Correction
Introduction to Information Technologies
Chapter Nine: Data Transmission
Transmission Errors Error Detection and Correction
Packetizing Error Detection
CS 325: CS Hardware and Software Organization and Architecture
Error Detection and Correction
Reliability and Channel Coding
Computer Architecture and Assembly Language
Error Detection and Correction
Transmission Errors Error Detection and Correction
Chapter 9: Data Link Control
Data Link Layer. Position of the data-link layer.
Presentation transcript:

Applied Algorithmics - week8 Networking Networking began its infancy in the mid -1960’s by the US Department of Defence (DoD). The original intention of networking was being developed to withstand a nuclear war. Telephone networks were to vulnerable and would terminate all conversations should a nuclear war occur. ARPA (Advanced Research Projects Agency) was created in response with the launching of Russian Sputnik in 1957. ARPA decided that a DoD network should be packet switched networked consisting of a subnet and host computers. Experimental network research was awarded to UCLA, UCSB, SRI and Univ. of Utah in 1969. These areas were chosen because they all had a large number of ARPA contracts. 10/02/2018 Applied Algorithmics - week8

Applied Algorithmics - week8 Networking These 4 universities also had different and completely incompatible host computers. ARPANET protocols were not suitable for running over multiple networks, so TCP/IP model and protocols were invented in 1974. ARPA awarded several other contracts and specifically University of California at Berkeley to integrate the protocols with the Berkeley UNIX operating system. Berkeley developed a convenient program interface to the network and wrote many applications, utility, and management programs to make networking easier. In it early infancy, the OSI protocols were crushed and the TCP/IP protocols were already in widespread use. The OSI Model had seven layers because at the time, IBM had a propriety seven-layer protocol called SNA (Systems Network Architecture). 10/02/2018 Applied Algorithmics - week8

OSI-ISO 7-layer reference model The OSI model divides the functions of a protocol into a series of layers. Each layer has the property that it only uses the functions of the layer below, and only exports functionality to the layer above. A system that implements protocol behavior consisting of a series of these layers is known as a protocol stack or simply a stack. Protocol stacks can be implemented either in hardware or software, or a mixture of both. Typically, only the lower layers are implemented in hardware, with the higher layers being implemented in software. 10/02/2018 Applied Algorithmics - week8

OSI-ISO 7-layer reference model This OSI model is roughly adhered to in the computing and networking industry. Its main feature is in the interface between layers which dictates the specifications on how one layer interacts with another. This means that a layer written by one manufacturer can operate with a layer from another (assuming that the specification is interpreted correctly). These specifications are typically known as Requests for Comments or (RFCs) in the TCP/IP community. They are ISO standards in the OSI community. 10/02/2018 Applied Algorithmics - week8

OSI-ISO 7-layer reference model 10/02/2018 Applied Algorithmics - week8

OSI-ISO 7-layer reference model - data encapsulation 10/02/2018 Applied Algorithmics - week8

OSI-ISO 7-layer reference model Messages Messages Segments Transport layer Transport layer Network service Network service Network layer Network layer Network layer Network layer End system a Data link layer Data link layer Data link layer Data link layer End system b Physical layer Physical layer Physical layer Physical layer 10/02/2018 Applied Algorithmics - week8

Transmission errors in networks Transmission errors are caused by: thermal noise impulse noise signal distortion during transmission crosstalk voice amplitude signal compression quantization noise jitter receiver and transmitter out of synchronization 10/02/2018 Applied Algorithmics - week8

Applied Algorithmics - week8 Error detection Error detection is achieved via adding small but enough number of extra bits to deduce that there is an error but not enough bits to correct the error If only error detection is employed in a network transmission the retransmission process is triggered to recover the frame (data link layer) or the packet (network layer). At the data link layer, this is referred to as ARQ (Automatic Repeat reQuest). 10/02/2018 Applied Algorithmics - week8

Error detection and correction Error correction requires some number of additional (redundant) bits to deduce what the correct bits must have been. Example: Hamming Codes Superimposed codes (related to selectors) FEC = Forward Error Correction found in MPEG-4 and others 10/02/2018 Applied Algorithmics - week8

Error detection and correction Hamming codes: Codewords in Hamming (error detecting and error correcting) codes consist of m data bits and r redundant bits. Hamming distance between two strings represents the number of bit positions on which two bit patterns differ (mismatches). relative Hamming distance refers to the ratio between the Hamming distance and the length of compared sequences Hamming distance of the code is determined by the two codewords whose Hamming distance is the smallest. error detection involves determining if codewords in the received message match closely enough legal codewords. 10/02/2018 Applied Algorithmics - week8

Error detection and correction A code with poor distance properties (b) A code with good distance properties x o x o code distance x = codewords o = non-codewords 10/02/2018 Applied Algorithmics - week8

Error detection and correction To detect properly d single bit errors, one needs to apply a d+1 code distance. To correct properly d single bit errors, one needs to apply a 2d+1 code distance. In general, the price for redundant bits is too expensive (!!) to do error correction for all network messages Thus safety and integrity of network communication is based on error detecting codes and extra transmissions in case any errors were detected 10/02/2018 Applied Algorithmics - week8

Error-Detection System using Check Bits Received information bits Information bits Recalculate check bits Channel Calculate check bits Compare Received check bits Information accepted if check bits match Check bits 10/02/2018 Applied Algorithmics - week8

Cyclic Redundancy Checking (CRC) cyclic redundancy check (CRC) is a popular technique for detecting data transmission errors. Transmitted messages are divided into predetermined lengths that are divided by a fixed divisor. According to the calculation, the remainder number is appended onto and sent with the message. When the message is received, the computer recalculates the remainder and compares it to the transmitted remainder. If the numbers do not match, an error is detected. 10/02/2018 Applied Algorithmics - week8

Error detection -- via parity of subsets of bits Note Check bits occupy power of 2 slots 12345678 …. 10/02/2018 Applied Algorithmics - week8

Detection via parity of subsets of bits Consider 4 bit words. Add 3 parity bits. D3D2D1D0 P2P1P0 1 1 ? ? ? Each parity bit computed on a subset of bits P2= D3 xor D2 xor D1 = 0 xor 1 xor 1 = 0 P1 = D3 xor D2 xor D0 = 0 xor 1 xor 0 = 1 P0= D3 xor D1 xor D0 = 0 xor 1 xor 0 = 1 Use this word bit arrangement D3D2D1P2D0P1P0 1 1 1 1 Check bits occupy power of 2 slots! 10/02/2018 Applied Algorithmics - week8

Detection via parity of subsets of bits - no error occurred D3D2D1P2D0P1P0 First, we send: No error occurred. But how do we know that? 1 1 1 1 Later, someone gets: D3D2D1P2D0P1P0 1 1 1 1 And computes: B2= P2 xor D3 xor D2 xor D1 = 0 xor 0 xor 1 xor 1 = 0 If all B2,B1,B0 = 0 B1= P1 xor D3 xor D2 xor D0 = 1 xor 0 xor 1 xor 0 = 0 there are no errors! B0= P0 xor D3 xor D1 xor D0 = 1 xor 0 xor 1 xor 0 = 0 These equations come from how we computed: P2= D3 xor D2 xor D1 = 0 xor 1 xor 1 = 0 P1 = D3 xor D2 xor D0 = 0 xor 1 xor 0 = 1 P0= D3 xor D1 xor D0 = 0 xor 1 xor 0 = 1 10/02/2018 Applied Algorithmics - week8

Detection via parity of subsets of bits - single bit is twisted D3D2D1P2D0P1P0 What if a cosmic ray hit D1? How would we know that? First, we send: 1 1 1 1 D3D2D1P2D0P1P0 Later, someone gets: 1 1 1 And computes: B2= P2 xor D3 xor D2 xor D1 = 0 xor 0 xor 1 xor 0 = 1 B2B1B₀ = 101 = 5 B1= P1 xor D3 xor D2 xor D0 = 1 xor 0 xor 1 xor 0 = 0 And what does 101= 5 mean? B0= P0 xor D3 xor D1 xor D0 = 1 xor 0 xor 0 xor 0 = 1 7 6 5 4 3 2 1 The position of the flipped bit! To repair, just flip it back We number the least significant bit with 1, not 0! 0 is reserved for “no errors”. D3D2D1P2D0P1P0 1 1 1 10/02/2018 Applied Algorithmics - week8

Detection via parity of subsets of bits - magic trick revealed For any 4 bit word we add 3 parity bits D3D2D1D0 P2P1P0 1 1 ? ? ? Observation: The parity bits need to encode “no error” scenario, plus a number for each bit (both data and parity bits) For p parity bits and d data bits: d + p + 1 ≤ 2p 10/02/2018 Applied Algorithmics - week8

Detection via parity of subsets of bits - magic trick revealed For any 4 bit word we add 3 parity bits D3D2D1D0 P2P1P0 Question: Why do we arrange bits? Start by numbering, 1 to 7. 7 6 5 4 3 2 1 D3 D1 D0 P0 With this order, an odd parity means an error in 1,3,5, or 7. So, P0 is the right parity bit to use: D3D2 D0P1P₀ D3D2D1P2₁P₀ etc ... each bit narrows down the suspect bits, until it is certain. D3D2D1P2D0P1P0 An odd parity means a mistake must be in 2, 3, 6, or 7 -- the four numbers possible if P1 = 1! 10/02/2018 Applied Algorithmics - week8

Detection via parity of subsets of bits - magic trick revealed For any 4 bit word we add 3 parity bits D3D2D1D0 P2P1P0 P2 = D3 xor D2 xor D1 P1 = D3 xor D2 xor D0 P₀ = D3 xor D1 xor D0 D₃D₂D₁P₂D₀P₁P₀ 7 bits can code 128 numbers, but only 16 of these numbers are legal. 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 0 0 1 0 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 1 0 1 0 0 1 0 0 1 0 1 1 1 0 0 1 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 It takes 3 bit flips to move from one legal number to another (for all 16 numbers) If only one bit flips, we can always figure out the “closest” legal number, and correct the number. 10/02/2018 Applied Algorithmics - week8