Where we are in the Course

Similar documents
Where we are in the Course

Link Layer: Error detection and correction

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

Computer Networks. Shyam Gollakota

CSE 461: Framing, Error Detection and Correction

CSEP 561 Error detection & correction. David Wetherall

Where we are in the Course

The Data Link Layer Chapter 3

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

CSE 123A Computer Networks

Some portions courtesy Robin Kravets and Steve Lumetta

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

Lecture 5: Data Link Layer Basics

CSE123A discussion session

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

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

CSCI-1680 Link Layer I Rodrigo Fonseca

CSE 123: Computer Networks

The Data Link Layer. Data Link Layer Design Issues

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

The Data Link Layer Chapter 3

Chapter 3. The Data Link Layer

CS321: Computer Networks Error Detection and Correction

Lecture / The Data Link Layer: Framing and Error Detection

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

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

Introduction to Computer Networks. 03 Data Link Layer Introduction

Packet/Frame, Error Detection How to send data efficiently & reliably?

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

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

Inst: Chris Davison

Data Link Layer. Srinidhi Varadarajan

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

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

Computer and Network Security

Computer Networking. Lecture 4 - Coding and Error Control

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

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

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

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

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

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

Introduction to Data Communications & Networking

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

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

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

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

Chapter 10 Error Detection and Correction 10.1

CS422 Computer Networks

Networking Link Layer

Introduction to Computer Networks

Data Link Layer Overview

Data Link Layer Overview

Links. CS125 - mylinks 1 1/22/14

Lecture 2: Links and Signaling

From Signals to Packets Computer Networking. Link Layer: Implementation. Network Delay. 06-datalink.ppt, , Fall

Data Link Layer Overview

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

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

Data Link Layer Overview

Data Link Layer (1) Networked Systems 3 Lecture 6

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

Ch. 7 Error Detection and Correction

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

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

3. Data Link Layer 3-2

Chapter 5 Data-Link Layer: Wired Networks

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

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

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

CSE 123: Computer Networks

Chapter 3. The Data Link Layer

Fault Tolerance & Reliability CDA Chapter 2 Additional Interesting Codes

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

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

1/29/2008. From Signals to Packets. Lecture 6 Datalink Framing, Switching. Datalink Functions. Datalink Lectures. Character and Bit Stuffing.

Link Layer. (continued)

CS 4453 Computer Networks Winter

Lecture 6 Datalink Framing, Switching. From Signals to Packets

COMPUTER NETWORKS UNIT-3

Communication Fundamentals in Computer Networks

Chapter 3 The Data Link Layer

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

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

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

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

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.

Direct Link Networks. Framing. Lecture - Encoding & Framing 1. Problems. Areas for Discussion

CSCI-1680 Link Layer Reliability John Jannotti

5th Slide Set Computer Networks

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

SPM90 MODBUS PROTOCOL AND REGISTER LIST V1.0

(Refer Slide Time: 2:20)

CSN Telecommunications. 5: Error Coding. Data, Audio, Video and Images Prof Bill Buchanan

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

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

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

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

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

Data and Computer Communications. Protocols and Architecture

Transcription:

Link Layer

Where we are in the Course Moving on up to the Link Layer! Application Transport Network Link Physical CSE 461 University of Washington 2

Scope of the Link Layer Concerns how to transfer messages over one or more connected links Messages are frames, of limited size Builds on the physical layer How to transfer bits Frame CSE 461 University of Washington 3

In terms of layers Network Link Virtual data path Physical Actual data path CSE 461 University of Washington 4

In terms of layers (2) Network Link Virtual data path Physical Actual data path CSE 461 University of Washington 5

Typical Implementation of Layers (2) CSE 461 University of Washington 6

Topics 1. Framing Delimiting start/end of frames 2. Error detection and correction Handling errors 3. Retransmissions Handling loss 4. Multiple Access 802.11, classic Ethernet 5. Switching Modern Ethernet CSE 461 University of Washington 7

Framing Delimiting start/end of frames

Topic The Physical layer gives us a stream of bits. How do we interpret it as a sequence of frames? Um? 10110 CSE 461 University of Washington 9

Framing Methods We ll look at: Byte count (motivation) Byte stuffing Bit stuffing In practice, the physical layer often helps to identify frame boundaries E.g., Ethernet, 802.11 CSE 461 University of Washington 10

Byte Count First try: Let s start each frame with a length field It s simple, and hopefully good enough CSE 461 University of Washington 11

Byte Count (2) How well do you think it works? CSE 461 University of Washington 12

Byte Count (3) Difficult to re-synchronize after framing error Want a way to scan for a start of frame CSE 461 University of Washington 13

Byte Stuffing Better idea: Have a special flag byte value for start/end of frame Replace ( stuff ) the flag with an escape code Complication: have to escape the escape code too! CSE 461 University of Washington 14

Byte Stuffing Rules: Replace each FLAG in data with ESC FLAG Replace each ESC in data with ESC ESC CSE 461 University of Washington 15

Byte Stuffing Now any unescaped FLAG is the start/end of a frame CSE 461 University of Washington 16

Bit Stuffing Can stuff at the bit level too Call a flag six consecutive 1s On transmit, after five 1s in the data, insert a 0 On receive, a 0 after five 1s is deleted CSE 461 University of Washington 17

Bit Stuffing Example: Data bits Transmitted bits with stuffing CSE 461 University of Washington 18

Bit Stuffing So how does it compare with byte stuffing? Data bits Transmitted bits with stuffing CSE 461 University of Washington 19

Link Example: PPP over SONET PPP is Point-to-Point Protocol Widely used for link framing E.g., it is used to frame IP packets that are sent over SONET optical links CSE 461 University of Washington 20

Link Example: PPP over SONET (2) Think of SONET as a bit stream, and PPP as the framing that carries an IP packet over the link Protocol stacks PPP frames may be split over SONET payloads CSE 461 University of Washington 21

Link Example: PPP over SONET (3) Framing uses byte stuffing FLAG is 0x7E and ESC is 0x7D CSE 461 University of Washington 22

Link Example: PPP over SONET (4) Byte stuffing method: To stuff (unstuff) a byte add (remove) ESC (0x7D) and XOR byte with 0x20 Removes FLAG from the contents of the frame CSE 461 University of Washington 23

Error detection and correction Handling errors

Topic Some bits will be received in error due to noise. What can we do? Detect errors with codes Correct errors with codes Reliability is a concern that cuts across the layers CSE 461 University of Washington 25

Problem Noise may flip received bits Signal 1 1 0 0 0 0 0 1 Slightly Noisy 1 1 0 0 0 0 0 1 Very noisy 1 1 0 0 0 0 0 1 CSE 461 University of Washington 26

Approach Add Redundancy Error detection codes Add check bits to the message bits to let some errors be detected Error correction codes Add more check bits to allow correction of some errors Key issue is now to structure the code to detect many errors with few check bits and modest computation CSE 461 University of Washington 27

Ideas?

Motivating Example A simple code to handle errors: Send two copies! Error if differ from each other. How good is this code? How many bit errors can it detect? What is the minimum number of bit errors that could cause it to make a mistake? How many bit errors can it correct? CSE 461 University of Washington 29

Motivating Example We want to handle more errors with less overhead Will look at better codes But, they can t handle all errors And they focus on accidental errors (not an attacker - will look at secure hashes later) CSE 461 University of Washington 30

Using Error Codes Codeword consists of D data plus R check bits (=systematic block code) Data bits D Check bits R=fn(D) Sender: Compute R check bits based on the D data bits; send the codeword of D+R bits CSE 461 University of Washington 31

Using Error Codes Receiver: Receive D+R bits with unknown errors Recompute R check bits based on the D data bits; error if R doesn t match R Data bits Check bits D R R=fn(D) =? CSE 461 University of Washington 32

Intuition for Error Codes For D data bits, R check bits: All codewords of length D+R Correct codewords Randomly chosen codeword is unlikely to be correct; overhead is low CSE 461 University of Washington 33

Hamming Distance Distance is the number of bit flips needed to change D 1 to D 2 Hamming distance of a coding is the minimum distance between any pair of valid codewords How many bits must be flipped to turn one legal codeword into another? CSE 461 University of Washington 34

Hamming Distance Error detection: For a coding of distance d+1, up to d errors will always be detected Error correction: For a coding of distance 2d+1, up to d errors can always be corrected map to the closest valid codeword (there can be only one) CSE 461 University of Washington 35

Parity Bit - Simple Error Detection Take D data bits, add 1 check bit that is the sum of the D bits Sum is modulo 2 or XOR This is called even parity Overhead is one bit, not matter how big D is CSE 461 University of Washington 36

Parity Bit How well does parity work? What is the distance of the code? How many errors will it detect/correct? What happen if there are more errors? CSE 461 University of Washington 37

Checksums Like parity, number of check bits is independent of the amount of data 1500 bytes 16 bits Idea: sum up data in N-bit words Widely used in, e.g., TCP/IP/UDP Stronger protection than parity CSE 461 University of Washington 38

Internet Checksum Sum is defined in 1s complement arithmetic (must add back carries) And it s the negative sum The checksum field is the 16 bit one's complement of the one's complement sum of all 16 bit words RFC 791 CSE 461 University of Washington 39

Internet Checksum Sending: 1.Arrange data in 16-bit words 2.Put zero in checksum position, add 3.Add any carryover back to get 16 bits 4.Negate (complement) to get sum 0001 f204 f4f5 f6f7 +(0000) ------ 2ddf0 ddf0 + 2 ------ ddf2 220d CSE 461 University of Washington 40

Internet Checksum Sending: 1.Arrange data in 16-bit words 2.Put zero in checksum position, add 3.Add any carryover back to get 16 bits 4.Negate (complement) to get sum 0001 f204 f4f5 f6f7 +(0000) ------ 2ddf1 ddf1 + 2 ------ ddf3 220c CSE 461 University of Washington 41

Internet Checksum Receiving: 1. Arrange data in 16-bit words 2. Checksum will be non-zero, add 3. Add any carryover back to get 16 bits 4. Negate the result and check it is 0 0001 f204 f4f5 f6f7 + 220c ------ 2fffd fffd + 2 ------ ffff 0000 CSE 461 University of Washington 42

Internet Checksum Receiving: 1. Arrange data in 16-bit words 2. Checksum will be non-zero, add 3. Add any carryover back to get 16 bits 4. Negate the result and check it is 0 0001 f204 f4f5 f6f7 + 220c ------ 2fffd fffd + 2 ------ ffff 0000 CSE 461 University of Washington 43

Internet Checksum How well does the checksum work? What is the distance of the code? How many errors will it detect/correct? What about larger errors? CSE 461 University of Washington 44

Cyclic Redundancy Check (CRC) Even stronger protection Given n data bits, generate k check bits such that the n+k bits are evenly divisible by a generator C Example with numbers: n = 302, k = one digit, C = 3 CSE 461 University of Washington 45

CRCs The catch: It s based on mathematics of finite fields, in which bit strings represent polynomials e.g, 10011010 is x 7 + x 4 + x 3 + x 1 What this means: We work with binary values and operate using modulo 2 arithmetic CSE 461 University of Washington 46

CRCs Send Procedure: 1. Extend the n data bits with k zeros 2. Divide by the generator value C 3. Keep remainder, ignore quotient 4. Adjust k check bits by remainder Receive Procedure: 1. Divide and check for zero remainder CSE 461 University of Washington 47

CRCs Data bits: 1101011111 1 0 0 1 1 1 1 0 1 0 1 1 1 1 1 Check bits: C(x)=x 4 +x 1 +1 C = 10011 k = 4 CSE 461 University of Washington 48

CRCs CSE 461 University of Washington 49

CRCs Protection depend on generator Standard CRC-32 is 10000010 01100000 10001110 110110111 Properties: HD=4, detects up to triple bit errors Also odd number of errors And bursts of up to k bits in error Not vulnerable to systematic errors like checksums CSE 461 University of Washington 50