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

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

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

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

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

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

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

Lecture 7: Flow Control"

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

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

CSE 461: Framing, Error Detection and Correction

CSCI-1680 Link Layer I 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

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

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

CSCI-1680 Link Layer Reliability John Jannotti

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

CS321: Computer Networks Error Detection and Correction

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

Computer Networks. Shyam Gollakota

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

CSE 123A Computer Networks

4. Error correction and link control. Contents

CSE123A discussion session

Chapter 3. The Data Link Layer

Where we are in the Course

Some portions courtesy Robin Kravets and Steve Lumetta

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

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

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

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

CSE 123: Computer Networks

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

Data Link Layer. Srinidhi Varadarajan

Lecture 7: Flow & Media Access Control"

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

CSE 123: Computer Networks

Ch. 7 Error Detection and Correction

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

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

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

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

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

CS422 Computer Networks

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

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

Networking Link Layer

The Data Link Layer Chapter 3

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

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

Inst: Chris Davison

Computer and Network Security

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

CSE123A discussion session

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

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

Basic Reliable Transport Protocols

Link Layer: Error detection and correction

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

(Refer Slide Time: 2:20)

Links. CS125 - mylinks 1 1/22/14

Data Link Protocols. High Level Data. Control Protocol. HDLC Framing ~~~~~~~~ Functions of a Data Link Protocol. Framing PDUs. Addressing Destination

CS 43: Computer Networks. 16: Reliable Data Transfer October 8, 2018

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.

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

CSEP 561 Error detection & correction. David Wetherall

Introduction to Computer Networks. 03 Data Link Layer Introduction

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

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

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

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

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

CS 43: Computer Networks The Link Layer. Kevin Webb Swarthmore College November 28, 2017

COMPUTER NETWORKS UNIT-3

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

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

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

Data Link Layer: Overview, operations

DATA LINK LAYER UNIT 7.

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

Data Link Layer Overview

Outline. EEC-484/584 Computer Networks. Data Link Layer Design Issues. Framing. Lecture 6. Wenbing Zhao Review.

Jaringan Komputer. Data Link Layer. The Data Link Layer. Study the design principles

CS43: Computer Networks Reliable Data Transfer. Kevin Webb Swarthmore College October 5, 2017

Principles of Reliable Data Transfer

Data Link Layer Overview

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

Data Link Layer Overview

Overview. Internetworking and Reliable Transmission. CSE 561 Lecture 3, Spring David Wetherall. Internetworking. Reliable Transmission

Computer Networking. Lecture 4 - Coding and Error Control

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

Data Link Layer Overview

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

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

The Data Link Layer Chapter 3

Chapter 10 Error Detection and Correction 10.1

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

Fault-Tolerant Computing

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

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

Lecture 9: Internetworking

Transcription:

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

Lecture 6 Overview Finishing Error Detection Cyclic Remainder Check (CRC) Handling errors Automatic Repeat Request (ARQ) Acknowledgements (ACKs) and timeouts Stop-and-Wait 2

From Sums to Remainders Checksums are easy to compute, but very fragile In particular, burst errors are frequently undetected We d rather have a scheme that smears parity Need to remain easy to implement in hardware So far just shift registers and an XOR gate We ll stick to Modulo-2 arithmetic Multiplication and division are XOR-based as well Let s do some examples 3

Modulo-2 Arithmetic Multiplication Division 110 0000 0 00 101110 110 101110 110 111 110 011 000 110 4

Cyclic Remainder Check Idea is to divide the incoming data, D, rather than add The divisor is called the generator, g We can make a CRC resilient to k-bit burst errors Need a generator of k+1 bits Divide 2 k D by g to get remainder, r Remainder is called frame check sequence Send 2 k D r (i.e., 2 k D XOR r) Note 2 k D is just D shifted left k bits Remainder must be at most k bits Receiver checks that (2 k D-r)/g = 0 5

Error Detection CRC View data bits, D, as a binary number Choose r+1 bit pattern (generator), G Goal: choose r CRC bits, R, such that <D,R> exactly divisible by G (modulo 2) Receiver knows G, divides <D,R> by G. If non-zero remainder: error detected! Can detect all burst errors less than r+1 bits Widely used in practice (Ethernet, FDDI, ATM)

CRC: Rooted in Polynomials We re actually doing polynomial arithmetic Each bit is actually a coefficient of corresponding term in a k th - degree polynomial is (1 * X 3 ) + (1 * X 2 ) + (0 * X 1 ) + (1 * X 0 ) Why do we care? Can use the properties of finite fields to analyze effectiveness Says any generator with two terms catches single bit errors 7

CRC Example Encoding x 3 + x 2 + 1 = Generator x 7 + x 4 + x 3 + x = 1000 Message k + 1 bit check sequence g, equivalent to a degree-k polynomial Remainder D mod g 1000000 Message plus k zeros (*2 k ) 1001 1000 1011 1100 1000 101 Result: Transmit message followed by remainder: 1000101 8

CRC in Hardware 1 1 0 1 + + Key observation is only subtract when MSB is one Recall that subtraction is XOR No explicit check for leading one by using as input to XOR Hardware cost very similar to checksum We re only interested in remainder at the end Only need k registers as remainder is only k bits 9

CRC Example Decoding x 3 + x 2 + 1 = Generator x 10 + x 7 + x 6 + x 4 + x 2 + 1 = 1000101 Received Message k + 1 bit check sequence g, equivalent to a degree-k polynomial Remainder D mod g 1000101 Received 1001 1000 1011 1100 0 message, no errors Result: CRC test is passed 10

CRC Example Failure x 3 + x 2 + 1 = Generator x 10 + x 7 + x 5 + x 4 + x 2 + 1 = 1001001 Received Message k + 1 bit check sequence g, equivalent to a degree-k polynomial 1001001 Received message 1000 Two bit errors 1011 0101 Result: CRC test failed Remainder D mod g 11

Common Generators CRC-8 x 8 + x 2 + x 1 + 1 CRC-10 x 10 + x 9 + x 5 + x 4 + x 1 + 1 CRC-12 x 12 + x 11 + x 3 + x 2 + x 1 + 1 CRC-16 x 16 + x 15 + x 2 + 1 CRC-CCITT x 16 + x 12 + x 5 + 1 CRC-32 x 32 + x 26 + x 23 + x 22 + x 16 + x 12 + x 11 + x 10 + x 8 + x 7 + x 5 + x 4 + x 2 + x 1 + 1 12

Error Handling Summary Add redundant bits to detect if frame has errors A few bits can detect errors Need more to correct errors Strength of code depends on Hamming Distance Number of bitflips between codewords Checksums and CRCs are typical methods Both cheap and easy to implement in hardware CRC much more robust against burst errors 13

Picking up the Pieces Link layer is lossy We deliberately threw away corrupt frames last lecture Infrequent bit errors still lead to occasional frame errors» 10,000+ bits in each frame Things get even harrier if we consider multiple links In a few lectures, we ll start sending frames on long trips Each intermediate stop might lose, corrupt, reorder, etc. Regardless of cause, we ll call loss events drops We want to provide reliable, in-order delivery Can and will do this at multiple layers 14

Moving up the Stack host host HTTP Application Layer HTTP TCP Transport Layer TCP router router I P I P Network Layer I P I P Ethernet interface Ethernet interface SONET SONET interface Link Layer interface Ethernet interface Ethernet interface 15

Stepping back: A thought experiment You want to send a long letter to your friend The only medium available to either of you is postcards Postcards get lost in the mail, delayed, damaged, reordered How do you ensure that you friend receives the letter?

Reliable Transmission The data networking version of the same problem How do we reliably send a message when packets can be lost/corrupted in the network? Two options Detect a loss/corruption and retransmit Send data redundantly to tolerate loss/corruption

Simple Idea: ARQ Sender Receiver Sender Receiver Time Timeout Timeout T imeout Receiver sends acknowledgments (ACKs) Sender times out and retransmits if it doesn t receive them Basic approach is generically referred to as Automatic Repeat Request (ARQ) 18

Not So Fast Sender Receiver Sender Receiver Timeout Timeout Timeout Timeout Duplicate! Loss can occur on ACK channel as well Sender cannot distinguish data loss from ACK loss Sender will retransmit the data frame ACK loss or early timeout results in duplication The receiver thinks the retransmission is new data 19

Sequence Numbers Sender Receiver Sender Receiver Timeout Timeout Timeout Timeout Ignored! Sequence numbers solve this problem Receiver can simply ignore duplicate data But must still send an ACK! (Why?) Simplest ARQ: Stop-and-wait Only one outstanding frame at a time 20

What if packets are delayed? One bit not enough what to do? Never reuse a seq #? Seq #s could be really big Require in-order delivery? Hard to guarantee in some networks Prevent very late delivery? Limit lifetime of each packet (drop pkt if not delivered in n seconds) Seq #s not reused within delay bound Approximate with big seq #s Accept! Reject!

For Next Time Sliding Windows Read 2.6 in P&D Guest Lecture: Geoff Voelker HW #1 due (at beginning of class) 22