Data Link Layer What does it do?

Slides:



Advertisements
Similar presentations
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Advertisements

EIE325: Telecommunication TechnologiesMaciej J. Ogorza ł ek, PolyU, EIE Telecommunication Technologies Week 8 Flow Control Error Control.
William Stallings Data and Computer Communications 7th Edition
Chapter 3: The Datalink Layer CS 455/555. Topics to be covered Design Issues Error detection and correction Elementary datalink protocols Sliding window.
8-Reliability and Channel Coding Dr. John P. Abraham Professor UTPA.
Chapter 6 Errors, Error Detection, and Error Control.
Chapter 7 – Data Link Control Protocols
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
EEC-484/584 Computer Networks Lecture 8 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 12 Introduction to Computer Networks.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 13 Introduction to Computer Networks.
The Data Link Layer Chapter 3. Position of the data-link layer.
The OSI Reference Model
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 11 Introduction to Computer Networks.
1 K. Salah Module 4.0: Data Link Layer The Logical Link Control (LLC) sublayer –Framing –Flow Control –Error Control The Media Access Control (MAC) sublayer.
CMPE 150 – Winter 2009 Lecture 6 January 22, 2009 P.E. Mantey.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Error Control.
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
Aegis School of Telecommunication Chapter 7 Data Link Control Protocols Telecom Systems I by Dr. M. G. Sharma, Phd.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Data Link Layer - 1 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
Chapter 3 THE DATA LINK LAYER
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 14.
Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control.
1 Transport Layer Lecture 10 Imran Ahmed University of Management & Technology.
THE DATA LINK LAYER Chapter 3 1. H YBRID M ODEL The hybrid reference model to be used in this book. 2.
Chapter 3 The Data Link Layer (60 % practical part)
ECE453 – Introduction to Computer Networks Lecture 4 – Data Link Layer (I)
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
Eighth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data Link Control Protocols need layer of logic above Physical to manage exchange.
Data Link Layer: Data Link Control : Data Communication and Computer Networks Asst. Prof. Chaiporn Jaikaeo, Ph.D.
Error Correction and Flow Control Martin Weiss. Slide 2 Objectives of this Meeting u Describe different flow control techniques u Describe the major error.
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.
Data Link Layer. Link Layer The data unit to be transmited at the link layer is called a frame. Why link layer? How can it know where a frame begins and.
NET 221D : COMPUTER NETWORKS FUNDAMENTALS LECTURE 4: DATA LINK LAYER Behrouz A. Forouzan” Data communications and Networking 1.
1 The Data Link Layer A. S. Tanenbaum Computer Networks W. Stallings Data and Computer Communications Chapter 3.
Chapter 9: Data Link Control Business Data Communications, 4e.
Data Link Layer.
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lec # 15.
Coding and Error Control
Computer Communication & Networks
Chapter 3 The Data Link Layer.
Chapter 9: Data Link Control
Data Link Layer Flow Control.
Part III Datalink Layer 10.
Net 221D : Computer Networks Fundamentals
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Data Link Layer.
Data link layer (LLC).
Chap. 4 Data link layer 2.
Chapter 3 – Part 1 The Data Link Layer.
Data Link Layer: Data Link Control
Net 221D : Computer Networks Fundamentals
Overview Jaringan Komputer (2)
CS412 Introduction to Computer Networking & Telecommunication
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad.
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
Error detection: Outline
Chapter 9: Data Link Control
Data Link Layer. Position of the data-link layer.
Presentation transcript:

Data Link Layer What does it do? What functions it performs? Typically: Handling transmission errors. Error control. Flow control. Framing.

Framing

The DDL and PHY The Physical Layer delivers raw sequence of bits. Unreliable service. The Data Link Layer must detect and, in some cases, correct errors.

DLL’s Error Control Break bit stream into frames. Check if frames arrived correctly. If not: Discards frame. In some cases also request retransmission.

Framing: Using Counters (a) Without errors. (b) With one error.

Framing: Flag Byte Each frame starts and ends with special bytes: flag bytes. Two consecutive flag bytes indicate end of frame and beginning on new frame. What if flag bit pattern occurs in data?

Byte Stuffing

Byte Stuffing (Cont’d) Single ESC: part of the escape sequence. Doubled ESC: single ESC is part of data. De-stuffing. Problem: What if character encoding does not use 8-bit characters?

Bit Stuffing Allows character codes with arbitrary bits per character. Each frames begins and ends with special pattern. Example: 01111110. When sender’s DLL finds 5 consecutive 1’s in data stream, stuffs 0. When receiver sees 5 1’s followed by 0, de-stuffs.

Bit Stuffing: Example (a) Original data. (b) Data as they appear on the line. (c) Data after de-stuffing.

Error Control Reliable delivery. Detecting errors. Hop-by-hop! Detecting errors. Detecting and correcting errors.

Acknowledgments Special control info (in the case of the DLL, control frame) acknowledging receipt of data. Positive and negative ACKs. ACKs. NACKs. Are ACKs sufficient?

Reliable Delivery Timers. Retransmission. Duplicate detection

Flow Control Handles mismatch between sender’s and receiver’s speed. Receiver’s buffer limitation. Feedback-based flow control. Explicit permission from receiver. Rate-based flow control. Implicit mechanism for limiting sending rate. DLL typically uses feedback-based flow control.

Error Detection and Correction Add control information to the original data being transmitted. Error detection: enough info to detect error. Need retransmissions. Error correction: enough info to detect and correct error. forward error correction (FEC).

What’s an error? Frame = m data bits + r bits for error control. n = m + r. Given the original frame f and the received frame f’, how many corresponding bits differ? Hamming distance (Hamming, 1950).

Hamming Distance: Examples

Parity Bit Simple error detecting code. Even- or odd parity. Example: Transmit 1011010. Add parity bit 1011010 0 (even parity) or 1011010 1 (odd parity). Code with single parity bit has Hamming distance of 2! Any single bit error produces frame with wrong parity.

Hamming Code Bits in positions that are power of 2 are check bits. The rest are data bits. Each check bit used in parity (even or odd) computation of collection of bits. Example: check bit in position 11, checks for bits in positions, 11 = 1+2+8. Similarly, bit 11 is checked by bits 1, 2, and 8.

Hamming Code: Example

Error Detecting Codes Typically used in reliable media. Examples: parity bit, polynomial codes (CRC, or Cyclic redundancy Check).

CRC Checksum appended to frame being transmitted. Resulting polynomial divisible by G(x). When receiver gets checksummed frame, it divides it by G(x). If remainder, then error!

Cyclic Redunancy Check At Transmitter, with M = 1 1 1 0 1 1, compute 2rM= 1 1 1 0 1 1 0 0 0 with G = 1 1 0 1 T = 2rM + R [note G starts and ends with “1” ]  R = 1 1 1 Transmit T= 1 1 1 0 1 1 1 1 1

Cyclic Redundancy Check At the Receiver, compute Note remainder = 0  no errors detected

Flow + Error Control How do Layer 2 protocols implement them? What’s a frame? F H Payload T F What’s F? . What’s in T? . What’s in H?

Header and Trailer Trailer typically has checksum. How is it used/processed? Header has: type, sequence number, and ack.

Stop-and-Wait Simplest form of flow control. How does it work? (assume error-free channel) (1) Send 1 frame; (2) Wait for ACK. (3) Go to 1. Poor link utilization. High data rates. Long propagation delay.

ARQ Protocols Automatic Repeat Request. Protocols that wait for ACK before sending more data. ACKs now are used for flow AND error control. What can happen? At receiver: frame arrives correctly, frame arrives damaged, frame does not arrive. At sender: ACK arrives correctly, ACK arrives damaged, ACK does not arrive.

ARQ Protocols Sender: Send frame 0. Start timer. Receiver: **Waits for frame. If frame arrives, check if correct sequence number. Then send ACK for that frame. Go to (**) Sender: Send frame 0. Start timer. If ACK 0, arrives, send frame 1. If timeout, re-send frame 0.

Simplex versus Duplex Transmission Send data in one channel and control in another channel. Duplex: Send data and control on the same chanel.

Can we do better? Can we do better? Piggybacking. Bi-directional transmission. Wait for data packet and use that to piggyback the ACK. Use ACK field: only a few additional bits in the header. But, how long should Layer 2 wait to send an ACK? ACK timers!

Sliding Window Protocols Window: number of “outstanding” frames at any given point in time. Every ACK received, window slides…

Sliding Window: Basics Allows multiple frames to be in transit at the same time. Receiver allocates buffer space for n frames. Transmitter is allowed to send n (window size) frames without receiving ACK. Frame sequence number: labels frames.

Sliding Window: Receiver Receiver ack’s frame by including sequence number of next expected frame. Cumulative ACK: ack’s multiple frames. Example: if receiver receives frames 2,3, and 4, it sends an ACK with sequence number 5, which ack’s receipt of 2, 3, and 4.

Pipelining Go Back N Selective Repeat