3.2 Data Link Layer : Error & Flow Control

Slides:



Advertisements
Similar presentations
William Stallings Data and Computer Communications 7th Edition
Advertisements

CH. 7 Data Link Control. Requirements & Objectives of Data Link Control Frame Synchronization Flow Control Error Control Addressing Control and Data on.
Data Link Protocols(HDLC & PPP). Data Link Protocols The set of specifications used to implement the DLL. DLL Protocols Synchronous Protocols Character-oriented.
HIGH-LEVEL DATA LINK CONTROL (HDLC) HDLC was defined by ISO for use on both point-to-point and multipoint data links. It supports full-duplex communication.
Chapter 14: Data Link Control
William Stallings Data and Computer Communications 7th Edition
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 7 – Data Link Control Protocols.
Data and Computer Communications Updated: 2/9/2009.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Data Link Control Slide 1 Data Link Control Chapter 7.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 7 – Data Link Control Protocols.
Piggybacking A method to combine a data frame with ACK. Station A and B both have data to send. Instead of sending separately, station A sends a data frame.
11-6 HDLC High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-point and multipoint links. It implements the.
Two Protocol Case Studies HDLC & Kermit. HDLC A multi-functional protocol. Works in lots of modes. Forms the basis for MANY of the current protocols in.
Data Link Control Protocols Data link control protocol Provides a layer of control between systems on a transmission medium referred to as data link. DLC.
11-6 HDLC High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-point and multipoint links. It implements the.
William Stallings Data and Computer Communications 7 th Edition Chapter 7 Data Link Control Protocols.
FLAG-8 bit sequence with a bit pattern (7E) ADDRESS-address of secondary station that is either the originator or destination of the frame (or.
Data Communications Data Link Control. What Is Data Link Control? The Data Link layer of a model typically has the following responsibilities: 1. Creates.
Example Data Link Protocols Quick review Reference Models? Layers? Flow Control? Bit stuffing? Connection Oriented? Synchronous transmission?
Network Technology CSE Network Technology CSE3020 Week 6.
Data and Computer Communications Eighth & Ninth Edition by William Stallings Chapter 7 – Data Link Control Protocols.
Data Link Control Protocols
Data Link Control Protocols Dr. Muazzam A. Khan. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow.
Aegis School of Telecommunication Chapter 7 Data Link Control Protocols Telecom Systems I by Dr. M. G. Sharma, Phd.
Data and Computer Communications Ninth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data and Computer Communications, Ninth Edition.
Data and Computer Communications Tenth Edition by William Stallings Data and Computer Communications, Tenth Edition by William Stallings, (c) Pearson Education.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Control and Protocols.
1 Kyung Hee University Data Link Protocols. 2 Kyung Hee University 11 장 Data Link Control and Protocols 11.1 Flow and Error Control 11.2 Stop-and-Wait.
CIS : Data Link Control. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow Transmission.
FIT – Monash University High-Level Data Link Control
Data and Computer Communications Data Link Control Protocols.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data and Computer Communications Data Link Control Protocols.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols 1.
Data Link Control Protocols  need layer of logic above Physical  to manage exchange of data over a link frame synchronization frame synchronization flow.
2.10 Flow and Error Control Before that ...
High level Data Link Layer Protocol - HDLC
HDLC and PPP.
Chapter 9: Data Link Control
William Stallings Data and Computer Communications 7th Edition
The Data Link Layer Supplementery Slides
Chapter 11 Data Link Control
Chapter 11 Data Link Control and Protocols
Data Link Layer Flow Control.
Data Link Layer - 3 Dr. Sanjay P. Ahuja, Ph.D.
Chapter 11 - Part 2 Data Link Control.
Instructor Mazhar Hussain
ICSA 341 Data Communications & Networking
CIS 321 Data Communications & Networking
Flow Control.
Chapter 14: Data Link Control
Flow and Error Control.
Chapter 11 Data Link Control and Protocols.
Chapter 14: Data Link Control
Chapter 14: Data Link Control
Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Error control.
Kendali Data Link dan Protokol
Chapter 14: Data Link Control
Jiying Zhao SITE, University of Ottawa Canada.
EEC4113 Data Communication & Multimedia System Chapter 4: Flow Control by Muhazam Mustapha, August 2010.
Data Link Control (DLC) Services
William Stallings Data and Computer Communications
Chapter 9: Data Link Control
Protocols and the TCP/IP Suite ECE405- Computer Networks
Presentation transcript:

3.2 Data Link Layer : Error & Flow Control data link configurations connectionless & connection oriented services flow control - avoiding buffer overflow error control - backward error control via re-transmission data link protocols - stop & wait, sliding window protocol performance issues - link utilization the high level data link control (HDLC) protocol

Line Configurations Topology point to point multipoint Duplicity simplex half duplex full duplex .

Point to Point - example Establishment - ENQ (enquiry), ACK, NAC, ERP (error procedure) Data Transfer Termination - EOT ENQ A ACK B frame ACK

Multipoint Links - Primary & Secondary Nodes Polling P : POLL - X (note: need address) X : NAK or X : frame to P P : ACK Select P : SEL - X X : ACK P : frame to X

Flow Control - Stop & Wait Receiver (B) needs one buffer A sends Frame to B B sends ACK to A A sends Frame to B ... Assumes no errors, in frames or ACKs Small frames, or blocks, are: fairer, fewer re-xmit, smaller buffers required

Performance - Link Utilization = U TF = total time to send frame = one way propagation delay TF = Tf +2  +Tack ~= Tf +2  U ~= n Tf / (2n  +nTf) => U = 1/ (1+2a) where a =  / Tf Tf B A 

Definition of Parameter “a” a = propagation time / transmission time d = distance V = velocity of light = 2 or 3 * 8 meters/sec R = data rate in bits/sec L = length of frame in bits a =  / Tf a = (d/ V)/ (L/ R) a = Rd/ VL

Impact of a on Utilization a =  / Tf < 1 Tf  B A Tf a > 1  B A

Flow Control - Sliding Window Consider A to B on full duplex link B allocates N frame buffers each frame given sequence number ack includes 1+ sequence# of last frame rec’d A can send N frames before receiving an ACK frames that can be sent sender . . . 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 .... received receiver . . . 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 ....

Flow Control - Sliding Window (N=4) A’s window: 0 1 2 3 & B’s window: 0 1 2 3 A sends B F0, F1, F2 & B receives all A’s window: 3 & B’s window: 3 B sends ACK 3 A’s window: 3 & B’s window: 3 0 1 2 A receives ACK 3 A’s window: 3 0 1 2 & B’s window: 3 0 1 2 U = 1 if N > 2a+1 else U = N/ (1+2a)

Error Control-ARQ (automatic repeat request) Two basic error types: lost frame (or ack/ control frame) damaged frame (or ack/ control frame) Control Mechanisms error detection via CRC retransmission after timeout negative acks & retransmission Three Common Versions: Stop & Wait ARQ Go-back-N ARQ Selective-reject ARQ

Automatic Repeat Request protocols (ARQ) sender required to retransmit erroneous frames receiver detects errors fewer bits needed to reliably detect errors sender notified to re-send frame positive ack of frames received sender times out on frames that are not acknowledged and re-transmits negative acknowledgement for frames received with errors - more efficient

Error Control Stop & Wait ARQ (automatic repeat request) F0 A1 F1 alternate 0/ 1 labels to avoid receiving duplicates A0 F0 lost F0 re-sent after timeout A1 lost F0 re-sent after timeout

Sliding Window Based- Go-back-N ARQ Damaged Frame B has correctly received frames up to I-1, A sends I, B detects error, sends NAK I frame I lost in transit, I+1 sent, B receives I+1 out of order, sends NAK I, else A sends nothing after I, hears nothing, resends after timeout Damaged ACK B receives I, sends ACK I+1 which is lost, A may receive subsequent ACK or timeout Damaged NAK A will eventually timeout and resend all

Go-back-N ARQ 0 1 2 3 4 5 2 3 4 5 6 7 0 frames ACK1 ACK3 ACK5 ACK2 ACK4 NAK2 0 1 2 3 4 5 2 3 4 5 6 7 0 X X X X error discarded

Performance of Stop & Wait ARQ Without frame xmission errors & Tack = 0 U = Tf / ( Tf + 2 ) U = 1/ (1 + 2a) where a =  / Tf With frame probability error = P & Tack = 0 U = Tf / Nretrans(Tf + 2 ) U = 1/ Nretrans(1 + 2a) Nretrans =  i P i-1(1-P) = 1/ (1 - P) U = (1 - P)/ (1 + 2a)

Performance of Sliding Window: no errors N = window size, Tack = 0 & Tf = 1 if N > 1 + 2a then receive an ACK before window exhausted, can xmit continuously => U = 1 if N< 1 + 2a window exhausted at t0 + N, must wait till t0 + 2a + 1 to send again, thus get N time units busy during 2a + 1 => U = N/ (1 + 2a)

Performance of Sliding Window (N<1+2a) B t0 A (assuming Tf = 1) fa . . . f2 f1 t0+a fa+1 f3 f2 . . . t0+a+1 ack1 N fa+3 fa+2 t0+2a+1 . . . ack1 => N frames sent in 1+2a time => U = N/ (1+2a)

Performance of Selective Repeat with Errors without errors: U = 1 if N> 1+2a else = N/ (1+2a) U = time to send 1 frame / total time per frame *Nr where Nr = number of times must be resent U = 1/ Nr if N> 1+2a else N/ (1+2a)*Nr again Nr = f(i) P i-1(1-P) = 1/ (1-P) thus U = (1-P) if N>1+2a else (1-P)N/ (1+2a)

Performance of Go-back-N ARQ : with errors again just consider the Nretrans, ie U = Tf / Nr (Tf + 2 ) U = 1/ Nr (1 + 2a) here each erroneous frame requires retransmission of K frames Nr = Exp{#frames xmitted to send 1} Nr = f(i) P i-1(1-P) where f(i) = total # frames xmitted if 1st frame must be sent i times = 1 + (i-1)K Nr = 1 - K + K/ (1 - P)

Performance of Go-back-N ARQ U = 1/ Nr(1 + 2a) Nr = 1 - K + K/ (1 - P) U = 1/ (1 - K + K/ (1 - P))(1 + 2a) note K ~= 2a + 1 for N> 2a + 1 etc, thus: U = (1 - P)/ (1 + 2aP) if N > 1 + 2a U = N(1 - P)/ (1 + 2a)(1 - P + NP) if N < 1 + 2a

Performance Comparison 1.0 Go-back-N=127 Go-back-N=7 0.5 stop&wait Utilization 0.1 1.0 10 1000 a =  / Tf

Sliding Window with Selective Repeat & NAKs window size = 2, sequence range =4 0 1 2 3 2 0 1 2 frames ACK0 ACK3 ACK2 ACK1 NAK2 ACK0 0 1 2 3 2 0 1 X Tanenbaum Section 3.4.3 error

HDLC-High Level Data Link Control-ISO 3309 Three stations types: primary - issues command frames secondary - response frames combined - primary & secondary fcns Two Link configurations unbalanced - 1 primary & full/half duplex balanced - only point to point combined Three Data Transfer Modes normal response mode (NRM) - unbalanced asynchronous balanced mode (ABM) asynchronoous response mode (ARM) -unbal.

HDLC -synchronous xmission -1 frame format flag - 8 bits - 01111110 (bit stuffing used to avoid in data) address - one or more octets control 8 or 16 bits information - variable frame check sequence CRC-16 or 32 flag - 8 bits - 1 flag can close & open frames flag address control data FCS flag

Control Field Format - three frame types Information frame (ARQ piggybacked in data) 1 2 3 4 5 6 7 8 0 send-seq# P/ F rec-seq# (3 or 7 bits) (3 or 7 bits) Supervisory (ARQ if not piggybacked) 1 0 sup-fcn P/ F rec-seq# Unnumbered (other functions) 1 1 unn-fcn P/ F unn-fcn

HDLC Commands & Responses I - Information exchange user data S - Supervisory RR ACK, ready to receive I RNR ACK, not ready to receive REJ NAK, go back N SREJ NAK selective reject U - Unnumbered SNMR/ SNME set mode, 2 octet control SARM/ SARME set mode, 2 octet control SABM/SABE, SIM, DISC, UA, DM, RD, RIM, UI,UP, RSET, XID, TEST, FMR

HDLC example - one way, reject recovery I - 1 I - 2 X I - 3 REJ - 2 I - 2 I - 3

HDLC example - busy condition RNR - 2 RR - P RNR - 2 I - 1 RNR - 2 RR - P

Protocol Analysis - Finite State Machines FSM model of communication protocol objects state defined for sending, receiving, link objects typical state = waiting (some event) very large number of states for simple protocols state transitions occur when events occur FSM = (S, M, I, T) where: S is set of states of all objects M is set of all types of messages I is the set of object initial states T is the set of state transitions correctness, reachability, deadlock

• Petri Net Models places can be occupied by tokens directed arcs connect places and transitions transitions are enabled if all its input arcs come from places occupied by tokens enabled transitions can fire removing all incoming tokens and placing tokens at all places connected to it by output arcs •

Tanenbaum’s Protocol 3 - Petri Net Model link send 0 0 on link loss wait ack 0 sender timeout receiver ack on link loss send 1 wait ack 1 timeout 1 on link loss