Network Layer4-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.

Slides:



Advertisements
Similar presentations
5-1 Data Link Layer l Objective: to achieve reliable and efficient communication between 2 adjacent machines l Data link layer design issues n services.
Advertisements

The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Error Detection and Correction
Transmission Errors Error Detection and Correction
5-1 Link Layer: Introduction Some terminology: r hosts and routers are nodes r communication channels that connect adjacent nodes along communication path.
Error Detection and Correction
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
Error Detection and Correction
PART III DATA LINK LAYER. Position of the Data-Link Layer.
15 – Data link layer Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 12 Introduction to Computer Networks.
Transmission Errors1 Error Detection and Correction.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
The OSI Reference Model
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 11 Introduction to Computer Networks.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
Chapter 5 Link Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 20.
Chapter 2 : Direct Link Networks (Continued). So far... Modulation and Encoding Link layer protocols Error Detection -- Parity Check.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
7/2/2015Errors1 Transmission errors are a way of life. In the digital world an error means that a bit value is flipped. An error can be isolated to a single.
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
Transmission Errors Error Detection and Correction
3-1 Last time □ Finished introduction and overview: ♦ Network access and physical media ♦ Internet structure and ISPs ♦ Delay & loss in packet-switched.
Introduction 1 Lecture 23 Link Layer (Error Detection/Correction) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Part 1: Overview of the Data Link layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose,
COM342 Networks and Data Communications
Data Link Layer - 1 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Network Layer4-1 Lower limit on the number of check bits r We want to design a code m with m message bits and r check bits Allowing all single errors to.
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
Data and Computer Communications
Lecture 6: Framing and Error Detection-Data Link Layer Functions
4: DataLink Layer1 Chapter 4: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
Data Link Layer : Services, Framing, Error Detection and Correction2.
ECE453 – Introduction to Computer Networks Lecture 4 – Data Link Layer (I)
Layer Two Data Link Layer Collects bits from layer 1 and organizes into frames Passes bits that make up frames to layer 1 for transmission Concerned with.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
5: DataLink Layer5-1 Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields.
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Link Layer introduction,
5: DataLink Layer5-1 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-Layer Addressing.
COMPUTER NETWORKS Ms. Mrinmoyee Mukherjee Assistant Professor St. Francis Institute of Technology, Mount Poinsur, S.V.P Road, Borivli (west), Mumbai
Computer Networks Lecture 2: Data Link Based on slides from D. Choffnes Northeastern U. and P. Gill from StonyBrook University Revised Autumn 2015 by S.
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
Review.
5: DataLink Layer5a-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011 The Data Link Layer Chapter 3.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Error Correction/Detection.
Network Models. 2.1 what is the Protocol? A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow,
CS4470 Computer Networking Protocols
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Data Link Layer.
Cyclic Redundancy Check (CRC)
CIS 321 Data Communications & Networking
Data Link Layer What does it do?
Link Layer and LANs Its not about how hard you hit... It's about how hard you can get hit and keep moving forward 5: DataLink Layer.
EEC-484/584 Computer Networks
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Transmission Errors Error Detection and Correction
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
EEC-484/584 Computer Networks
Transmission Errors Error Detection and Correction
UNIT-II The Data Link Layer.
Data Link Layer: Overview; Error Detection
Data Link Layer. Position of the data-link layer.
Presentation transcript:

Network Layer4-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing a broadcast channel: multiple access m link layer addressing m reliable data transfer, flow control: done! r instantiation and implementation of various link layer technologies

Network Layer4-2 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-layer Addressing r 5.5 Ethernet r 5.6 Link-layer switches r 5.7 PPP r 5.8 Link virtualization: ATM, MPLS

Network Layer4-3 Link Layer Services r framing, link access: m encapsulate datagram into frame, adding header, trailer m channel access if shared medium m “MAC” addresses used in frame headers to identify source, dest different from IP address!

Network Layer4-4 Link Layer Services (more) r error detection: m errors caused by signal attenuation, noise. m receiver detects presence of errors: signals sender for retransmission or drops frame r error correction: m receiver identifies and corrects bit error(s) without resorting to retransmission

Network Layer4-5 Data link: usual approach r Usual approach m Data link breaks the bit stream up into discrete frames computes the checksum for each frame –This checksum is recomputed at the destination r Breaking bit stream up m Character count m Flag bytes with byte stuffing m Starting and ending flags with bit stuffing

Network Layer4-6 Framing r First method m Uses a field in the header specifying # characters r Trouble m Count can be garbled by a transmission error

Network Layer4-7 Framing (cont’d) r Starting and ending delimiters m => flag bytes r Flag byte pattern occurring in the data m => byte stuffing

Network Layer4-8 If an escape byte occurs in the middle of the data r A framing flag byte can be m Distinguished from one in the data By the absence or presence of an escape byte before it r If an escape byte occurs in data m It is stuffed with an escape byte m Example of byte sequences after stuffing Single escape byte => part of an escape sequence Double one => a single escape occurred in the data m In all cases, delivered byte sequence same as original

Network Layer4-9 Bit stuffing r Frame begins and ends with r If sender encounters 5 consecutive 1s m Sender stuffs a 0 bit into the outgoing bit stream m Receiver destuffs the 0 bit

Network Layer4-10 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-layer Addressing r 5.5 Ethernet r 5.6 Link-layer switches r 5.7 PPP r 5.8 Link Virtualization: ATM. MPLS

Network Layer4-11 Error detection and correction r Transmission errors are common on local loops m transmission errors are going to be with us for years r => need for error correcting or detecting codes m Error correcting codes include enough redundant information along with block of data –To enable receiver to deduce what transmitted data was –Suitable for channels that make many errors m Error detecting codes include only enough redundancy to allow –Receiver to deduce that an error occurred, not which error –Suitable for highly reliable channels

Network Layer4-12 Error correcting and detecting codes: terminology r A frame consists of m data bits m And r redundant, or check, bits => total length n = m + r m The n bit (data + check bits) => n-bit codeword r Hamming distance m The # bit positions in which 2 codewords differ Example: given and , –3 bits differ => hamming distance = 3

Network Layer4-13 Error correcting and detecting code: rules r To detect d errors, you need a distance d+1 code m Example: code in which single parity bit is appended The parity bit is chosen so that # of 1 bits is even (or odd) A code with single parity bit has a distance 2 –=> it can be used to detect single errors r To correct d errors, you need a distance 2d+1 code m Example: , , This code has a distance 5 => can correct double errors If arrives => original must have been

Network Layer4-14 Lower limit on the number of check bits r We want to design a code m with m message bits and r check bits Allowing all single errors to be corrected m This requirement becomes m This put a lower limit on the number of check bits Needed to correct a single error

Network Layer4-15 Error correcting code: Hamming code r A data bit in position k m is checked by just those check bits occurring in its expansion

Network Layer4-16 Use of Hamming code to correct burst errors

Network Layer4-17 Error detecting codes r Cyclic Redundancy Check (CRC) m is in widespread use, and called polynomial code treats bits as 0 and 1 coefficients of polynomials –For example: represents x 5 +x 4 + x 0 m Sender and receiver agree upon a generator polynomial G(x) To compute the checksum for some frame of m bits M(x) => append a checksum to the end of frame –such that polynomial is divisible by G(x) Receiver divides check-summed frame by G(x) –If there is a remainder => there has been an error

Network Layer4-18 Checksumming: Cyclic Redundancy Check r view data bits, D, as a binary number r choose r+1 bit pattern (generator), G r goal: choose r CRC bits, R, such that m exactly divisible by G (modulo 2) m receiver knows G, divides by G. If non-zero remainder: error detected! m can detect all burst errors less than r+1 bits r widely used in practice (Ethernet, WiFi, ATM)

Network Layer4-19 Algorithm for computing the checksum r Let r be the degree of G(x) m Append r zeros to the low-order end of the frame m => x r M(x) r Divide the bit string corresponding to G(x) m Into the bit string corresponding x r M(x) using Modulo 2 division r Subtract the remainder from x r M(x) m The result is the checksumed frame to be transmitted

Network Layer4-20 Error detecting codes: example Calculation of the polynomial code checksum.

Network Layer4-21 CRC Example Want: D. 2 r XOR R = nG equivalently: D. 2 r = nG XOR R equivalently: if we divide D. 2 r by G, want remainder R R = remainder[ ] D.2rGD.2rG