CSE123A discussion session

Similar documents
CSE123A discussion session

Chapter 3. The Data Link Layer

Lecture / The Data Link Layer: Framing and Error Detection

Where we are in the Course

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

CSE 461: Framing, Error Detection and Correction

CSE 123: Computer Networks

Ch. 7 Error Detection and Correction

CS321: Computer Networks Error Detection and Correction

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

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

Lecture 5: Data Link Layer Basics

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

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

The Data Link Layer. Data Link Layer Design Issues

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

Data Link Layer. Srinidhi Varadarajan

The Data Link Layer Chapter 3

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

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

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

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

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

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

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

Link Layer: Error detection and correction

The Data Link Layer Chapter 3

Inst: Chris Davison

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

Chapter 10 Error Detection and Correction 10.1

CS422 Computer Networks

CSE 123A Computer Networks

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

Data Link Layer Overview

Data Link Layer Overview

ENEE x Digital Logic Design. Lecture 3

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

Data Link Layer (1) Networked Systems 3 Lecture 6

Data Link Layer Overview

CSCI-1680 Link Layer I Rodrigo Fonseca

Some portions courtesy Robin Kravets and Steve Lumetta

Networking Link Layer

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

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

ECE 333: Introduction to Communication Networks Fall Lecture 6: Data Link Layer II

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

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

COMPUTER NETWORKS UNIT-3

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

CSCI-131 Networking: the End-to-End Layer. Rodrigo Fonseca March 12 th, 2013

Introduction to Computer Networks. 03 Data Link Layer Introduction

4. Error correction and link control. Contents

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.

Introduction to Data Communications & Networking

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 123: Computer Networks

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

Data Link Layer Overview

DATA LINK LAYER UNIT 7.

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

06/05/2008. Chapter 3. The Data Link Layer. Data Link Layer Design Issues. Services Provided to the Network Layer. Error Control Flow Control

Computer Networks. Shyam Gollakota

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

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

(Refer Slide Time: 2:20)

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

CSEP 561 Error detection & correction. David Wetherall

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

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

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

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

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

Chapter 3. The Data Link Layer

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

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

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

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

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

Computer Networking. Lecture 4 - Coding and Error Control

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

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

CSCI-1680 Link Layer Reliability John Jannotti

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

Data Link Layer: Overview, operations

Computer and Network Security

UNIT IV -- TRANSPORT LAYER

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

From Signals to Packets Computer Networking. Link Layer: Implementation. Datalink Functions. Lecture 5 - Coding and Error Control

Links. CS125 - mylinks 1 1/22/14

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

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

Chapter 3 The Data Link Layer

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

INF Data Communication Data Link Layer

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

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

CS 4453 Computer Networks Winter

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

Transport Layer Review

Transcription:

CSE123A discussion session 2007/02/02 Ryo Sugihara Review Data Link layer (1): Overview Sublayers End-to-end argument Framing sublayer How to delimit frame» Flags and bit stuffing Topics Data Link Layer (2): Error detection sublayer Parity bit Hamming distance CRC Modulo-2 arithmetic 1

Where are we now? Today s topic Sublayers Who sends next? Detect errors Required Make frames 2

End-to to-end argument About where to implement end-to-end functionality J. Saltzer, D. Reed, and D. Clark, End-to-end Arguments in System Design. ACM Transactions on Computer Systems (TOCS), Vol. 2, No. 4, pp. 195-206, 1984 Points 1. Functions should be provided close to the application that uses the function i.e. Higher level in the network stack Why?: Function provided at low levels tends to bring unnecessary redundancy» Because it can never be perfect; only possible at higher level 2. Low level mechanisms to support them are worthwhile only for improving performance Most applicable to Reliable transfer Network security End-to to-end argument: Error Recovery End-to-end error recovery is required Data Link error recovery cannot be perfect Routers may fail Anyway, Transport layer protocols (e.g. TCP) must work on both unreliable and reliable Data Links Error recovery needs to be implemented in Transport layer again But Data Link error recovery may improve performance Fewer end-to-end retransmissions... or may not Especially when PHY layer has very low bit error rates Reasons: ACK packets use bandwidth Need to buffer the frames until receiving ACK 3

End-to to-end argument: in practice Based on End-to-end argument, Data Link layer does not need to be very reliable Not quite true... Memo Prob. of false negative (in DL layer) should be very small (BTW, no false positives if we use parity/crc) i.e. Data Link layer should provide quasi-reliable frame pipe Why? End-to-end error recovery is often ignored (in TCP & applications) ex.) File download Two kinds of error Detect error in uncorrupted frame ( False positive ) Fail to detect error in corrupted frame ( False negative ) Do you check md5 checksum? Bit sequence Frame Framing sublayer Why do we need framing? To add extra info ( header ) e.g.) Destination address, CRC checksum Manageable unit for error detection/recovery Localize the damage to small region 4

How to distinguish a frame?: 3 methods Flags and Bit stuffing Framing Use special bit patterns (= flag ) to delimit frame Use bit stuffing to encode data s.t. flag does not appear in the data Start flags and character count In addition to start flag, use bit count (=size of frame) to indicate the end of frame Special symbol supplied by PHY layer e.g.) F, in addition to 0 and 1 Flags and Bit stuffing Design by sublayering 0111110 0111110 01110110 01110110 011110 01110110 011110 011110 01110110 011110 ex.) Frame data = 0111110, Flag = 011110 stuffing rule: add 0 immediately after three consecutive 1s (destuffing rule: remove 0 immediately after three consecutive 1s ) 5

It can be tricky, though Choosing a good flag Determining correct bit stuffing rule Flags and Bit stuffing 3 different cases for spurious flag 1. In data Easily avoided 2. In stuffed data ex.) Flag = 0111, Stuffing rule: Add 0 after 011 Data = 011111 stuffed data = 0110111 3. On the boundary between data and end flag ex.) Flag = 010101 stuffed data = 001 transmitted data = 010101 001 010101 Error detection sublayer Why? Because we want to dispose corrupted frames Remember the argument in quasi-reliability How? Add some redundant bits to messages Parity bit, CRC checksum Use that redundancy to detect errors It s all about coding Coding theory Terminology: (probably not very standard) Message is encoded into codeword Sender sends a codeword and receiver receives received bitstring Due to noise, codeword may or may not be identical to received bitstring 6

Parity bit 1 bit to mean parity (even/odd) of the number of 1s in the message As a result, there are even number of 1s in any codeword Examples: 3bit message + parity bit (= 4bit codeword) message = 000 codeword = 0000 010 0101 110 1100 Every odd number bit error can be detected ex) message = 000, codeword = 0000 If you receive 0100 (1bit error) or 0111 (3bit error), you can say they are corrupted, because number of 1s is odd. However, if you receive 0101 (2bit error) or 1111 (4bit error), there s no way to tell if they are corrupted or not (Assume noise only causes bit flipping) Definition (from wikipedia: Hamming distance) Hamming distance Hamming distance between two strings of equal length is the number of positions for which the corresponding symbols are different i.e. Number of substitutions required to change one into the other Examples Hamming dist. between 0000 and 1001 is 2 Hamming dist. between 0101 and 1010 is 4 7

Error correction/detection capability Minimum Hamming dist between any two codewords determines error correction/detection capability Undetected error happens ONLY when one codeword is received as another one due to noise If minimum Hamming dist between codewords is n, any errors up to (n-1)bit can be detected (As of now, forget about correction) Example Parity bit: min(hamming dist.) = 2 i.e. Every codeword is different from any other codewords in at least two bit positions Thus we can detect any 1 bit errors CRC (Cyclic redundancy check) Much stronger than parity bit CRC-32 adds 32bits to the message and detects Any odd number bit errors same as parity bit Any burst errors up to 32bits and many larger bit errors, with high probability Basic idea Make all codeword divisible by G ( generator ) If a received bitstring is not divisible by G, it s corrupted How? By subtracting the remainder of division ex) msg=45, G=7: 45 % 7 = 3, so (45-3) is divisible by 7 In CRC, everything s done in modulo-2 arithmetic, though 8

No carries in addition ex.) 1+1=0, 11111+11111=00000 Subtraction is same as addition ex.) 11-10 = 01, 11+10 = 01 Modulo-2 arithmetic Multiplication is normal (but no carries) ex.) 1101 * 101 = 11011 Division is NOT normal Always remove MSB (Most significant bit) ex.) 101000 = 1101 * 110 + 110 i.e. quotient = 110, remainder = 110 When divider is r bit, remainder is (r-1) bit 1101 x 101 1101 1101 x 111001 110 1101)101000 1101 1110 1101 0110 BACKUP 9