Data Link Layer. Srinidhi Varadarajan

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

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

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

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

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

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

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

Ch. 7 Error Detection and Correction

CSE 123A Computer Networks

CS321: Computer Networks Error Detection and Correction

Some portions courtesy Robin Kravets and Steve Lumetta

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

Links. CS125 - mylinks 1 1/22/14

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

CSE 461: Framing, Error Detection and Correction

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

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

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

4. Error correction and link control. Contents

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

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

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

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

CSCI-1680 Link Layer Reliability John Jannotti

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

LECTURE #34. Data Communication (CS601)

Introduction to Computer Networks. 03 Data Link Layer Introduction

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

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

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

CSE 123: Computer Networks

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

Chapter 10 Error Detection and Correction 10.1

CSCI-1680 Link Layer I Rodrigo Fonseca

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

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

Data Link Layer (1) Networked Systems 3 Lecture 6

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 Control. Surasak Sanguanpong Last updated: 11 July 2000

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

Lecture 5: Data Link Layer Basics

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

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

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

DATA LINK LAYER UNIT 7.

(Refer Slide Time: 2:20)

CS422 Computer Networks

COMPUTER NETWORKS UNIT-3

Chapter 3. The Data Link Layer

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

The Data Link Layer Chapter 3

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

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

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

Data Link Layer Overview

Link Layer: Error detection and correction

CSE123A discussion session

Data Link Layer Overview

CSE123A discussion session

Data Link Layer Overview

CSEP 561 Error detection & correction. David Wetherall

EE 6900: FAULT-TOLERANT COMPUTING SYSTEMS

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

Data Link Layer Overview

CSE 123: Computer Networks

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

Where we are in the Course

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

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

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

Networking Link Layer

Chapter 3 The Data Link Layer

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

Computer and Network Security

416 Distributed Systems. Errors and Failures, part 2 Feb 3, 2016

Lecture 26: Data Link Layer

The Data Link Layer Chapter 3

Inst: Chris Davison

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

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

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

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

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

Lecture / The Data Link Layer: Framing and Error Detection

Computer Networks. Shyam Gollakota

Data Link Layer: Overview, operations

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

Networked Systems and Services, Fall 2018 Chapter 2. Jussi Kangasharju Markku Kojo Lea Kutvonen

Computer Networking : Principles, Protocols and Practice

3. Data Link Layer 3-2

Achieving Reliable Digital Data Communication through Mathematical Algebraic Coding Techniques

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

Chapter 2. Data Representation in Computer Systems

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

5th Slide Set Computer Networks

UNIT I FUNDAMENTALS & LINK LAYER

Transmission SIGNALs

Fault-Tolerant Computing

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

Transcription:

Data Link Layer Srinidhi Varadarajan

Data Link Layer: Functionality The data link layer must: Detect errors (using redundancy bits) Request retransmission if data is lost (using automatic repeat request -- ARQ) Perform framing (detect packet start and end) Support initialization and disconnection operations

Data Link Layer These functions require that extra bits be added to the packet to be transmitted Header bits are added to the front of each each packet Trailer bits are added to the rear of each packet The header, packet from upper layer (service data unit), and trailer form a frame header service data unit trailer frame

Frame Format The packet from the upper layer is the service data unit (SDU) The frame (header, network layer packet, and trailer) is the protocol data unit (PDU) Note that the data link layer does not care what is in the network layer packet and the physical layer does not care what is in the frame generated by the data link layer header service data unit frame trailer

Error Detection Two types Error Detection Codes (e.g. CRC, Parity, Checksums) Error Correction Codes (e.g. Hamming, Reed Solomon) Basic Idea All bit combinations in a packet are valid 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

Single Parity Checks Technically used for 1 bit error detection. Can also detect any odd number of bit errors. Involves adding an extra parity bit to the bit string Two varieties: Even Parity Odd Parity Basic Idea: For even parity, make the total number of 1 s in the bit string an even number. This mechanism decides the value of the parity bit. Odd parity makes the number of 1 s odd instead of even. Single Parity cannot detect burst errors Burst errors cause errors in a sub-string of arbitrary length A burst error is as likely to cause an even number of errors as an odd number of errors

Two Dimensional Parity Parity bits 0101001 1 1101001 0 Data 1011110 1 0001110 1 0110100 1 1011111 0 Parity byte 1111011 0 Each byte is protected by a parity bit The entire frame is protected by a parity byte

Two-Dimensional Parity Checks Arrange a string of bits as a two-dimensional array and compute parity over each row and each column of the array Can detect Any number of errors in a single row (detect even number of errors with column parity) Any number of errors in a single column (detect even number of errors with row parity) Does it protect against everything? Answer is no. Why? Hint: Read between the lines. Single row or column What about burst errors Need something stronger. CRC codes

CRC Codes Burst errors are hard to model -- three parameters are typically used to measure the effectiveness of a code for error detection 1. Minimum distance of the code 2. Burst-detecting capability 3. Probability that a random string is accepted as being error-free

Cyclic Redundancy Check Treat the (n+1) bit message as a polynomial of degree n. The bits are the coefficients of the polynomial. 1101 = 1*x 3 + 1*x 2 + 0*x 1 + 1*x 0 Calculating CRC Sender and transmitter choose a divisor polynomial of degree k. e.g x 3 + x 2 + 1. Call this C(x) 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

CRC Computation Generator 1101 11111001 10011010000 Message 1101 1001 1101 1000 1101 1011 1101 1100 1101 1000 1101 101 Remainder C(x) = x 3 + x 2 + 1 M(x) = x 7 + x 4 + x 3 + x Subtraction: logical XOR operation

CRC Codes Note: The CRC is computed over the entire message, not a byte or a row/column. When a message+crc arrives at the destination, divide it by the generator polynomial. If the remainder is 0, the message is intact, else it has been corrupted. The bit pattern that can cause a CRC code to fail is not a regular pattern such a random error or burst errors. That s why CRCs are strong. Try out an example, where you try corrupting the CRC in the previous slide

Real World Example: Internet Checksum What s a checksum? Take a guess, check sum! Another error detection scheme Treat message as a sequence of 16-bit integers Add these integers together using 16-bit one s-complement arithmetic Take the one s complement of the result Resulting 16-bit number is the checksum

Example: Internet Checksum u_short cksum(u_short *buf, int count) { register u_long sum = 0; while (count--) { sum += *buf++; if (sum & 0xFFFF0000) { /* carry, so wrap around */ sum &= 0xFFFF; sum++; } } return ~(sum & 0xFFFF); }