جلسه هشتم شبکه های کامپیوتری به نــــــــــــام خدا.

Slides:



Advertisements
Similar presentations
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 1 Chapter 3 The Data Link Layer user A user B reliable transmission over unreliable physical link.
Advertisements

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.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Lecture 12 Layer 2 – Data Link Layer Protocols
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
1 Lecture #12: Data Link Layer. Error Control. C o n t e n t s l Services Provided by DLL l DLL data structures l Error Control Mechanisms –Error correcting.
NETWORKING CONCEPTS. ERROR DETECTION Error occures when a bit is altered between transmission& reception ie. Binary 1 is transmitted but received is binary.
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
The Data Link Layer Chapter 3. Position of the data-link layer.
The OSI Reference Model
1 Part II: Packet Transmission Packets on a Network Packets, Frames, LAN, WAN, Hardware Addresses, Bridges, Switches, Routing and Protocols Fall 2005 Qutaibah.
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.
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.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Data link layer: services
Data and Computer Communications. The Data Link Layer.
Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,
Data Link Layer - 1 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
CS3502: Data and Computer Networks DATA LINK LAYER - 1.
TOBB ETÜ ELE46/ELE563 Communications Networks Lecture 01 May 6, 2014 Fall 2011 Tuesday 10:30 – 12:20 (310) Thursday 15:30 – 17:20 (372) İsrafil Bahçeci.
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
Part 2: Packet Transmission Packets, frames Local area networks (LANs) Wide area networks (LANs) Hardware addresses Bridges and switches Routing and protocols.
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.
Data Link Layer. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Data Link Layer : Services, Framing, Error Detection and Correction2.
The Data Link Layer Goal –As reliable as possible, efficient communication Point-to-Point –single connection –bits arrive in order sent Not necessarily.
Chapter 3 The Data Link Layer (60 % practical part)
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Practical Session 10 Error Detecting and Correcting Codes.
ECE453 – Introduction to Computer Networks Lecture 4 – Data Link Layer (I)
EEC4113 Data Communication & Multimedia System Chapter 5: Error Control by Muhazam Mustapha, October 2011.
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.
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
COMPUTER NETWORKS Ms. Mrinmoyee Mukherjee Assistant Professor St. Francis Institute of Technology, Mount Poinsur, S.V.P Road, Borivli (west), Mumbai
CHAPTER 3: DATA LINK CONTROL Flow control, Error detection – two dimensional parity checks, Internet checksum, CRC, Error control, Transmission efficiency.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can.
Error Detection and Correction
Transmission Errors Error Detection and Correction.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Error Correction/Detection.
Practical Session 10 Computer Architecture and Assembly Language.
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
1 University of Calgary CS 441 Part 3 The Data Link Layer 3.1 Framing & Error Control 3.2 Error & Flow Control.
Coding and Error Control
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Data Link Layer.
Part III. Data Link Layer
Data link layer (LLC).
Advanced Computer Networks
CIS 321 Data Communications & Networking
Chap. 4 Data link layer 2.
Data Link Layer What does it do?
CS412 Introduction to Computer Networking & Telecommunication
Chapter 7 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.
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
Error Detection and Correction
Error Detection and Correction
UNIT-II The Data Link Layer.
Types of Errors Data transmission suffers unpredictable changes because of interference The interference can change the shape of the signal Single-bit.
Data Link Layer. Position of the data-link layer.
Presentation transcript:

جلسه هشتم شبکه های کامپیوتری به نــــــــــــام خدا

Data link layer Data Link Layer Purpose: Ensure reliable, efficient communication between neighbor nodes Four specific functions: Provide services to network layer Framing Error handling Flow control Operation Perspective 2

Services Provided to Network Layer Services Provided to Network Layer: 1. Unacknowledged Connectionless 2. Acknowledged Connectionless 3. Acknowledged connection oriented 3

Services Provided to Network Layer Unacknowledged connectionless Just send frames towards the destination No connection is established, No connection released No acknowledge of received frames No attempt to recover lost frames Appropriate in case of: Real-time traffic: speech, video: Short delay more important than 100% reliability Low error channels: leave error correction to higher layers Most LAN’s are using this service class 4

Service to Network Layer Acknowledged connectionless Each frame is acknowledged, but no connection is Established Acknowledgment is a service that can be performed by the transport layer as well Data link layer provides this service to avoid long delays that could be caused if frames are not acknowledged Specially important over un-reliable channels such as Wireless Example: (WiFi) 5

Service to Network Layer Acknowledged Connection Oriented Establishes a connection before sending data Each frame is numbered Data link layer guarantees the delivery of a SINGLE copy of EVERY frame (With acknowledged connectionless, it is possible to receive multiple copies of a frame due to a lost ACK) Releases the connection at the end of conversation (To release software and hardware resources tied up to the connection) Provides a reliable bit stream to Network Layer 6

Framing Character Count Use character count symbols to specify the end of frame Sensitive to error. Difficult to recover if sync is lost Character stuffing Insert ASCII known characters to specify boundaries (FLAG) Insert ESC before accidental FLAGs or ESCs of binary files. To be removed by the receiver’s data link layer Choice of marking characters (ESC, FLAG) Depends on 8 bit ASCII character set 7

Framing Bit Stuffing Use a flag bit pattern ( ) Stuff a zero after 5 1’s if it happened in user data Easy to recover the frame if sync is lost Coding Violation Send physical layer signals that can not be associated with valid data sets to indicate frame Boundaries 8

Error Detection and Correction 9 Error handling Errors usually occur in bursts Advantage: fewer frames are corrupted Disadvantage: burst errors harder to detect and correct Two approaches: Detection Correction Both require extra bits per data word or message Idea: add r extra bits to frame data Not all 2 m+r codes are legal (only 2 m codes are legal) n = m + r bits code word, m bits for data and r bits added for error control

Error Detection and Correction 10 Hamming distance The Hamming distance (HD) of 2 code words a and b is the number of bit positions in which a and b are different: HD (a,b)= Number of ones in (a XOR b) Note that HD (a,b) bit errors are required to convert a into b (or vice versa ) If a code-set is designed to ensure a minimal hamming distance HDmin between any two valid code-words: If HDmin = d + 1 : d bit errors can be detected If HDmin = 2d + 1 : d bit errors can be corrected

Hamming distance 11 Example 1: parity Add (parity) bit to every data word such that total numbers of ones is even (or odd) HDmin = 2 single bit errors are detectable Example 2: 4 data words with HDmin = 5 double errors can be corrected 0000,0000, ,0111, ,1000, ,1111,11 If arrives, what is the original?

Hamming Code 12 How many redundant (r) bits do we need for a single bit error correction? Assume m bit message with r bits added for single error correction (n = m+r bits) How many legal code-words? 2 m How many illegal codes per code-words? n*(2 m ) (n+1)*(2 m ) (m+r+1)<=2 r This is the minimum number of bits (r) we need to correct a single error in n bits with r parity bits Example: M=8 => r>=4 ; M=16 => r>=5 ; M=240 => r>=8 Error detection with retransmission often much more efficient than error Correction Example: Error rate Block size 1000 bits Single bit error correcting requires 10 bits / block Single bit error detection requires 1 bit / block Retransmission of 1 block (= 1001 bits) per 1000 blocks is more efficient

Cyclic Redundancy Check (CRC) 13 View bit sequence as polynomial, e.g. (degree 5):110001=> x^5 + x^4 + x^0 Idea: add r bits such that resulting polynomial is dividable by a certain polynomial; if not an error occurred Polynomial Arithmetic (modulo 2): Add and Subtract are identical: use bit wise XOR (no carry/borrow needed) Div: just like binary division, except of using the above subtract CRCs can easily be constructed and checked in hardware using a linear feedback shift register (LFSR) Standard polynomials: CRC-12 = x12 +x11 + x3 + x2 + x +1 CRC-16 = x16 +x15 +x2 +1 CRC-CCITT = x16 +x12 +x5 +1