Data Link Layer (part 2)

Similar documents
This Lecture. BUS Computer Facilities Network Management. Line Discipline. Data Link Layer

Data Link Control. Surasak Sanguanpong Last updated: 11 July 2000

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

William Stallings Data and Computer Communications. Chapter 7 Data Link Control

4. Error correction and link control. Contents

Data Link Control Protocols

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

INTERNET ARCHITECTURE & PROTOCOLS

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

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

Data Link Control Protocols

Data and Computer Communications


ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

Chapter 7: Data Link Control. CS420/520 Axel Krings Page 1

Chapter 7: Data Link Control. Data Link Control Protocols

3. Data Link Layer 3-2

Flow control: Ensuring the source sending frames does not overflow the receiver

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

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

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

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

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.

The flow of data must not be allowed to overwhelm the receiver

DATA LINK LAYER UNIT 7.

Data Link Layer. Goals of This Lecture. Engineering Questions. Outline of the Class

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

DATA LINK CONTROL PROTOCOLS

Data Link Control. Claude Rigault ENST Claude Rigault, ENST 11/3/2002. Data Link control 1

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

Chapter 6 Digital Data Communications Techniques

High Level View. EE 122: Error detection and reliable transmission. Overview. Error Detection

(Refer Slide Time: 2:20)

Data Link Layer: Overview, operations

LECTURE #34. Data Communication (CS601)

Error Detection Codes. Error Detection. Two Dimensional Parity. Internet Checksum Algorithm. Cyclic Redundancy Check.

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

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

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

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

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

Chapter 11 Data Link Control 11.1

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

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

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

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

Link layer, LANs: outline. Chapter 5-1 Link Layer. Link layer: introduction. Link layer services

Inst: Chris Davison

ET4254 Communications and Networking 1

Chapter 11 Data Link Control 11.1

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

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

Data Link Layer (cont.) ( h h h ) (Sicherungsschicht) HDLC - 1.

Lecture 7: Flow & Media Access Control"

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

INF Data Communication Data Link Layer

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

(Sicherungsschicht) Chapter 5 (part 2) [Wa0001] HDLC - 1.

William Stallings Data and Computer Communications. Chapter 10 Packet Switching

Chapter 11 in Stallings 10 th Edition

Data Link Layer. Srinidhi Varadarajan

CS 4453 Computer Networks Winter

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

Chapter 15 Local Area Network Overview

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

Chapter 5 Peer-to-Peer Protocols. School of Info. Sci. & Eng. Shandong Univ..

Communication Fundamentals in Computer Networks

Ch. 7 Error Detection and Correction

Local Area Network Overview

TCP: Flow and Error Control

10.1 REVIEW QUESTIONS

Achieving Reliable Digital Data Communication through Mathematical Algebraic Coding Techniques

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

Chapter 5 Peer-to-Peer Protocols and Data Link Layer

CSE123A discussion session

Data and Computer Communications

Lecture 7: Flow Control"

CS422 Computer Networks

CS 455/555 Intro to Networks and Communications. Link Layer

Agenda. Protocol Principles

Chapter 5 Data-Link Layer: Wired Networks

The Link Layer and LANs. Chapter 6: Link layer and LANs

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

Links. CS125 - mylinks 1 1/22/14

CS 3640: Introduction to Networks and Their Applications

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

INF4/MSc Computer Networking. Lectures 3-4 Transport layer protocols TCP/UDP automatic repeat request

Multiple Access Protocols

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

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

COMPUTER NETWORKS - Window protocols

COMPUTER NETWORKS - Window protocols

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

CSCI-1680 Link Layer I Rodrigo Fonseca

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

COMPUTER NETWORKS UNIT 3

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

CHANNEL CODING 1. Introduction

UNIT-II OVERVIEW OF PHYSICAL LAYER SWITCHING & MULTIPLEXING

Transcription:

Data Link Layer (part 2)! Question - What is a major disadvantage of asynchronous transmission? Reference: Chapters 6 and 7 Stallings Study Guide 6! Question - What is a major disadvantage of asynchronous transmission?! nswer - synchronous transmission requires an overhead of two or three bits per character, and is, therefore, significantly less efficient than synchronous transmission.! Question - How is interference avoided by using frequency division multiplexing?! Question - How is interference avoided by using frequency division multiplexing?! nswer - Interference is avoided under frequency division multiplexing by the use of guard bands, which are unused portions of the frequency spectrum between sub-channels.! Question - Explain how synchronous time division multiplexing (TDM) works.

! Question - Explain how synchronous time division multiplexing (TDM) works.! nswer - synchronous time division multiplexer interleaves bits from each signal and takes turns transmitting bits from each of the signals in a round-robin fashion.! Why is a statistical time division multiplexer more efficient than a synchronous time division multiplexer?! Why is a statistical time division multiplexer more efficient than a synchronous time division multiplexer?! nswer - statistical time division multiplexer is more efficient than a synchronous time division multiplexer because it allocates time slots dynamically on demand and does not dedicate channel capacity to inactive low speed lines. Lecture 6 Learning Objectives! understand the reasons for flow control;! understand the types of flow control;! understand the reasons for having error control; and! understand the types of error control. Introduction! Material discussed so far was concerned with sending signals over a transmission link! For effective digital data communications, much more is needed to control and manage the exchange " That is, concerns over sending data over a data communications link! To achieve the necessary control, a layer of logic is added above the physical interfacing " This logic is referred to as data link control or a data link control protocol Introduction Contd.! When a data link control protocol is used, the transmission medium between systems is referred to as a data link! For effective data communication between two directly connected transmitting-receiving stations the following requirements need to be addressed: " Frame synchronisation! The beginning and end of each frame must be recognisable " Flow control! The sending station must not send frames at a rate faster than the receiving station can absorb

Introduction Contd. " Error control! it errors introduced by the transmission system should be corrected " ddressing! On a multipoint line, such as a LN, the identity of the two stations involved in a transmission must be specified " Control and data on the same link! The receiver must be able to distinguish control information from the data being transmitted " Link Management! The initiation, maintenance, and termination of a sustained data exchange need to be addressed Error and Flow Control! Synchronization and interfacing techniques are not enough to control and manage error-free exchange of data because of "possibility of transmission error "Receiver may need to regulate the rate of arriving data! To achieve necessary control, flow control and error control mechanisms are necessary Flow Control! Technique for controlling the data transmission so that receiver has sufficient buffer space to accept data before processing. This is needed as " Receiver buffer is limited " with long data transmissions, chances of error are high. More retransmission time. " If one station hogs the line, then delay is experienced by other stations! Transmission time " Time taken to emit all bits into medium! Propagation time " Time for a bit to traverse the link! Common flow control schemes: " Stop-and-Wait " Sliding Windows Stop-and-Wait Flow Control Sender Transmits a frame Wait until it receives CK before sending the next frame Frame i CK Frame i+1 Receiver Sends back an acknowledgement to the frame just received Stop-and-Wait Flow Control! Works well for a few large frames! Usually smaller frames are sent "uffer size of the receiver may be limited "It is not desirable to permit one station to occupy the medium for long time! Simple! Provides inefficient link utilization for "Very high data rate "Very long distance between sender and receiver Sliding-Windows! Improves efficiency greatly by allowing multiple frames to be sent without acknowledgement! Each frame is numbered for identification purpose " eg., 3 bits frame number will allow us to have 2 3 distinct frames which can be numbered from 0-7! Size of the window determines the maximum number of frames that can be sent without overflowing the receiver buffer! Window shrinks (at the trailing edge) when a frame is sent and expands (at the leading edge) when acknowledged! Window size can t exceed the maximum number of distinct frames

Sliding-Windows Sender Receiver Sliding-Windows: Example Window size is 3 frames, station - sender, station- - receiver efore any transmission occurred, window size on each stations is 3 frames 0 1 2 3 0 1 2 0 1 2 3 0 1 2 sends and received by, s window is reduced to 2 as soon as leaves. s window is reduced to 2 only after arrives at 0 1 2 3 0 1 2 0 1 2 3 0 1 2 Sliding-Windows: Example sends, there is no CK from yet 0 1 2 3 0 1 2 0 1 2 3 0 1 2 sends, no CK 0 1 2 3 0 1 2 0 1 2 3 0 1 2 sends acknowledgement of receiving up to frame 2 (3 frames) and receives this CK. s window expands back to 3 frames as soon as RR3 leaves. s window size will only expand back to 3 when RR3 physically arrives at 0 1 2 3 0 1 2 0 1 2 3 0 1 2 RR3 Sliding-Windows: Example sends F3, sends acknowledgement of F3, s window shrinks to 2 frames after receiving F3 and expands back to 3 frames when RR0 is sent, s window will still remain the same until RR0 physically arrived at, t the meantime, keeps sending and sends f3 0 1 2 3 0 1 2 0 1 2 3 0 1 2 0 1 2 3 0 1 2 0 1 2 3 0 1 2 0 1 2 3 0 1 2 RR0 Error Detection! dditional bits added by transmitter for error detection code! Parity " simple " can t detect position of error " even number of bit errors goes undetected! CRC - Cyclic redundancy check " uses dynamic bit pattern attached with data " able to detect multiple-bit error Modulo-2 rithmetic! inary arithmetic without carry.! ddition is the same as subtraction! Examples: * 1+1=0 1-1=0 * 1+0=1 1-0=1 * 0+1=1 0-1=1 * 0+0=0 0-0=0

Division! X is greater than or equal to Y iff the position of the highest 1 bit (i.e., the Most Significant it) of X is the same or greater than the position of the highest 1 bit of Y Division Example 0110 101000110 101000110 111011 111010 111110 101111 0 Remainder CRC Concept 2 n M R = Q + P P M k-bit T = n 2 M + F What should be F? Q,R quotient, remainder P is the predetermine divisor T = n 2 M + R let F equals R n T M R = 2 + P P P divides T by P R R = Q + + = Q P P T is divisible by P T F n-bit Given a k-bit block of message (M), transmitter generates an n-bit frame check sequence (FCS), so that the resulting frame of k+n bits (T), is exactly divisible by some predetermines divisor (P). The divisor divides the incoming frame (T) by P, if there is no remainder, assume there was no error CRC M=k-bit message P=(n+1)-bit divisor! Sender " multiply M with 2 n " divide that by P, remainder gives F " add F to 2 n *M to get T " send T to receiver! Receiver " divide T by P! no remainder no error! remainder error F=n-bit FCS T=(k+n)-bit frame CRC-Example M=101010 (6-bit) P=101(3-bit) F=(3-1)-bit=2-bit=? T=(6+2)-bit frame M*2 (3-1) =10101000 So F=10 T=10101000+10=10101010 t receiver: T/P=10101010/101 remainder 0 no error 100010 101 10101000 101 0100 101 10 Remainder How do we select P?! Minimum requirement: "One bit longer than FCS employed by data link layer protocol! HDLC uses either 16 or 32 bits FCS, hence P( x) for 16 bits FCS has to be at least 17 bits long, or 33 bits long for 32 bits FCS "oth high- order (left most) and low- order (right most) bits must be 1, eg 101, 1001, 10001 "Exact bit pattern depends on the type of error expected

What errors can be detected by CRC? Common CRCs! ll single bit error! ll double bit errors, P( x) used as divisor has to contain at least three 1s " Example, P(X)=X 4 +X 3 +1, P=11001! ny odd number of errors, if P( x) has a factor of (x+1)! ll burst errors with length < length of P( x)! Some burst errors with length > length of P(x)! Four versions of P(X) are widely used " CRC-12, P(X)= X 12 + X 11 + X 3 + X 2 +X+1 " CRC-16, P(X)= X 16 + X 15 + X 2 +1 " CRC-CCITT, P(X)= X 16 + X 12 + X 5 +1 " CRC-32, P(X)= X 32 +X 26 +X 23 +X 22 +X 16 +X 12 +X 11 +X 10 +X 8 +X 7 +X 5 +X 4 +X 2 +X +1 Error Control! Mechanism to: "detect errors "correct errors! Two type of errors " lost frame/ ack " damaged frame/ ack Error Control Techniques! Error Control Techniques " Error detection! parity bit, CRC " cknowledgment! Positive (RR) - destination receives error- free frame! Negative( REJ) - destination receives frame with some errors " Retransmission after timeout! Source retransmits a frame that has not been acknowledged after a predetermined amount of time! Collectively above mechanisms are referred as automatic repeat request (RQ) Error Control Techniques! Standard Techniques " Stop-and-Wait RQ " Go-back-N RQ " Selective-reject RQ! Go- back-n RQ and selective-reject RQ use sliding-window flow control Stop-and-Wait RQ! ased on Stop-and Wait flow control! Possible errors: " Damaged frame receiver discards the frame, no acknowledgment sent Sender retransmit the frame after timeout Sender keeps a copy of a transmitted frame until an acknowledgment is received Sender timeout CK1 Receiver

Stop-and-Wait RQ! Possible errors: " damaged acknowledgment! receiver receives correct frame! CK damaged in transit, not recognizable by sender! sender re- sends the frame after timeout! Receiver receives a duplicate copy and discard the copy. To identify a duplicate copy, frames are alternately labeled with 0 and 1 Sender timeout CK1 CK0 Receiver Go-ack-N RQ! ased on sliding-window flow control! cknowledgments: " RR(n) = positive acknowledgment of frame n-1 " REJ(n)=negative acknowledgment of frame n! Handles cases: " Damage/lost frame " Damage/lost RR " Damage/lost REJ CK0 Go-ack-N RQ! Consider that station is sending frames to station.! Possible situations: "Frame contains error and is detected " Frame is lost during transmission and sender s window size > 0 " Frame is lost during transmission and sender s window size =0 (time out occurs) Damaged Frame transmit frame n ( ). detects an error and has previously successfully received frame (n-1) ( ). sends REJ n (REJ1) to indicate that frame n () is received with error. When receives the REJ n (REJ1), it will retransmit frame n () and all subsequent frames that it has transmitted since the original transmission of n(), ie and in the example REJ1 Lost Frame.. Frame n () is lost in transit. subsequently sends frame (n+1) (). receives frame (n+1) () out of order and send REJ n (REJ1) must retransmit frame n () and all subsequent frames REJ1 Lost Frame Frame n () is lost in transit but does not send additional frames. receives nothing and returns neither RR or REJ. When s timer expires, it transmits RR frame with P- bit of 1 as a command that must be acknowledged by sending RR (RR2) indicating the next frame that it expects. When receives the RR, it retransmits frame n (). RR (P=1) RR2

Damaged RR! receives frame i and sends RR(i+1), which is lost in transit " efore timeout - if subsequent acknowledgments eg. RR(i+2) are received, RR(i+2) acknowledged both frame i and i+1. " fter timeout - If s timer expires before subsequent acknowledgment is received, sends RR command and sets another timer called P-bit timer. If fails to respond to the RR command, s P-bit timer will expire. t this point, will restart the P-bit timer and send a new RR command. If fails to receive any acknowledgment after a predetermined number of tries, it initiates reset procedure. Damaged /Lost RR! efore timeout - if subsequent acknowledgments eg. RR(i+2) (RR2) are received, RR(i+2) (RR2) acknowledged both frame i () and i+1 (). RR1 f3 RR2 Damaged/Lost RR! fter timeout - If s timer expires before subsequent acknowledgment is received, sends RR command and sets another timer called P-bit timer RR1 RR(P=1) RR3 f3 Damaged REJ! transmit frame i which is received by with error. sends REJi which is lost during transmission.! waits for to re-transmit frame i, if s window still allows additional frames to be sent to, will send these additional frames and wait for any CK from. Since is still waiting for frame i, it will not send any CK. fter sometime, timer on will expire and will send RR command with P-bit=1. Selective-Reject RQ! Only frames with negative CK are retransmitted! Send SREJn to signal that frame n needs retransmission! dvantage: " reduce the number of re-transmission required! Disadvantages " requires larger buffer at the receiver to save any frames arrive after frames i and before receiving the re-transmitted frame i. " Requires more complex logic at the sender because it has to be able to send a frame out of sequence.