Data and Computer Communications Data Link Control Protocols.

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.
EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
Telecommunication Technologies
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
EIE325: Telecommunication TechnologiesMaciej J. Ogorza ł ek, PolyU, EIE Telecommunication Technologies Week 8 Flow Control Error 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.
Chapter 7 – Data Link Control Protocols
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.
William Stallings Data and Computer Communications 7 th Edition Chapter 7 Data Link Control Protocols.
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.
Chapter 9: Data Link Control Business Data Communications, 4e.
Semester EEE449 Computer Networks The Data Link Layer En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room.
Semester Copyright USM EEE442 Computer Networks The Data Link / Network Layer Functions: Flow Control and Error Control En. Mohd Nazri Mahmud.
Data Communications Data Link Control. What Is Data Link Control? The Data Link layer of a model typically has the following responsibilities: 1. Creates.
EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
Lect11.ppt - 03/15/05 CDA 6505 Network Architecture and Client/Server Computing Lecture 11 Link-Level Flow and Error Control by Zornitza Genova Prodanoff.
Link-Level Flow and Error Control
MODULE I NETWORKING CONCEPTS.
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.
William Stallings Data and Computer Communications 7th Edition
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.
Chapter 3 THE DATA LINK LAYER
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.
THE DATA LINK LAYER Chapter 3 1. H YBRID M ODEL The hybrid reference model to be used in this book. 2.
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 CONTROL PROTOCOLS. 2 Introduction Data link control layer – often abbreviated simply to data link layer – is concerned with the transfer of.
CIS : Data Link Control. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow Transmission.
1 FIT1005 Topic 6 - Data Link Layer Reference: Chapter 7 -Stallings.
Data Link Layer Flow and Error Control. Flow Control Flow Control Flow Control Specifies the amount of data can be transmitted by sender before receiving.
CSCI 465 D ata Communications and Networks Lecture 10 Martin van Bommel CSCI 465 Data Communications & Networks 1.
FIT – Monash University High-Level Data Link Control
CSCI 465 D ata Communications and Networks Lecture 11 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Data and Computer Communications Data Link Control Protocols.
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 Control Protocols  need layer of logic above Physical  to manage exchange of data over a link frame synchronization frame synchronization flow.
Chapter 9: Data Link Control
William Stallings Data and Computer Communications 7th Edition
The Data Link Layer Supplementery Slides
Data and Computer Communications
3.2 Data Link Layer : Error & Flow Control
CIS 321 Data Communications & Networking
Chapter 14: Data Link Control
Chapter 14: Data Link Control
Chapter 14: Data Link Control
Chapter 14: Data Link Control
Data and Computer Communications
Data and Computer Communications
EEC4113 Data Communication & Multimedia System Chapter 4: Flow Control by Muhazam Mustapha, August 2010.
William Stallings Data and Computer Communications
Chapter 9: Data Link Control
Protocols and the TCP/IP Suite ECE405- Computer Networks
Presentation transcript:

Data and Computer Communications Data Link Control Protocols

 Need a logical layer above physical layer  To manage exchange of data over a link Frame synchronization Frame synchronization Flow control Flow control Error control Error control Addressing Addressing Control and data on same link Control and data on same link Link management Link management

Flow Control  Ensure sending entity does not overwhelm receiving entity By preventing buffer overflow By preventing buffer overflow  Influenced by: Transmission time Transmission time Time taken to emit all bits into mediumTime taken to emit all bits into medium Propagation time Propagation time Time for a bit to traverse the linkTime for a bit to traverse the link  Assume here no errors but varying delays

Model of Frame Transmission

Stop and Wait  Source transmits frame  Destination receives frame and replies with acknowledgement (ACK)  Source waits for ACK before sending next  Destination can stop flow by not sending ACK  Works well for a few large frames  Becomes inadequate if large block of data is split into small frames

Bit length of a link: B = R x d/V where: B = Length of the link in bits; the no. of bits present on the link at an instance in time when a stream of bits fully occupies the link R = Data Rate of the link in bps d = Length of the link in meters V = Velocity of propagation Define: a = B/L (L = number of bits in the frame) a<1 : Propagation time < Transmission time a>1 : Propagation time > Transmission time

Stop and Wait: Performance  Aim: Determine maximum potential efficiency of a half-duplex point-to-point line using the stop-and-wait scheme  Example: Long message sent as a sequence of frames F 1, F 2, …., F n Station S 1 sends F 1. Station S 1 sends F 1. Station S 2 sends an acknowledgment. Station S 2 sends an acknowledgment. Station S 1 sends F 2. Station S 1 sends F 2. Station S 2 sends an acknowledgment. Station S 2 sends an acknowledgment. Station S 1 sends F n. Station S 1 sends F n. Station S 2 sends an acknowledgment. Station S 2 sends an acknowledgment.

Stop and Wait: Performance  Total time to send the data, T, can be expressed as T = nT F, where T F is the time to send one frame and receive an acknowledgment. T F = t prop + t frame + t proc + t prop + t ack + t proc Where: Where: t prop = propagation time from S 1 to S 2 t prop = propagation time from S 1 to S 2 t frame = time to transmit a frame (time for the transmitter to send out all of the bits of the frame) t frame = time to transmit a frame (time for the transmitter to send out all of the bits of the frame) t proc = processing time at each station to react to an incoming event t proc = processing time at each station to react to an incoming event t ack = time to transmit an acknowledgment t ack = time to transmit an acknowledgment

Stop and Wait: Performance  Assumptions: Processing time is relatively negligible Processing time is relatively negligible Acknowledgment frame is very small compared to a data frame Acknowledgment frame is very small compared to a data frame  We obtain: T = n (2t prop + t frame )  Only (n x t frame ) is actually spent transmitting data and the rest is overhead.  The utilization, or efficiency, of the line is:

Stop and Wait: Performance  Parameter a:a = t prop / t frame  Then:  This is the maximum possible utilization of the link.  Again,  Propagation time = distance d of the link divided by the velocity V of propagation  Transmission time = length of frame in bits, L, divided by the data rate R  Therefore,

Stop and Wait: Link Utilization

Sliding Window Flow Control  Allows multiple numbered frames to be in transit  Receiver has buffer of length W  Transmitter sends up to W frames without ACK  ACK includes sequence no. of next frame expected  Sequence number is bounded by size of field (k) frames are numbered modulo 2 k frames are numbered modulo 2 k giving max window size of up to 2 k - 1 giving max window size of up to 2 k - 1  Receiver can ACK frames without permitting further transmission (Receiver Not Ready)  Must send a normal ACK to resume  If the link is full-duplex, ACKs can be piggybacked

Sliding Window Diagram

Sliding Window Example

Error Free Sliding Window: Performance  Station A begins to emit a sequence of frames at time t = 0.  The leading edge of the first frame reaches station B at t = a.  The first frame is entirely absorbed by t = a+1  Assume: Negligible processing time, B can immediately acknowledge the first frame (ACK)  Assume: The acknowledgment frame is so small that transmission time is negligible  ACK reaches A at t = 2a+1

Error Free Sliding Window: Performance  Case 1: W ≥ 2a + 1 Acknowledgment for frame 1 reaches A before A has exhausted its window. Acknowledgment for frame 1 reaches A before A has exhausted its window. A can transmit continuously with no pause and normalized throughput is 1.0. A can transmit continuously with no pause and normalized throughput is 1.0.  Case 2: W < 2a + 1 A exhausts its window at t = W and cannot send additional frames until t = 2a+1 A exhausts its window at t = W and cannot send additional frames until t = 2a+1 Normalized throughput is W time units out of a period of (2a+1) time units Normalized throughput is W time units out of a period of (2a+1) time units

Error Free Sliding Window: Link Utilization  Utilization is expressed as:

Error Free Sliding Window: Link Utilization

Error Control  Detection and correction of errors such as: Lost frames Lost frames Damaged frames Damaged frames  Common techniques use: Error detection Error detection Positive acknowledgment Positive acknowledgment Retransmission after timeout Retransmission after timeout Negative acknowledgement & retransmission Negative acknowledgement & retransmission

Automatic Repeat Request (ARQ)  ARQ – Collective name for such error control mechanisms.  Versions include:  Stop-and-wait ARQ  Go-back-N ARQ  Selective-reject ARQ

Stop-and-Wait ARQ  Source transmits single frame  Waits for ACK  Damaged frame Receiver rejects frame Receiver rejects frame Transmitter has timeout Transmitter has timeout If no ACK within timeout, retransmit If no ACK within timeout, retransmit  Damaged ACK Transmitter does not recognize, retransmits Transmitter does not recognize, retransmits Receiver gets two copies of frame Receiver gets two copies of frame Uses alternate numbering for ACKs to distinguish: ACK0 and ACK1 Uses alternate numbering for ACKs to distinguish: ACK0 and ACK1

Stop and Wait  Example: Both types of errors  Pros and cons Simple Simple Inefficient Inefficient

Stop and Wait: Performance  With no errors, max. utilization = 1/(1+2a)  Aim: Determine utilization with possibility that frames are repeated due to bit errors.  For error-free operation using stop-and-wait ARQ, where, T p is the propagation time where, T p is the propagation time

 If error occurs, where N r is the expected no. of transmissions of a frame.  Since T t / T f = (1+2a), we obtain: we obtain:  Probability that it will take exactly k attempts to transmit a frame successfully: P k-1 (1-P) P is the probability that a single frame is in error P is the probability that a single frame is in error Stop and Wait: Performance

 Therefore, for Stop-and-Wait,

Go-Back-N ARQ  Based on sliding window  If no error, ACK as usual  Use window to control number of outstanding frames  If error, reply with rejection Discard that frame and all future frames until error frame received correctly Discard that frame and all future frames until error frame received correctly Transmitter must go back and retransmit that frame and all subsequent frames Transmitter must go back and retransmit that frame and all subsequent frames

Go-Back-N ARQ – Details  Damaged Frame Error in frame i so receiver rejects frame i Error in frame i so receiver rejects frame i Transmitter retransmits frames from i Transmitter retransmits frames from i  Lost Frame Frame i lost and either Frame i lost and either Transmitter sends i+1 and receiver gets frame i+1 out of seq and rejects frame iTransmitter sends i+1 and receiver gets frame i+1 out of seq and rejects frame i Or transmitter times out and send ACK with P bit set, which receiver responds to with ACK iOr transmitter times out and send ACK with P bit set, which receiver responds to with ACK i Transmitter then retransmits frames from i Transmitter then retransmits frames from i

 Damaged Acknowledgement Receiver gets frame i, sends ACK (i+1) which is lost Receiver gets frame i, sends ACK (i+1) which is lost ACKs are cumulative, so next ACK (i+n) may arrive before transmitter times out on frame i ACKs are cumulative, so next ACK (i+n) may arrive before transmitter times out on frame i If transmitter times out, it sends ACK with P bit set If transmitter times out, it sends ACK with P bit set Can be repeated a number of times before a reset procedure is initiated Can be repeated a number of times before a reset procedure is initiated  Damaged Rejection Reject for damaged frame is lost Reject for damaged frame is lost Handled as for lost frame when transmitter times out Handled as for lost frame when transmitter times out Go-Back-N ARQ – Details

Go-Back-N ARQ: Performance  Each error generated a requirement to retransmit K frames rather than 1 frame. where f(i) is the total no. of frames transmitted if the original frame must be transmitted i times

Go-Back-N ARQ: Performance  K = (2a + 1) for W ≥ (2a + 1)  K = W for W < (2a + 1)

Go-Back-N ARQ: Link Utilization

Selective Reject ARQ  Also called selective retransmission  Only rejected frames are retransmitted  Subsequent frames are accepted by the receiver and buffered  Minimizes retransmission  Receiver must maintain large enough buffer  More complex logic in transmitter  Hence less widely used  Useful for satellite links with long propagation delays

Go-Back-N vs Selective Reject

Selective Reject: Link Utilization  Same reasoning as for Stop-and-Wait ARQ  N r = 1 / (1 – P)

Comparative Link Utilization  ARQ Utilization as a function of a (P = )

High Level Data Link Control (HDLC)  An important data link control protocol  Specified as ISO 33009, ISO 4335  Station types: Primary - controls operation of link Primary - controls operation of link Secondary - under control of primary station Secondary - under control of primary station Combined - issues commands and responses Combined - issues commands and responses  Link configurations Unbalanced - 1 primary, multiple secondary Unbalanced - 1 primary, multiple secondary Balanced - 2 combined stations Balanced - 2 combined stations

HDLC Transfer Modes  Normal Response Mode (NRM) Unbalanced config., primary initiates transfer Unbalanced config., primary initiates transfer Used on multi-drop lines, e.g. host + terminals Used on multi-drop lines, e.g. host + terminals  Asynchronous Balanced Mode (ABM) Balanced config., either station initiates transmission, has no polling overhead, widely used Balanced config., either station initiates transmission, has no polling overhead, widely used  Asynchronous Response Mode (ARM) Unbalanced config., secondary may initiate transmit without permission from primary, rarely used Unbalanced config., secondary may initiate transmit without permission from primary, rarely used

HDLC Frame Structure  Synchronous transmission of frames  Single frame format used

Flag Fields and Bit Stuffing  Delimit frame at both ends with seq.  Receiver hunts for flag sequence to synchronize  Bit stuffing used to avoid confusion with data containing flag seq inserted after every sequence of five 1s 0 inserted after every sequence of five 1s If receiver detects five 1s it checks next bit If receiver detects five 1s it checks next bit If next bit is 0, it is deleted (was stuffed bit) If next bit is 0, it is deleted (was stuffed bit) If next bit is 1 and seventh bit is 0, accept as flag If next bit is 1 and seventh bit is 0, accept as flag If sixth and If sixth and seventh bits 1, seventh bits 1, sender is sender is indicating abort indicating abort

Address Field  Identifies secondary station that sent or will receive frame  Usually 8 bits long  May be extended to multiples of 7 bits LSB indicates if is the last octet (1) or not (0) LSB indicates if is the last octet (1) or not (0)  All ones address is broadcast

Control Field  Different for different frame type Information - data transmitted to user (next layer up) Information - data transmitted to user (next layer up) Flow and error control piggybacked on information framesFlow and error control piggybacked on information frames Supervisory - ARQ when piggyback not used Supervisory - ARQ when piggyback not used Unnumbered - supplementary link control Unnumbered - supplementary link control  First 1-2 bits of control field identify frame type

Control Field  Use of Poll/Final bit depends on context  In command frame, is P bit set to1 to solicit (poll) response from peer  In response frame, is F bit set to 1 to indicate response to soliciting command  Seq. number usually 3 bits can extend to 8 bits as shown below can extend to 8 bits as shown below

Information & FCS Fields  Information Field In information and some unnumbered frames In information and some unnumbered frames Must contain integral number of octets Must contain integral number of octets Variable length Variable length  Frame Check Sequence Field (FCS) Used for error detection Used for error detection Either 16 bit CRC or 32 bit CRC Either 16 bit CRC or 32 bit CRC

HDLC Operation  Consists of exchange of information, supervisory and unnumbered frames.  Have three phases: Initialization Initialization By either side, set mode & seq.By either side, set mode & seq. Data transfer Data transfer With flow and error controlWith flow and error control Using both I & S-frames (RR, RNR, REJ, SREJ)Using both I & S-frames (RR, RNR, REJ, SREJ) Disconnect Disconnect When ready or fault notedWhen ready or fault noted

HDLC Operation Example

HDLC Operation Example – Contd.

Summary  Introduced need for data link protocols  Flow control  Error control  HDLC