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

Similar documents
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

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

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

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

Data Link Layer. Srinidhi Varadarajan

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

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

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

CSCI-1680 Link Layer Reliability John Jannotti

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

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

CSE 461: Framing, Error Detection and Correction

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 2.

CSCI-1680 Link Layer I Rodrigo Fonseca

Networking Link Layer

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

Problem Statement. Physical and Data Link Layer Overview. Five Tasks Encoding. Make two computers talk to each other

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

The Transport Layer Reliability

L5: Building Direct Link Networks III. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

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

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

Direct Link Networks (II)

Direct Link Communication I: Basic Techniques. Data Transmission. ignore carrier frequency, coding etc.

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

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

Reliable Transmission

Lecture 7: Sliding Windows. CSE 123: Computer Networks Geoff Voelker (guest lecture)

Ch. 7 Error Detection and Correction

CSE 123: Computer Networks

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

Data Link Control. Surasak Sanguanpong Last updated: 11 July 2000

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

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

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

4. Error correction and link control. Contents

Lecture 7: Flow Control"

The Data Link Layer Chapter 3

CSE123A discussion session

Direct Link Communication I: Basic Techniques. Data Transmission. ignore carrier frequency, coding etc.

Transport Layer Marcos Vieira

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

CS321: Computer Networks Error Detection and Correction

Administrivia. FEC vs. ARQ. Reliable Transmission FEC. Last time: Framing Error detection. FEC provides constant throughput and predictable delay

Chapter 10 Error Detection and Correction 10.1

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

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

Principles of Reliable Data Transfer

Inst: Chris Davison

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

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

The data link layer has a number of specific functions it can carry out. These functions include. Figure 2-1. Relationship between packets and frames.

CSE 123: Computer Networks

Solutions for Chapter similar to 1 and 3

CPE 448/548 Exam #1 (100 pts) February 14, Name Class: 448

CPE 548 Exam #1 (50 pts) February 17, 2016

Data Link Control Protocols

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018

Data Link Layer: Overview, operations

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

Introduction to Computer Networks. 03 Data Link Layer Introduction

Telematics. 5rd Tutorial - LLC vs. MAC, HDLC, Flow Control, E2E-Arguments

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

Flow Control, and Congestion Control

COMPUTER NETWORKS UNIT-3

CS422 Computer Networks

The Data Link Layer Chapter 3

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

Reliable Byte-Stream (TCP)

Communications Software. CSE 123b. CSE 123b. Spring Lecture 3: Reliable Communications. Stefan Savage. Some slides couresty David Wetherall

CRC. Implementation. Error control. Software schemes. Packet errors. Types of packet errors

Computer Networks. Shyam Gollakota

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

UNIT I FUNDAMENTALS & LINK LAYER

CompSci 356: Computer Network Architectures. Lecture 4: Link layer: Encoding, Framing, and Error Detection Ref. Chap 2.2, 2.3,2.4

Lecture 7: Flow & Media Access Control"

COM-208: Computer Networks - Homework 3

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

a) Adding the two bytes gives Taking the one s complement gives

Data link layer functions. 2 Computer Networks Data Communications. Framing (1) Framing (2) Parity Checking (1) Error Detection

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

PROBLEMSAND EXERCISES

Chapter 3. The Data Link Layer

Links. CS125 - mylinks 1 1/22/14

DATA LINK LAYER UNIT 7.

CSEP 561 Error detection & correction. David Wetherall

End-to-End Protocols. End-to-End Protocols

2IC10 Computer Networks Assignments week 4

TCP. Sliding Windows, Flow Control, and Congestion Control. Networks : TCP Sliding Windows 1

Transport Layer TCP / UDP

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

Some portions courtesy Robin Kravets and Steve Lumetta

Protocol Principles. Framing, FCS and ARQ 2005/03/11. (C) Herbert Haas

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

INF Data Communication Data Link Layer

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

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

Data Link Layer (1) Networked Systems 3 Lecture 6

Transcription:

Error Detection Two types Error Detection Codes (e.g. CRC, Parity, Checksums) Error Correction Codes (e.g. Hamming, Reed Solomon) Basic Idea Add redundant information to determine if errors have been introduced Why redundant? Error Detection Codes Naïve scheme Send a duplicate copy of the message Problems Takes up too much space Poor performance. Can t even detect 2 bit errors Cyclic Redundancy Codes are common Two Dimensional Parity Data Parity byte Parity bits 0101001 1 001 0 1011110 1 0001110 1 000 1 1011111 0 111 0 Each byte is protected by a parity bit The entire frame is protected by a parity byte Internet Checksum Algorithm Used by IP and TCP Algorithm treats data as 16 bit unsigned quantities Add the data in the frame using 1 s complement arithmetic Take the one s complement of the result IP and TCP store the sum as a 32 bit unsigned integer Note: The example in the book uses a 16 bit checksum Cyclic Redundancy Check Treat the (n+1) bit message as a polynomial of degree n. The bits are the coefficients of the polynomial. = 1*x 3 + 1*x 2 + 0*x 1 + 1*x 0 Calculating CRC and transmitter choose a divisor polynomial of degree k. e.g x 3 + x 2 + 1 Add k bits to the (n+1) bit message such that the n+1+k bit message is exactly divisible by the divisor Choice of divisor is very important. It determines the kind of errors that the CRC can guard against. CRC Computation Given: Message: M(x) Divisor: C(x) Multiply M(x) by x k, i.e. add k zeroes to the end of the message. Call this T(x) Divide T(x) by C(x). Subtract the remainder from T(x) The result is the message including the CRC Title goes here 1

CRC Computation Generator 11111001 1000000 Message 1001 1000 1011 1100 1000 101 Remainder C(x) = x 3 + x 2 + 1 M(x) = x 7 + x 4 + x 3 + x Subtraction: logical XOR operation Reliable Transmission Why? corruption can be severe CRCs are not enough. Recall CRCs don t correct errors Two fundamental mechanisms Acknowledgment General idea is called ARQ (Automatic Repeat Request) Stop and Wait Protocol Stop and Wait: Possible Scenarios Simple operation Transmit a packet Wait for an acknowledgement () If no arrives within a preset time interval, assume that the packet is lost and retransmit Time (a) (c) Repeat the procedure until all packets have been successfully transmitted (b) (d) Performance problems? Performance Problems No more than one packet in flight. That s usually bad, here s why Take a 10Mbps network with a 50ms round trip time Delay bandwidth = 10 7 * 0.050 = 500 Kbits In Stop and Wait, only frame can be in flight. The max frame size is 1500 bytes Hence sending rate = 1500 * 8 0.050 = 240 Kbps This is much less than the link capacity of 10 Mbps Using the actual 10Mbps Ethernet RTT of 50us (roughly) Delay bandwidth = 10 7 * 50us = 500 bits In Stop and Wait, only frame can be in flight. The max Ethernet frame size is 1500 bytes Hence sending rate = 1500 * 8 50us = 240 Mbps This is much greater than the link capacity of 10 Mbps What happened?? Title goes here 2

Performance Analysis Performance Analysis Putting in numbers for 10 Mbps ethernet Packet size: 1518 bytes size: 64 bytes PROP: 51.2us Efficiency = 92.22% More believable! Moral: If frame size exceeds delay bandwidth product, efficiency computation should be used Significance of Delay Bandwidth Delay bandwidth represents the amount of data that has left the transmitter and is still on the cable. Sliding Window Protocols Think of the cable as a pipe. This keeps the pipe full Delay bandwidth also represents the upper bound on stability. More sophisticated ARQ algorithms try to match their sending rate to the dynamic delay bandwidth product Why is delay bandwidth dynamic? Keep the pipe full Send N packets before expecting the first Sliding Window Protocol Sliding Window Protocol Send out N frames, each with a linearly increasing sequence number uses 3 variables Send window size: Upper bound on uned frames LAR: Last received LFS: Last frame sent Invariant: LFS LAR SWS maintains 3 variables Receive window size: Upper bound on out of order frames received LAF: Largest acceptable frame LFR: Last frame (in sequence) received Invariant: LAF LFR RWS SWS RWS LAR LFS LFR LAF Title goes here 3

Operation sends send window size (number of) frames s last in sequence frame received. Error conditions: receives out of receive window frame it. Throw away the frame receives out of send window ack Old delayed. Throw it away Performance Improvements Negative N s frames that were not received Additional complexity. Loss of Ns, receiver timeout mechanism needed Selective : s specific frames. s are not inclusive can use this to detect out of order arrival and retransmit Efficiency = N TRANS Efficiency min, TRANS + + 2 * PROP 1 Increases linearly with N until it reaches 100 % Efficiency E.g.: Packet size = 2000 bits, = 80 bits Bandwidth = 155 Mbps ATM over fibre Cable length: 30 km = N 2000 Efficiency min, 2000 + 80 + 31000 1 N = 1; Eff = 5.95%; N = 16; Eff = 96.73% Window Size Settings Common modes RWS = 1, SWS = N does not buffer any out of order frames RWS = SWS = N can buffer as many frames as the sender sends. RWS > SWS? Finite Sequence Numbers Sequence numbers have a finite length. They increment by modulo arithmetic Cases: RWS = 1 MaxSeqNum >= SWS + 1 Why + 1 receives SWS, sends is lost, receiver expects wrong frame Title goes here 4

Finite Sequence Numbers RWS = SWS MaxSeq Number >= 2 * SWS Why? Hint: receiver is lost RWS < SWS MaxSeq Number >= max(sws + 1, 2 * RWS) How? Title goes here 5