CS3502: Data and Computer Networks DATA LINK LAYER - 1.

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

Noise, Information Theory, and Entropy (cont.) CS414 – Spring 2007 By Karrie Karahalios, Roger Cheng, Brian Bailey.
Computer Interfacing and Protocols
Lecture 12 Layer 2 – Data Link Layer Protocols
Introduction to Information Technologies
Data and Computer Communications
NETWORKING CONCEPTS. ERROR DETECTION Error occures when a bit is altered between transmission& reception ie. Binary 1 is transmitted but received is binary.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 6 – Digital Data Communications Techniques.
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
PART III DATA LINK LAYER. Position of the Data-Link Layer.
Long distance communication Multiplexing  Allow multiple signals to travel through one medium  Types Frequency division multiplexing Synchronous time.
The OSI Reference Model
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.
CS352- Link Layer Dept. of Computer Science Rutgers University.
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
Error Detection and Reliable Transmission EECS 122: Lecture 24 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
1/26 Chapter 6 Digital Data Communication Techniques.
Shashank Srivastava Motilal Nehru National Institute Of Technology, Allahabad Error Detection and Correction : Data Link Layer.
Data link layer: services
COM342 Networks and Data Communications
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.
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.
Data and Computer Communications
Part 2: Packet Transmission Packets, frames Local area networks (LANs) Wide area networks (LANs) Hardware addresses Bridges and switches Routing and protocols.
جلسه هشتم شبکه های کامپیوتری به نــــــــــــام خدا.
Data Link Layer: Error Detection and Correction
Lecture 6: Framing and Error Detection-Data Link Layer Functions
Data Link Layer : Services, Framing, Error Detection and Correction2.
Data and Computer Communications Chapter 6 – Digital Data Communications Techniques.
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.
1 CS4550: Computer Networks II Review Data Link Layer.
COMPUTER NETWORKS Ms. Mrinmoyee Mukherjee Assistant Professor St. Francis Institute of Technology, Mount Poinsur, S.V.P Road, Borivli (west), Mumbai
Overview All data can be corrupted, for reliable communications we must be able to detect and correct errors implemented at the data link and transport.
CSCI 465 D ata Communications and Networks Lecture 9 Martin van Bommel CSCI 465 Data Communications & Networks 1.
1 © Unitec New Zealand CRC calculation and Hammings code.
Data Link Layer. Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless.
1/30/ :20 PM1 Chapter 6 ─ Digital Data Communication Techniques CSE 3213 Fall 2011.
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.
Lecture 4 Error Detecting and Correcting Techniques Dr. Ghalib A. Shah
CS4470 Computer Networking Protocols
Dr. Clincy Professor of CS
Simple Parity Check The simplest form of error detection is the parity check used with ASCII codes, originally on asynchronous modem links Each 7 bit ASCII.
Introduction to Information Technologies
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
Communication Networks: Technology & Protocols
Advanced Computer Networks
CIS 321 Data Communications & Networking
Chapter 7 Error Detection and Correction
EEC-484/584 Computer Networks
Introduction to Information Technologies
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
COMPUTER NETWORKS CS610 Lecture-5 Hammad Khalid Khan.
Error Detection and Correction
Data Link Layer. Position of the data-link layer.
Presentation transcript:

CS3502: Data and Computer Networks DATA LINK LAYER - 1

data link layer : objectives u thorough understanding of DL layer -- u where/how it fits into network/other layers u service it provides (to higher layers) u services it uses (from lower layer) u synchronous/asynchronous transmission u error detection and correction u describe flow control protocols: sliding window u specify/verify basic DL protocols u elementary performance analysis of DL protocols

data link layer u phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful. DL layer adds these, and combines bits into frames, or messages. u purpose of DL: transform unreliable physical bit stream into reliable data communications link... u PHY + DL = DATA COMMUNICATIONS u MAC layer (media access control) - takes place of DL layer in LANs (together with LLC)

data link layer : functions u framing and frame synchronization u frames marked by sync/async technique u error control u flow control u addressing u control information, data on same link (unlike EIA232) u link management (3 phases)

data link layer : framing u bits must be grouped into frames or messages u frames marked by synchronous transmission: frame starts, ends with a special flag pattern u Meathods u Character Count u Start + End Characters u Flags u Physical Layer Code Violation u Finite state machine for Bit stuff flag

data link layer : framing u allows bits to be grouped into fields, subgroups; two main types are data and control bits. u several types of control bits; some for u error detection and/or correction u addressing u flow control u other control type information

data link layer : error control u 3 basic techniques in this course (more complex techniques exist) u parity checking u very simple and easy error detection u CRC - cyclic redundancy check u more complex, but very effective and efficient u Hamming code u limited error correction; based on complex combinations of parity checks

data link layer : parity checking u to a group of data bits add a single extra bit, known as the parity bit. This bit is chosen to make the total number of 1s in the group even (or odd). Called even (odd) parity checking. u example: data bits ; add parity bit > u exercise: construct a FSM to (1) output correct parity bit (2) read a string and decide parity

data link layer : parity checking u what is the problem with simple parity checking as described? (show how to fool it) X X X P u LRC - double parity checks improve this X X X X P P P P P P u show how to fool this error check u improves error probability by factor of

data link layer : error probabilities let P B = Prob [single bit error]; then (1 - P B ) = Prob [no error] for group of Nb bits, define P 1 : Prob[no errors] P 2 : Prob[undetected error] P 3 : Prob[detected error] By definition, P 1 + P 2 + P 3 = 1

data link layer : error probabilities u examples in a 10 bit word, what is P[only bit 3 wrong]? P[exactly 1 error]? P[exactly 3 errors]? P[at most 3 errors]? P[3 errors or more]? P[3 bit burst error, with other 7 bits correct]?

data link layer : error probabilities Case 1: no error detection Then what are these 3 probabilities for Case 1? P 1 = Pr [no error] = P 2 = Pr [undetected error] = P 3 = Pr [detected error] = example

data link layer : error probabilities Case 2: error detection using parity bit u for even parity, even # errors goes undetected; so P 2 is Pr(even # of errors) P 1 = (1 - P B ) Nb P 2 =  Nb C 2a P b 2a (1-P b ) Nb-2a P 3 = 1- P 2 - P 1 hint: what is Pr(1 error)? Pr(2 errors)?... k errors? a=1 Nb/2

data link layer : error probabilities u frame probabilities, parity checking u given a frame, sent as a sequence of words/bytes, each with a parity check. What are Pf 1, Pf 2, and Pf 3 ? Pf 1 = probability of no error in the whole frame Pf 2 = probability of an undetected error and no detected error anywhere else in the frame Pf 3 = probability of an detected error

u Nb = no.bits/word; Nc = no.words/frame. Pf 1 = P 1 Nc where: P 1 is the probability of no error in a word Pf 2 =  Nc C i P 2 i [ (1-P b ) Nb ] Nc -i where: P 2 is the probability of undetected error in a word P b is the probability there is an error in a bit Pf 3 = 1 - Pf 1 - Pf 2 data link layer : error probabilities i=1 Nc

error checking : CRC u stronger error check needed u idea: insert a group of bits in the frame, which serve as as more powerful check. u added bits ( frame check sequence, FCS ) cause the resulting frame to be exactly divisible by a predetermined number. u modulo-2 arithmetic used; binary addition with no carries u examples

error checking : CRC let M denote data message, k bits long to M, add F, the FCS, which is n bits long resulting transmitted frame is T, T = 2 n M + F = M | F is evenly divisible by some pattern P, a sequence of ( n + 1) bits. Q: how is F calculated from M and P ?

error checking : CRC u F is n bits, pattern P is (n + 1) bits u 1st, last bits of P must be 1 u FCS F computed from M, P: F = remainder R, when dividing 2 n M / P = Q + R note: this “division” is modulo-2, no carries example : let M = ; k = 6; n = 3; p = Find F and T. (answer next page)

error checking : CRC u quotient Q = ; remainder R = 101; so T = u check: divide T by P, R should be 0. u example : M = ; P = Find F, T. Then check it.

error checking : CRC u CRC summary u all single and double bit errors u all odd numbers of errors u all burst errors smaller than n u most larger burst errors u If error detected, frame is retransmitted; does NOT correct error. u both CRC and parity checking widely used; CRC used in many network protocols, in addition to data link layer, including most LANs. u CRC can be implemented efficiently in hardware... computation done bit by bit

error checking : CRC implementation u shift register, XOR gates u 1 XOR gate for each “1” in pattern P, minus 1. u (n-1) 1-bit shift registers u example : show logic circuit for P

error checking : Hamming code u correct a single bit error u detect multiple errors u extended parity checking; ie, redundant parity bits Idea: parity bits appear in positions corresponding to the nodes of a binary tree; data bits appear in positions corresponding to the leafs. If a bit is in error, the other bits “point” to it by their related positions in the tree.

error checking : Hamming code u each parity bit appears in a position corresponding to a power of 2: k = 0,1,2,4,8,16,... u bits checked by parity bit in position n are: 1. itself 2. continue for next n bits (including itself) 3. off (don’t check) next n bits 4. on (check) the next n bits and continue to end of message. Example: for the data , show Hamming coded mesage.

error checking : Hamming code u How is single error bit detected? example: suppose is received. 1st parity bit, position 1: 2nd parity bit, position 2: 3rd parity bit, position 4: 4th parity bit, position 8: 0 parity bit, position 0: result:

error checking : Hamming code u example: suppose received; is it correct? Q: for a n-bit message, approximately how many bits are needed? Summary, error correction: u more complex codes correct multiple errors u require more redundancy, overhead. Also more time... so not widely used in communications. u do have a place in longer distance communications -- eg, deep space, etc. In fact could be critical to long distance ( time ) communications