CSE 461: Framing, Error Detection and Correction

Slides:



Advertisements
Similar presentations
EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
Advertisements

10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CSE 461: Error Detection and Correction. Next Topic  Error detection and correction  Focus: How do we detect and correct messages that are garbled during.
Chapter 6 Errors, Error Detection, and Error Control.
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
CSCI 4550/8556 Computer Networks Comer, Chapter 7: Packets, Frames, And Error Detection.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
The Data Link Layer Chapter 3. Position of the data-link layer.
EE 122: Error detection and reliable transmission Ion Stoica September 16, 2002.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
1 ITC242 – Introduction to Data Communications Week 10 Topic 16 Data link control.
Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection.
Spring 2003CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Error Control.
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.
18-Aug-154/598N: Computer Networks Overview Direct link networks –Error detection - Section 2.4 –Reliable transmission - Section 2.5.
CSE331: Introduction to Networks and Security Lecture 3 Fall 2002.
Data Link Layer - 1 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.
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
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:
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
David Wetherall Professor of Computer Science & Engineering Introduction to Computer Networks Error Detection (§3.2.2)
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.
Spring 2001CS 5851 Outline Building Blocks Shannon’s Theorem Encoding 11. Physical Layer.
CHAPTER 3: DATA LINK CONTROL Flow control, Error detection – two dimensional parity checks, Internet checksum, CRC, Error control, Transmission efficiency.
Error Detection and Correction
David Wetherall Professor of Computer Science & Engineering Introduction to Computer Networks Error Coding Overview (§3.2)
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.
Data Link Layer. Link Layer The data unit to be transmited at the link layer is called a frame. Why link layer? How can it know where a frame begins and.
Coding and Error Control
CS4470 Computer Networking Protocols
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.
Reliable Transmission
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.
Data Link Layer.
Part III. Data Link Layer
Error Detection and Correction
Subject Name: COMPUTER NETWORKS-1
Communication Networks: Technology & Protocols
: An Introduction to Computer Networks
Where we are in the Course
Advanced Computer Networks
Chap. 4 Data link layer 2.
Data Link Layer What does it do?
Detecting and Correcting Bit Errors
CSCI-1680 Link Layer Reliability
Chapter 7 Error Detection and Correction
Reliable transmission
Point-to-Point Links Outline Encoding Framing Error Detection
Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad.
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
COMPUTER NETWORKS CS610 Lecture-5 Hammad Khalid Khan.
Error Detection and Correction
Transport Layer Outline Intro to transport UDP
Dr. Mozafar Bag-Mohammadi Ilam University
Error detection: Outline
EECS 122: EE122: Error Detection and Reliable Transmission
Data Link Layer. Position of the data-link layer.
Presentation transcript:

CSE 461: Framing, Error Detection and Correction

Next Topics Framing Focus: How does a receiver know where a message begins/ends Error detection and correction Focus: How do we detect and correct messages that are garbled during transmission? The responsibility for doing this cuts across the different layers Application Presentation Session Transport Network Data Link Physical

Framing Need to send message, not just bits Requires that we synchronize on the start of message reception at the far end of the link Complete Link layer messages are called frames Common approaches: Sentinels, lengths, clock-based Sentinels: Look for special control code that marks start of frame and escape or “stuff” this code within the data region Lengths: additionally, tell receiver how large the frame is going to be Clocks: agree on when frames ought to begin/end

Example: Point-to-Point Protocol (PPP) IETF standard, used for dialup and leased lines Flag is special and indicates start/end of frame Occurrences of flag inside payload must be “stuffed” Like an “escape” character: “  \” Replace 0x7E with 0x7D, 0x5E Replace 0x7D with 0x7D, 0x5D Problems? Why not use a length field? (0x7E) (header) (variable) (trailer) (0x7E)

Example: SONET Standard for long distance transmission over optical networks Base rate STS-1 of 51.84 Mbps STS-192 in use All packets are 125 μs long  start frame synch bytes just used for synchronization No character stuffing, no need for length field to find end of frames Why not always do things SONET style?

Error Detection and Redundancy Noise can flip some of the bits we receive We must be able to detect when this occurs! Who needs to detect it? (links/routers, OSs, or apps?) Basic approach: add redundant data Error detection codes allow errors to be recognized Error correction codes allow errors to be repaired too

Motivating Example A simple error detection scheme: Just send two copies. Differences imply errors. Question: Can we do any better? With less overhead Catch more kinds of errors Answer: Yes – stronger protection with fewer bits But we can’t catch all inadvertent errors, nor malicious ones We will look at basic block codes K bits in, N bits out is a (N,K) code Simple, memoryless mapping

The Hamming Distance Errors must not turn one valid codeword into another valid codeword, or we cannot detect/correct them. Hamming distance of a code is the smallest number of bit differences that turn any one codeword into another e.g, code 000 for 0, 111 for 1, Hamming distance is 3 For code with distance d+1: d errors can be detected, e.g, 001, 010, 110, 101, 011 For code with distance 2d+1: d errors can be corrected, e.g., 001  000

Parity Start with n bits and add another so that the total number of 1s is even (even parity) e.g. 0110010  01100101 Easy to compute as XOR of all input bits Will detect an odd number of bit errors But not an even number Does not correct any errors

2D Parity Add parity row/column to array of bits How many simultaneous bit errors can it detect? Which errors can it correct? 0101001 1 1101001 0 1011110 1 0001110 1 0110100 1 1011111 0 1111011 0

Checksums Used in Internet protocols (IP, ICMP, TCP, UDP) Basic Idea: Add up the data and send it along with sum Algorithm: checksum is the 1s complement of the 1s complement sum of the data interpreted 16 bits at a time (for 16-bit TCP/UDP checksum) 1s complement: flip all bits to make number negative Consequence: adding requires carryout to be added back

CRCs (Cyclic Redundancy Check) Stronger protection than checksums Used widely in practice, e.g., Ethernet CRC-32 Implemented in hardware (XORs and shifts) Algorithm: Given n bits of data, generate a k bit check sequence that gives a combined n + k bits that are divisible by a chosen divisor C(x) Based on mathematics of finite fields “numbers” correspond to polynomials, use modulo arithmetic e.g, interpret 10011010 as x7 + x4 + x3 + x1

CRC Example Extend message with k 0’s, when using a k-degree generator Divide message by generator (XOR) Discard result Subtract remainder from original message On reception, check that message is divisible by generator

How is C(x) Chosen? Mathematical properties: All 1-bit errors if non-zero xk and x0 terms All 2-bit errors if C(x) has a factor with at least three terms Any odd number of errors if C(x) has (x + 1) as a factor Any burst error < k bits There are standardized polynomials of different degree that are known to catch many errors Ethernet CRC-32: 100000100110000010001110110110111

Error Correction Two strategies to correct errors: Detect and retransmit, or Automatic Repeat reQuest. (ARQ) Error correcting codes, or Forward Error Correction (FEC) Retransmissions typically at higher levels (Network+). Why? Question: Which should we choose?

Retransmissions vs. FEC The better option depends on the kind of errors and the cost of recovery Example: Message with 1000 bits, Prob(bit error) 0.001 Case 1: random errors Case 2: bursts of 1000 errors Case 3: real-time application (teleconference)

ARQ: Stop-and-Wait Idea: transmit and wait for an ACK Sender sets a timer He retransmits if doesn’t hear an ACK before the timer expires What should the timeout be? Do we need sequence numbers? Efficiency? E.g., 1.5 Mbps link with 45ms RTT, 1500 byte frame  1500 * 8 / .045 = 267 Kbps

ARQ: Sliding Window Idea: have more than one outstanding packet LFS – LAR ≤SWS, LAF – LFR ≤ RWS How big should SWS and RWS be? Sequence numbers? Flow Control? Cumulative ACKS Selective ACKs? NACKs? Send Window Size Receive Window Size Last Acknowledged Received Last Frame Sent Last Frame Received Largest Acceptable Frame

FEC: Reed-Solomon / BCH Codes Developed to protect data on magnetic disks Used for CDs and cable modems too Property: 2t redundant bits can correct <= t errors Mathematics somewhat more involved …

Key Concepts Senders “frame” messages with sentinels, length fields, and clock synch, so receivers can determine where they start and end Redundant bits are added to messages to protect against transmission errors. Two recovery strategies are retransmissions (ARQ) and error correcting codes (FEC)