EEC4113 Data Communication & Multimedia System Chapter 4: Flow Control by Muhazam Mustapha, October 2011.

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.
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.
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.
CEG3185 TUT6 Prepared by Zhenxia Zhang Revisited by Jiying Zhao.
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.
Chapter 9: Data Link Control Business Data Communications, 4e.
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.
Example Data Link Protocols Quick review Reference Models? Layers? Flow Control? Bit stuffing? Connection Oriented? Synchronous transmission?
Gursharan Singh Tatla DATA LINK PROTOCOLS 24-Mar
MODULE I NETWORKING CONCEPTS.
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.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
Computer Networks Module 3: Data Link Layer (Framing) Dr. Vikram Shete St. Francis Institute of Technology.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols.
Chapter 11 Data Link Protocols A data link protocol is a set of specifications used to implement the data link layer [A protocol is the set of rules or.
Chapter 11 Data Link Control
Data Link Layer: Data Link Control : Data Communication and Computer Networks Asst. Prof. Chaiporn Jaikaeo, Ph.D.
CIS : Data Link Control. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow Transmission.
Data Link Protocols ผศ.ดร. อนันต์ ผลเพิ่ม
1 Reliable stream service--TCP 1.TCP accepts byte stream, segments 2.It is over IP, so out-of-sequence is very common --lost or error frame results in.
FIT – Monash University High-Level Data Link Control
1 Flow&Error Control R. Supakorn. 2 Flow Control Flow control refers to a set of procedure used to restrict the amount of data that the sender can send.
Chapter 11 Data Link Control and Protocols Flow and Error Control Flow Control Error 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.
Chapter 9: Data Link Control Business Data Communications, 4e.
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 and Protocols
3.2 Data Link Layer : Error & Flow Control
ICSA 341 Data Communications & Networking
CIS 321 Data Communications & Networking
Chapter 11 Data Link Control and Protocols.
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
Jiying Zhao SITE, University of Ottawa Canada.
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:

EEC4113 Data Communication & Multimedia System Chapter 4: Flow Control by Muhazam Mustapha, October 2011

Learning Outcome By the end of this chapter, students are expected to be able to explain link level flow control of transmission involving various protocols and techniques

Chapter Content Stop-and-Wait ARQ Go-Back-N ARQ Selective Reject ARQ Line Utilization High-level Data Link Control

Automatic Repeat Request (ARQ) CO1

Stop-and-Wait ARQ Data and acknowledgement (ACK) frames are numbered. For each correctly received data frame, there will be an ACK frame. Only on receiving an ACK, sender sends the next frame. CO1

Stop-and-Wait ARQ If there is a damaged data frame –Receiver discards the frame and NAK frame is returned. –On receiving NAK, sender re-transmits the frame. If ACK or NAK is damaged or never reach sender –Sender re-transmits on wait time-out. CO1

Stop-and-Wait ARQ Normal operation diagram: ReceiverSender Time Frame1 Frame2 Frame3 Frame4 ACK1 ACK2 ACK3 ACK4 Wait CO1

Stop-and-Wait ARQ Event of damage frame: ReceiverSender Time Frame1 Frame2 Frame3 ACK1 NAK2 ACK2 ACK3 Wait × Retransmit Error occur CO1

Stop-and-Wait ARQ Event of damage ACK: ReceiverSender Time Frame1 Frame2 ACK1 ACK2 Wait × Retransmit Error occur Time out CO1

Stop-and-Wait ARQ Event of frame lost: ReceiverSender Time Frame1 Frame2 ACK1 ACK2 Wait × Retransmit Frame lost Time out CO1

Stop-and-Wait ARQ Event of lost ACK: ReceiverSender Time Frame1 Frame2 ACK1 ACK2 Wait × Retransmit ACK Lost Time out CO1

Go-Back-N ARQ A pipelined protocol. Inefficiency of Stop-and-Wait: Sender has to wait for ACK for each and every data frame sent. In Go-Back-N, sender doesn’t wait for ACK. Instead, sender keeps sending but not too rapidly – sliding window constrained. Sender will respond to ACK as it comes. CO1

Go-Back-N ARQ At receiver, all good, in-sequence frames must be ACK as normal. All out-of-sequence frames will be discarded even if they are good. On receiving bad frame, receiver sends NAK and requests for re-transmission of that frame. CO1

Go-Back-N ARQ At sender, on receiving an NAK, it re- transmits that frame, and all subsequence frames. If sender finishes sending frames within its window, but lagging behind in receiving ACK, it re-transmits in-sequence starting from earliest frame not ACK-ed. CO1

Go-Back-N ARQ Normal operation diagram: ReceiverSender Time Frame1 Frame2 Frame3 Frame4 ACK1 ACK2 ACK3 ACK Frame5 Frame6 ACK5 ACK6 CO1

Go-Back-N ARQ Event of damage frame: Receiver Sender Retransmit Error occur Frame1 ACK1 Frame2Frame3 ACK2 × NAK3 Frame4Frame5Frame6Frame3 ACK3 Frame4Frame5 ACK4ACK5... Time CO1

Go-Back-N ARQ Event of lost frame: (sender window = 6 frames) Receiver Sender Retransmit after time-out Frame lost Frame1 ACK1 Frame2 Frame3 ACK2 × Frame4Frame5Frame6Frame7 ACK3 Frame8Frame3 ACK4ACK5... Time 1 frame buffered 2 frames buffered3 frames buffered4 frames buffered 5 frames buffered6 frames buffered 1 frame buffered Frame4Frame5Frame6Frame7 2 frames buffered3 frames buffered4 frames buffered Frame8 4 frames buffered CO1

Go-Back-N ARQ Event of lost ACK: (sender window = 6 frames) Receiver Sender ACK damaged or lost Frame1 ACK1 Frame2 ACK2 × Frame4 Frame5 Frame6Frame7 ACK9 Frame8Frame9 ACK10 ACK11... Time 1 frame buffered 2 frames buffered3 frames buffered4 frames buffered 5 frames buffered4 frames buffered Frame10 Frame11 Frame12 Frame13 5 frames buffered4 frames buffered Frame14 4 frames buffered Frame3 ACK3ACK4ACK5 ACK6 ACK7 ACK8 × 4 frames buffered CO1

Selective Reject ARQ An extension of Go-Back-N but now the sender is asked to re-transmit only the damaged or lost frames. Now the receiver is required to have buffer too (same size as the sender), and to respond to any subsequence frames after the error within its buffer limit. The receiver will respond with a SREJ (or SREQ) upon a damaged or lost frame. CO1

Selective Reject ARQ The receiver will buffer the subsequence frames after the damaged or lost frames. Once the missing one is obtained, the receiver buffer is flushed up to the next missing frame (or all if no more missing). If the receiver run out of buffer before receiving the missing frame, it will stop responding, and this reduces the whole protocol to Go-Back-N ARQ. CO1

Selective Reject ARQ At sender side, sender is required to respond to SREJ immediately, then continue to normal frame sequence. If it reaches to a condition where all its buffered frames are not ACK-ed, it is too will reduce to Go-Back-N ARQ and re- transmit them all in sequence. CO1

Selective Reject ARQ Event of lost frame: Receiver Sender Frame1 ACK1 Frame2 SREJ2 × Frame4 Frame5 Frame2 Frame6 Frame7 ACK8 ACK9... Time Frame8 Frame9 Frame6 Frame10 Frame11 Frame3 ACK3ACK4ACK5ACK2 ACK7 × Frame damaged Frame lost * * 3* * 4* 3* * * * 7* * 8* 7* 6 ACK SREP6 CO1

Windowed & Pipelined Processing Go-Back-N and Selective Reject are pipelined and windowed ARQ. Pipelined means they don’t wait for the transmitted frames to be ACK-ed, instead continue with transmission of next frame in buffer. In Go-Back-N ARQ, only sender needs buffers, receiver doesn’t. CO1

Windowed & Pipelined Processing In Selective Reject ARQ, both sender and receiver need buffers. For both sides, the buffer (window) size must be the same so that flushing can be properly timed. And the window size <= half of possible frame number = 2 n-1, n is the no. bits available to encode the frames – to avoid ambiguity in the frame numbers. CO1

Detailed Window Processing Sender sends frames to receiver –Sender’s windows shrinks according to the no. frames sent –Sent frames would still be kept in sender’s buffer Receiver receives frames from sender –Receiver’s windows shrinks according to the no. frames received CO1

Detailed Window Processing Receiver sends ACK to sender –Receiver’s windows expands according to the no. ACK sent –Receiver’s windows restores to the original size Sender receives ACK-s from receiver –Sender’s windows expands according to the no. ACK-s received –Sender’s windows restores to the original size CO1

Detailed Window Processing Sender Buffer Receiver Buffer Initial After 3 frames sent and received Sender Buffer Receiver Buffer Window After 3 ACK received Sender Buffer Receiver Buffer CO1

Piggyback Transmission There are times where the receiver too has to transmit data to the sender besides the acknowledgement data. –E.g. AJAX transaction, HTML page with many images (request for next image is made before the currently sending finished) To improve efficiency of such bi-directional transmission, piggyback technique is used –Data frame with additional field to carry ACK CO1

Piggyback Transmission If the receiver wants to send both data and ACK to sender, it will send both fields. If the receiver wants to send only ACK, a separate ACK frame is sent – not a piggybacked data. If the receiver wants to send only data, the data is sent with the previous ACK which is ignored by the sender side due to duplication. CO1

Line Utilization CO2

Line Utilization A measure ( a ) of ratio between no. bits present on a physical link ( B ) over no. bits per frame ( L ) a = B / L a is to be made as close to 1 as possible for the line to be utilized optimally. This can be achieved by adjusting L. –Value of L needs to be optimized for various protocols so that a is close enough to 1. CO2

Line Utilization B can be computed from data rate ( R in bps), physical distance ( d in meters) and velocity of propagation ( V in ms -1 ): B = R × d/V CO2

Line Utilization Consider 1Mbps ( R ) link between 2 ground stations communicating through satellite relay. Geo-satellite: altitude of 36000km ( d ) Propagation velocity: 3×10 8 ms -1 ( V ) B = 240,000 bits For a frame length of 8000 bits, a = 30 CO2

Line Utilization Sender finishes sending long before first bit physically arrived at receiver. This is a serious inefficiency in link utilization. 240,000 bits 8000bits CO2

Line Utilization Consider 200 m ( d ) optical fiber operating at 1 Gbps ( R ). Propagation velocity: 2×10 8 ms -1 ( V ) B = 1000 bits For a frame length of 8000 bits, a = CO2

8000bits Line Utilization Sender doesn’t finish sending long after first bit physically arrived at receiver. This is also an inefficiency because the rest of the circuitry might need wait too long for this operation to finish bits CO2

High-level Data Link Control CO1

HDLC High-level Data Link Control A set of control commands made by OSI to control data link communication. To accomplish the data link control task, HDLC defines the following: –3 types of stations –2 link configurations –3 data transfer modes CO1

HDLC Station Types Primary station –Controls operation of link –Frames sent-out are called commands –Maintains separate logical link to each secondary station Secondary station –Under control of primary station –Frames sent out are called responses Combined station –May send out commands and responses CO1

HDLC Link Configurations Unbalanced –One primary and one or more secondary stations –Supports full duplex and half duplex Balanced –Two combined stations –Supports full duplex and half duplex CO1

HDLC Transfer Modes Three HDLC transfer modes –Normal Response Mode (NRM) –Asynchronous Response Mode (ARM) –Asynchronous Balanced Mode (ABM) CO1

Normal Response Mode (NRM) One primary and one or more secondary (point-to-point or multicast) Used with unbalanced configuration Primary initiates transfer to secondary Secondary may only transmit data in response to command from primary Host computer as primary Terminals as secondary CO1

Normal Response Mode (NRM) Command Response Primary Secondary Command Secondary Response Unicast / Point-to-point Multicast CO1

Asynchronous Response Mode (ARM) One primary and one secondary (point-to- point) Used with unbalanced configuration Primary sends commands, secondary can respond at any time Command Response PrimarySecondary CO1

Asynchronous Balanced Mode (ABM) Two combined stations Used with balanced configuration Either station may initiate transmission without receiving permission Most widely used No polling overhead Command/Response Combined CO1

HDLC Frame Structure HDLC uses synchronous transmission All transmissions in frames Single frame for all data and control exchanges FlagAddressControlInformationFCSFlag 8 bits 8 bits extendable 8 or 16 bitsvariable16 or 32 bits CO1

Flag Fields Delimit a frame at both ends An 8 bit sequence with a pattern Each frame has 1 opening and 1 closing flag Receiver hunts for flag sequence to synchronize Bit stuffing used to avoid confusion with data containing FlagAddressControlInformationFCSFlag 8 bits CO1

Bit Stuffing Bit stuffing used to avoid confusion with data containing –Insert a 0 after every five consecutive 1-s If receiver reads five 1-s, it checks the next bit: –If it is 0, it is ignored –If it is 1, and the next is 0, then it is a flag –If it is 1, and the next is 1, then it is abort flag CO1

Bit Stuffing Inserted bits Before bit stuffing After bit stuffing CO1

Address Field Identifies secondary station that sent or receive frame Usually 8 bits long with binary 1 in LSB LSB indicates if the byte is the last byte (binary 1) or not (binary 0) MSB binary 0: unicast MSB binary 1: multicast / broadcast FlagAddressControlInformationFCSFlag 8 bits extendable CO1

Control Field Control field defines the three types: –Information Frames (I-frames) –Supervisory Frames (S-frames) –Unnumbered Frames (U-frames) First 1 or 2 bits of control field identify the frame type FlagAddressControlInformationFCSFlag 8 or 16 bits CO1

Control Field – I-frames Carry user data Flow and error control are piggybacked on this frame FlagAddressControlInformationFCSFlag CO1

Control Field – S-frames Provide ARQ mechanism when piggyback is not used FlagAddressControlFCSFlag CO1

Control Field – U-frames Provide supplemental link control functions FlagAddressControl Management Information FCSFlag CO1

Control Field – 8 bits format N(S)P/F 10 S 11 M N(R) M I-frame S-frame U-frame N(S): Send sequence number N(R): Receive sequence number S: Supervisory function bits M: Unnumbered function bits P/F: Poll/Final bit CO1

Control Field – 16 bits format N(S): Send sequence number N(R): Receive sequence number S: Supervisory function bits P/F: Poll/Final bit 0 I-frame S-frame 10S0000P/FN(R) N(S)P/FN(R) CO1

Poll / Final Bit If it is a command frame (from primary to secondary), then, –The bit is called P (poll) bit –If the bit is 1, it means the command is polling (soliciting) response from the peer If it is a response frame (from secondary to primary), then, –The bit is called F (final) bit –If the bit is 1, it means the response is responding to a soliciting (polling) command CO1

Information Field Appears only in I-frames or some U-frames It is variable length, but must be in integral number of bytes FlagAddressControlInformationFCSFlag variable CO1

FCS Field Contains the Frame Check Sequence for error detection purposes Usually 16 bit CRC (if 16 FCS) or may be 32 bit CRC (if 32 FCS) FlagAddressControlInformationFCSFlag 16 or 32 bits CO1

HDLC Commands & Responses NameCommand/ Response Information (I)C/R Supervisory (S) Receive ready (RR / ACK)C/R Receive not ready (RNR)C/R Reject (REJ)C/R Selective Reject (SREJ)C/R Unnumbered (U) Set normal response mode (SNRM)C Set asynchronous response mode (SARM)C Set asynchronous balanced mode (SABM)C Set initialization mode (SIM)C CO1

HDLC Commands & Responses NameCommand/ Response Unnumbered (U) continued Disconnect (DISC)C Unnumbered acknowledge (UA)R Disconnected mode (DM)R Request disconnect (RD)R Request initialization mode (RIM)R Unnumbered information (UI)C/R Unnumbered poll (UP)C Reset (RSET)C Exchange identification (XID)C/R Test (TEST)C/R Frame reject (FRMR)R CO1

HDLC Operation Three phases: –Initialization –Data transfer –Disconnect CO1

Example Operation (1) AB SABM Time out UA DISC UA Setup and disconnect CO1

Example Operation (2) AB I,0,0 I,1,1 I,0,1 Two way data exchange N(S) N(R) I,2,1 I,1,3 I,3,2 I,2,4 I,3,4 RR,4 CO1

Example Operation (3) AB RNR,4 I,3,0 Busy condition RR,0,P RNR,4,F RR,0,P RR,4,F I,4,0 CO1

Example Operation (4) AB I,3,0 Reject recovery REJ,4 I,4,0 I,5,0 I,4,0 I,5,0 I,6,0 CO1

Example Operation (5) AB I,2,0 Timeout recovery RR,3 I,3,0 RR,0,P Time out RR,3,F I,3,0 RR,4 CO1