Institute of Computer Technology - Vienna University of Technology. L02 - Protocol Principles

Similar documents
Line Protocols. Protocol Principles. Two Important Principles for Data Communication. Agenda

Agenda. Protocol Principles

HDLC (High level Data Link Control)

Line Protocol Basics. HDLC (High level Data Link Control) Agenda. Additional Issues

HDLC. King of the Link 2005/03/11. (C) Herbert Haas

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

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

3. Data Link Layer 3-2

Protocol Principles. Framing, FCS and ARQ 2005/03/11. (C) Herbert Haas

INTERNET ARCHITECTURE & PROTOCOLS

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

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

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

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

Data Link Control Protocols

Data Link Control Protocols

Chapter 11 Data Link Control 11.1

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

Chapter 7: Data Link Control. Data Link Control Protocols

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

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

Chapter 11 Data Link Control 11.1

Data and Computer Communications

UNIT IV -- TRANSPORT LAYER

Data Link Layer. Learning Objectives. Position of the data-link layer. MCA 207, Data Communication & Networking

Outline. CS5984 Mobile Computing

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

Data Link Control. Outline. DLC functions

HDLC PROTOCOL. Michel GARDIE

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Peer-to-Peer Protocols and Data Link Layer. Chapter 5 from Communication Networks Leon-Gracia and Widjaja

Telematics. 5th Tutorial - LLC vs. MAC, HDLC, Flow Control, E2E-Arguments

CS422 Computer Networks

Introduction to Networks and the Internet

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

Narrowband ISDN. (ISDN = Integrated Services Digital Network)

Data Link Layer, Part 4. Exemplary Protocols

User Datagram Protocol (UDP):

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

TCP/IP Performance ITL

Transport Layer Protocols. Internet Transport Layer. Agenda. TCP Fundamentals

INTERNATIONAL TELECOMMUNICATION UNION. SERIES Q: DIGITAL SUBSCRIBER SIGNALLING SYSTEM No. 1 (DSS 1), DATA LINK LAYER

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

1.6 Error Control Strategies

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

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols

Part 5: Link Layer Technologies. CSE 3461: Introduction to Computer Networking Reading: Chapter 5, Kurose and Ross

(Refer Slide Time: 2:20)

Communication Networks

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

Chapter 24. Transport-Layer Protocols

ECE 650 Systems Programming & Engineering. Spring 2018

Network Working Group Request for Comments: 1663 Category: Standards Track July 1994

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

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

Introduction to Protocols

CS457 Transport Protocols. CS 457 Fall 2014

NWEN 243. Networked Applications. Layer 4 TCP and UDP

OSI Reference Model. Application Layer. Presentation Layer. Session Layer. Chapter 4: Application Protocols. Transport Layer.

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer

CHAPTER 15 LOCAL AREA NETWORKS ANSWERS TO QUESTIONS

Lecture 3: The Transport Layer: UDP and TCP

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

ETSI TC SMG TDoc SMG 938/97

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

Chapter 3. The Data Link Layer

Packet Switching. Communication Networks Chapter 10: Connection-Oriented PDNs

The University of Sydney AUSTRALIA. Advanced Communication Networks

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Telematics. 5rd Tutorial - LLC vs. MAC, HDLC, Flow Control, E2E-Arguments

Multiple unconnected networks

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

CCNA Exploration1 Chapter 7: OSI Data Link Layer

TCP: Flow and Error Control

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione. Link Layer. Fundamentals of Communication Networks


Internet Transport Layer

Problem 7. Problem 8. Problem 9

1999, Scott F. Midkiff

Transport Layer Protocols. Internet Transport Layer. Agenda

8. TCP Congestion Control

CONNECTION-ORIENTED & CONNECTIONLESS NETWORKS

Peer entities. Protocol Layering. Protocols. Example

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018

Local Networks. Lecture 4 6-Apr-2016

Automatic Repeat Request Data Link Layer Traffic Management

CSCD 330 Network Programming Winter 2015

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

INTERNATIONAL TELECOMMUNICATION UNION. SERIES X: DATA COMMUNICATION NETWORKS: SERVICES AND FACILITIES, INTERFACES Interfaces

Direct Link Communication I: Basic Techniques. Data Transmission. ignore carrier frequency, coding etc.

TSIN02 - Internetworking

Connectionless and Connection-Oriented Protocols OSI Layer 4 Common feature: Multiplexing Using. The Transmission Control Protocol (TCP)

Networked Systems and Services, Fall 2018 Chapter 3

Network Working Group Request for Comments: 1434 IBM March Data Link Switching: Switch-to-Switch Protocol

User Datagram Protocol

ECE697AA Lecture 3. Today s lecture

Transcription:

Protocol Principles Layering, CL versus CO Service, ARQ Techniques, Sequence umbers, Windowing, Flow Control Agenda Introduction 3 Layer Model and Service Types ARQ Techniques Introduction Idle RQ Continuous RQ Selective Acknowledgement GoBack Positive Acknowledgement Selective Reject Sequence umbers and Windowing Delay Bandwidth Product Flow Control HDLC Overview Protocol Principles, v4.8 Page -

Line Protocols line protocols regulate and control communication between two devices over pointto-point line basic elements frame synchronization frame protection error detection usually implemented in hardware optional elements connection and line management error recovery flow control usually implemented in software Protocol Principles, v4.8 3 Two Important Principles for Data Communication Layering Structuring the complex task of data communication into smaller pieces by usage of layers A layer is built by the resources of the corresponding protocol peer entities and by the protocol procedures performed between them protocol standards define fields of the control field of a frame (bits seen on the wire) and the communication behavior of the peers receiving and sending frames A layer is using the services of the lower layers to provide a enhanced service to the upper layer The application layer can access the lower layer (the protocol stack) via API (application programming interface) The communication layer can access the lower layer via network-card driver Connectionless versus connection-oriented service Protocol Principles, v4.8 4 Page -

3 Layer Model Computer A Computer B OS OS application software application software communication software line protocol logical relationship between peers communication software communication hardware Tmt_A Rcv_A physical wires for transmit and receive signal reference Rcv_B Tmt_B communication hardware Protocol Principles, v4.8 5 Software Aspects application software uses the communication software (normally part of an operating system, OS) in order to exchange data mailbox and queueing techniques allow cooperation of application and communication software within a computer system the communication software uses a line protocol for peer to peer communication virtual communication relationship on a given layer hides the details of line protocols and other related tasks from the application software procedural approach Protocol Principles, v4.8 6 Page - 3

Cooperation of Software Layers if information has to be transmitted from A to B the application SW of device A forwards some data blocks to the communication SW the communication SW transmits the data using the communication hardware and the line protocol the communication SW of device B receives the data and forwards it to the application SW that means, the communication SW provides a service for the application SW this service can be connection-less or connection-oriented Protocol Principles, v4.8 7 Connectionless Service (Com-SW) Station A like packet or telegram service of a PTT Station B Datagram's transmission of data Datagram's no error recovery of corrupted frames Protocol Principles, v4.8 8 Page - 4

Line Protocol Services - CL Connection-Less (CL) - type of service communication SW uses only basic elements (frame synchronization, frame protection, error detection) to transmit data blocks transmission errors causes receiver to discard data blocks best effort service no special frame types are necessary to implement this protocol strategy low implementation requirements for communication SW but error recovery (correction of errors) must be done by application Protocol Principles, v4.8 9 Phases with Connection-Oriented Service Station A like telephone call of Telecom Station B Connection Request Connection Acknowledgement connection establishment DATA transmission of data Disconnection Request Disconnected Acknowledgment error recovery of corrupted frames is possible by usage of ARQ techniques clearing of connection Protocol Principles, v4.8 Page - 5

Line Protocol Services - CO Connection-Oriented (CO) - type of service a communication channel must be established before data blocks can be transmitted logical connection transmission errors will be detected and corrected by the communication SW using feedback error control retransmission of corrupted data blocks Automatic Repeat request (ARQ) method reliable transmission service for application SW error recovery done by communication SW special frame types are necessary (connect, disconnect) more sophisticated communication SW is necessary in order to implement ARQ strategy Protocol Principles, v4.8 Agenda Introduction 3 Layer Model and Service Types ARQ Techniques Introduction Idle RQ Continuous RQ Selective Acknowledgement GoBack Positive Acknowledgement Selective Reject Sequence umbers and Windowing Delay Bandwidth Product Flow Control HDLC Overview Protocol Principles, v4.8 Page - 6

ARQ Techniques Overview Connection-oriented service allows error recovery by usage of feedback error control ARQ (Automatic Repeat Request) techniques Receiver acknowledges correct receipt of data frame Idle-RQ Easy to implement (few resources necessary) but inefficient concerning usage of bandwidth in case of full-duplex line Continous-RQ Several methods» Selective ACK (e.g. TCP optional SACK procedure)» GoBack (e.g. HDLC basic REJ procedure)» Positive Acknowledgement (e.g. TCP basic procedure)» Selective Reject (HDLC optional SREJ procedure) More complex to implement (much more resources necessary), more efficient concerning usage of bandwidth in case of full-duplex line Protocol Principles, v4.8 3 Idle-RQ versus Continuous-RQ Data Idle-RQ Data Continuous-RQ Ack Data Acks Data and Acks are sent continuously!! Ack Data Ack half duplex protocol full duplex protocol Protocol Principles, v4.8 4 Page - 7

ARQ Variants Idle-RQ Continuous-RQ Selective ACK (SACK) GoBack Positive ACK Selective Reject (SREJ) Protocol Principles, v4.8 5 ARQ Principle correct receipt of each transmitted data frame is acknowledged by the receiver special control message (ACK) in opposite direction each data frame transmitted is stored in a retransmission buffer until receipt of corresponding acknowledgement if acknowledgement is not received, data frame will be retransmitted after a out identifiers (, +,...) are necessary to mark the sequence of data frames and to recognize duplicate frames Protocol Principles, v4.8 6 Page - 8

ecessary Resources for Com-SW Layer OS Computer A application software communication software Protocol State Machine Retransmission List Receive List Timers Control Variables Queues / Mailboxes for operating API OS Computer B application software communication software communication hardware Tmt_A Rcv_A signal reference Rcv_B Tmt_B communication hardware Protocol Principles, v4.8 7 ecessary Resources for Com-SW Layer (cont.) OS Computer A application software communication software Frame Types: Connect request / ack Disconnect request / ack I, ACK, ACK, SREJ Identifiers line protocol OS Computer B application software communication software communication hardware Tmt_A Rcv_A signal reference Rcv_B Tmt_B communication hardware Protocol Principles, v4.8 8 Page - 9

Generic Frame Format frame header frame trailer payload SYC SD Control DATA FCS ED control information = line protocol header checksum Frame Type Field: Connect Request, I, ACK, ACK, Identifier Field:, +, Protocol Principles, v4.8 9 Idle-RQ and Continuous-RQ Facts Idle-RQ old and slow method but small code and only little resources necessary even today used e.g. TFTP (Trivial File Transfer Protocol) half duplex protocol Continuous-RQ requires dramatically more resources than Idle-RQ or connectionless protocols!!! Retransmission Timers Retransmission Buffers Receive Buffers might result in high CPU loads!!! full duplex protocol Protocol Principles, v4.8 Page -

Agenda Introduction 3 Layer Model and Service Types ARQ Techniques Introduction Idle RQ Continuous RQ Selective Acknowledgement GoBack Positive Acknowledgement Selective Reject Sequence umbers and Windowing Delay Bandwidth Product Flow Control HDLC Overview Protocol Principles, v4.8 Idle-RQ simple ARQ implementation stop & wait protocol device waits for the acknowledgement (ACK) before sending the next data frame basic method can be improved by ACK two identifiers are necessary (, ) distinction between new data frame or duplicate frame numbering of data frames modulo half duplex protocol full duplex lines can not be efficiently used Protocol Principles, v4.8 Page -

Basic Sequence of Idle-RQ response S + retransmission buffer I () ACK () I (+) ACK (+) D + receive buffer S Source of I () D Destination I () I () Information Frame containing Data ACK () Acknowledgment Frame Protocol Principles, v4.8 3 Idle-RQ Retransmission o Ack? Retransmission! S out I () I () ACK () D Protocol Principles, v4.8 4 Page -

Idle-RQ Retransmission o Ack? Retransmission! S out I () ACK () I () ACK () D recognition of duplicate frame Protocol Principles, v4.8 5 Idle-RQ Retransmission with optional ACK ACK () ot Acknowledgment Frame S I () ACK () I () ACK () D Protocol Principles, v4.8 6 Page - 3

Agenda Introduction 3 Layer Model and Service Types ARQ Techniques Introduction Idle RQ Continuous RQ Selective Acknowledgement GoBack Positive Acknowledgement Selective Reject Sequence umbers and Windowing Delay Bandwidth Product Flow Control HDLC Overview Protocol Principles, v4.8 7 Continuous-RQ in order to use full duplex lines more efficiently, device does not wait for acknowledgements for frames already sent Continuous Repeat request (C-RQ) protocols full duplex protocol until receipt of acknowledgments, data frames are buffered in a retransmission list each incoming acknowledgment removes the corresponding data frame from that list receiver stores data frames in receive list to detect duplicates to reorder the sequence Protocol Principles, v4.8 8 Page - 4

Sequence of Continuous-RQ S I () + I (+) + + I (+) +3 + + I (+3) +3 + + ACK () ACK (+) +3 + +3 ACK (+) ACK (+3) retransmission list (FIFO) D + + + + + +3 receive list (FIFO) S Source of I () D Destination I () Protocol Principles, v4.8 9 Error Control Variants with Continuous-RQ several methods for error control based on selective acknowledgement selective retransmission done implicitly order of frames is not maintained by the procedure e.g. TCP (Transmission Control Protocol) SACK option based on multiple and negative acknowledgement also known as GoBack order of frames is maintained by the procedure e.g. HDLC (High Level Data Link Control) check pointing technique and REJ option e.g. DDCMP (Digital Data Link Control Management Protocol) Protocol Principles, v4.8 3 Page - 5

Error Control Variants with Continuous-RQ several methods for error control (cont.) based on out and positive acknowledgement order of frames is not maintained by the procedure e.g. TCP s original procedure (early TCP) note: today's TCP uses additionally duplicate ACK s to signal the rate of frames leaving the network to the sender based on selective reject selective retransmission done explicitly order of frames is not maintained by the procedure e.g. HDLC s SREJ option Protocol Principles, v4.8 3 Agenda Introduction 3 Layer Model and Service Types ARQ Techniques Introduction Idle RQ Continuous RQ Selective Acknowledgement GoBack Positive Acknowledgement Selective Reject Sequence umbers and Windowing Delay Bandwidth Product Flow Control HDLC Overview Protocol Principles, v4.8 3 Page - 6

Selective Acknowledgement principle every data frame is exclusively confirmed if acknowledgment is not received, corresponding data frame will be sent again and stored at the end of the retransmission list in case of retransmission data frames may not remain in sequence (scenario ) receiver must recognize duplicate frames and discard them (scenario ) each transmitted data frame starts an individual r which will be reset, if acknowledgement is received if out occurs data frame is sent once again (scenario 3) Protocol Principles, v4.8 33 Selective Acknowledgement ACK (+) triggers implicitly retransmission of I (+) at S S + + + +3 + + +3 + + + +3 + I () I (+) I (+) I (+3) ACK () ACK (+) ACK (+3) I (+) ACK (+) D + + +3 + +3 + reordering of frames necessary Protocol Principles, v4.8 34 Page - 7

Selective Acknowledgement ACK (+) triggers implicitly retransmission of I (+) at S S I () + I (+) + + I (+) +3 + + I (+3) ACK () +3 + + ACK (+) ACK (+) ACK (+3) + +3 + I (+) ACK (+) D + + + + + +3 + + +3 recognition of duplicate frames Protocol Principles, v4.8 35 Selective Acknowledgement 3 out for frame + S I () +.. + + I (+) ACK () ACK (+) I (+) ACK (+) D + + recognition of duplicate frames Protocol Principles, v4.8 36 Page - 8

Agenda Introduction 3 Layer Model and Service Types ARQ Techniques Introduction Idle RQ Continuous RQ Selective Acknowledgement GoBack Positive Acknowledgement Selective Reject Sequence umbers and Windowing Delay Bandwidth Product Flow Control HDLC Overview Protocol Principles, v4.8 37 GoBack principle in case of errors, all data frames since will be requested again by ACK() (egative Ack.) all following frames are discarded by receiver until frame with correct sequence number arrives reordering is not necessary in this case SW at receiver could be kept more simple a single acknowledgments could confirm multiple data frames (multiple acknowledgement) often use to spare number of Ack s in opposite direction each transmitted data frame starts an individual r which will be reset, if acknowledgement is received if out occurs data frame is sent once again (scenario 3) Protocol Principles, v4.8 38 Page - 9

GoBack S I () + I (+) + + I (+) +3 + + I (+3) +3 + + ACK () +3 + + ACK (+) I (+) +3 + + I (+)... ACK (+) D I(+) and I(+3) are skipped at D!!! + reordering of frames not necessary Protocol Principles, v4.8 39 GoBack ACK (+) acknowledges all frames up to I (+) at S -> multiple acknowledgment S I () + I (+) + + I (+) +3 + + I (+3) ACK () +3 + + +3 ACK (+) ACK (+) ACK (+3) D + + + + + +3 Protocol Principles, v4.8 4 Page -

GoBack 3 out for frame + S I () +.. + + I ( +) ACK () I ( +) ACK (+) D + Protocol Principles, v4.8 4 GoBack 4 out for frame S I () + I (+) ACK () + I () + I (+)... ACK () D I(+) is skipped at D!!! Protocol Principles, v4.8 4 Page -

Agenda Introduction 3 Layer Model and Service Types ARQ Techniques Introduction Idle RQ Continuous RQ Selective Acknowledgement GoBack Positive Acknowledgement Selective Reject Sequence umbers and Windowing Delay Bandwidth Product Flow Control HDLC Overview Protocol Principles, v4.8 43 Positive Acknowledgement principle data frames will be confirmed as long as frames arrives in sequence multiple acknowledgement can be used by receiver if data frames get out of sequence, confirmation is stopped nevertheless, all following data frames will be stored each transmitted data frame starts an individual r which will be reset, if acknowledgement is received if out occurs data frame is sent once again (scenario ) data frames which are already stored in the receiver can be confirmed with multiple acknowledgements when missing data frame arrives (scenario ) Protocol Principles, v4.8 44 Page -

Positive Acknowledgement out for frame + S + + + +3 + + +3 + + +3 + + +3 + + I () I (+) I (+) I (+3) ACK () I (+) ACK (+3) D + + +3 + +3 + reordering of frames necessary Protocol Principles, v4.8 45 Positive Acknowledgement ACK (+) acknowledges all frames up to I (+) at S -> multiple acknowledgment S I () + I (+) + + I (+) +3 + + I (+3) ACK () +3 + + +3 ACK (+) ACK (+) ACK (+3) D + + + + + +3 Protocol Principles, v4.8 46 Page - 3

Agenda Introduction 3 Layer Model and Service Types ARQ Techniques Introduction Idle RQ Continuous RQ Selective Acknowledgement GoBack Positive Acknowledgement Selective Reject Sequence umbers and Windowing Delay Bandwidth Product Flow Control HDLC Overview Protocol Principles, v4.8 47 Selective Reject principle data frames will be confirmed as long as frames arrives in sequence multiple acknowledgement can be used by receiver in case of an error, only the data frame causing the error will be requested explicitly through SREJ() by the receiver in case of retransmission data frames may not remain in sequence (scenario ) each transmitted data frame starts an individual r which will be reset, if acknowledgement is received if out occurs data frame is sent once again (scenario 3) Protocol Principles, v4.8 48 Page - 4

Selective Reject SREJ (+) triggers explicitly retransmission of I (+) at S, ACK (+3) acknowledges all frames up to I (+3) at S -> multiple acknowledgment S + + + +3 + + +3 + + + +3 + I () I (+) I (+) I (+3) ACK () SREJ (+) I (+) ACK (+3) D + + +3 + +3 + reordering of frames necessary Protocol Principles, v4.8 49 Selective Reject ACK (+) acknowledges all frames up to I (+) at S -> multiple acknowledgment S I () + I (+) + + I (+) +3 + + I (+3) ACK () +3 + + +3 ACK (+) ACK (+) ACK (+3) D + + + + + +3 Protocol Principles, v4.8 5 Page - 5

Selective Reject 3 out for frame + S I () +.. + + I (+) ACK () ACK (+) I (+) ACK (+) D + + recognition of duplicate frames Protocol Principles, v4.8 5 Agenda Introduction 3 Layer Model and Service Types ARQ Techniques Introduction Idle RQ Continuous RQ Selective Acknowledgement GoBack Positive Acknowledgement Selective Reject Sequence umbers and Windowing Delay Bandwidth Product Flow Control HDLC Overview Protocol Principles, v4.8 5 Page - 6

Sequence umber identifiers of data frames are implemented by increasing numbers sequence numbers the number used in I-frames send sequence number (S) the number used in ACK/ACK/SREJ-frames receive sequence number (R) register variables are necessary V(S), V(R) must be initialized (set to ) by connection setup handling of V(S), V(R), (S), and (R) will be explained in next slides for GoBack Protocol Principles, v4.8 53 V(S), V(R) with GoBack V(S) indicates the sequence number of the next I-frame that will be sent V(R) indicates the expected sequence number of the next in-sequence I-frame to be received this value will be seen in (R) prior to sending an I-frame, the value of (S) is set to the value of V(S) afterwards V(S) is increased by one Protocol Principles, v4.8 54 Page - 7

V(S), V(R) with GoBack receiver only accepts I-frames with (S) = V(R) after successful receipt of a frame V(R) will first be increased by one and then acknowledgment with (R) = V(R) will be sent therefore receipt of ACK with (R) = x means that all I-frames until x- are confirmed Protocol Principles, v4.8 55 GoBack V (S): S 3 4 3 I () I () I () I (3) 3 3 3 ACK () ACK () ACK (3) ACK (4) D (S) receive buffer 3 (R) V (R): 3 4 Protocol Principles, v4.8 56 Page - 8

GoBack V (S): 3 4 S 3 3 3 3 I () I () I () I (3) ACK () ACK () I () I () ACK () D V (R): Protocol Principles, v4.8 57 GoBack 3 V (S): 3 4 S 3 I () I () I () I (3) 3 3 ACK () ACK () ACK (3) ACK (4) D 3 multiple acknowledgement V (R): 3 4 Protocol Principles, v4.8 58 Page - 9

Initializing / Transmission Pause connection establishment initializes V(S) and V(R) after connection establishment connection is maintained by keepalive messages during transmission pauses example for keepalive technique exchange of HELLO (request / poll) and ACK (response) ACK is used for acknowledgment as well as for connection maintenance because of this an ACK() only confirms all frames up to - and not up to sender can distinguish between a keepalive response and acknowledgement of a new data frame Protocol Principles, v4.8 59 Initializing / Keepalive V (S): x x connect request hello I () receive buffer connect confirm.. ACK () ACK () V (R): x Protocol Principles, v4.8 6 Page - 3

Keepalive V (S): 3 4 4 4 5 5 5 3 3 4 4 4 I (3) hello I (4) ACK (4).. ACK (4) ACK (5) 3 4 V (R): 3 4 4 4 5 Protocol Principles, v4.8 6 Piggyback Acknowledgement confirmation of every data frame is only appropriate for data flow in one direction acknowledgment frames produce unnecessary overhead with full duplex data traffic acknowledgments contained in data frames in opposite direction can avoid that overhead piggyback acknowledgement if no backward data frame is waiting for transmission ACK frame will be sent still Protocol Principles, v4.8 6 Page - 3

Piggyback Acknowledgement retrans. list A > B v (r) V (S) A V (R) v (s) 3 4 3 4 5 3 I (,) I (,) I (,) I (3,) (S) receive buffer n (r) B 3 I (,) I (,) I (,3) 3 4 3 5 4 3 I (4,) I (5,) 5 4 3 4 3 5 3 3 4 5 6 3 4 4 4 I (3,4) 5 4 3 n (s) (R) retrans list B -> A receive buffer Protocol Principles, v4.8 63 Data Flow in both Directions data frames contain both send sequence number and receive sequence number of backward direction now I-frames and ACK/ACK-frames can arise in both directions communication devices must contain both V(S)- and V(R)-registers, retransmission and receive lists (S), (R), V(S) und V(R) control data transfer from A to B n(s), n(r), v(s) und v(r) control data transfer from B to A Protocol Principles, v4.8 64 Page - 3

Windowing without a restriction of the number of unconfirmed data frames, continuos-rq would require infinite number of identifiers and buffer memory for that reason, the amount W of data frames stored for retransmission must be limited W = send window if limit is reached, sending of additional data frames is stopped until receipt of acknowledgement indicates that window is opened again windowing Protocol Principles, v4.8 65 Principle of Windowing Event t: Ack = 4 Window W = 5 3 4 5 6 7 8 9... Sent and already acknowledged Sent but not yet acknowledged Will send as soon as possible can't send until window moves Usable window Protocol Principles, v4.8 66 Page - 33

Sliding Windowing Event t: Ack = 6 Window W = 5 3 4 5 6 7 8 9... Sent and already acknowledged Usable window can't send until window moves Protocol Principles, v4.8 67 Consequences of Windowing windowing reduces the buffer memory for retransmission buffer and receive-list buffer size of retransmission buffer = W * maximum frame size windowing reduces the number of identifiers numbering of data frames can be done by a modulo operation e.g. GoBack with send window = W needs W+ identifiers because of worst case scenario next slide data frames can be numbered modulo W+ e.g. Selective Acknowledgement with send window = W needs W identifiers because of worst case scenario data frames can be numbered modulo W Protocol Principles, v4.8 68 Page - 34

Windowing with umbering Modulo W+ GoBack and send-window W means W+ Identifier and numbering with modulo W+ Window W = 5 3 4 5 3 4 5... Sent and already acknowledged Sent but not yet acknowledged Will send as soon as possible can't send until window moves Usable window Protocol Principles, v4.8 69 Worst Case Scenario with GoBack and W=3 V (S): W = 3 -> stop 3 Timeout I () Timeout I () Timeout I () I () I () I () ACK () ACK () ACK (3) ACK (3) I () I () I () receive buffer V (R): 3 3 3 3 duplicate frames Protocol Principles, v4.8 7 Page - 35

Required umber of Identifiers For worst case scenario of slide before: window for sending is full after sending of I-frames, and sender stops no acknowledgement arrives at sender after out, I-frames, and will be sent again at this, receiver expects I-frame 3 and therefore all received frames (duplicates) are discarded only I-frame with (S) = 3 is accepted as new I-frame for that reason, the required number of identifiers is 4 W+ (identifiers are numbered,,, 3) similar considerations for other ARQ error control techniques Protocol Principles, v4.8 7 Agenda Introduction 3 Layer Model and Service Types ARQ Techniques Introduction Idle RQ Continuous RQ Selective Acknowledgement GoBack Positive Acknowledgement Selective Reject Sequence umbers and Windowing Delay Bandwidth Product Flow Control HDLC Overview Protocol Principles, v4.8 7 Page - 36

Time to Transmit a given umber of Bytes Serialization Delay (in ms) = [ ( umber of Bytes * 8 ) / ( Bitrate in sec ) ] * Bitrate 9,6 kbit/s 48 kbit/s 8 kbit/s,48 Mbit/s Mbit/s Mbit/s 55 Mbit/s 6 Mbit/s Gigabit/s umber of Byte Delay in msec ( -3 ) Delay in msec ( -3 ) Delay in msec ( -3 ) Delay in msec ( -3 ) Delay in Delay in msec ( -3 ) msec ( -3 ) Delay in msec ( -3 ) Delay in msec ( -3 ) Delay in msec ( -3 ) Bit,5,467,833,783,488,,,6,, Byte,833333,66667,65,396,8,8,5,3,8 PCM-3 3 6,666667 5,333333,,5,56,56,65,4,56 ATM cell 53 44,66667 8,833333 3,35,73,44,44,735,68,44 Ethernet 64 53,333333,666667 4,,5,5,5,333,83,5 X.5 56 3,333333 4,666667 6,,,48,48,33,393,48 IP 576 48, 96, 36,,5,468,468,979,748,468 Ethernet.58.65, 53, 94,875 5,99688,44,44,78348,954,44 FR 8.9 6.86,666667.365,333333 5, 3, 6,5536,65536,483,5363,65536 TCP 65.534 54.6,666667.9,333333 4.95,875 55,9988 5,47 5,47 3,384,8488,547 kbit/s = bit/s!!! KByte = 4 Byte!!! Protocol Principles, v4.8 73 Propagation (Signal) Delay Tp = Propagation Delay (in ms) = [ ( Distance in m ) / ( velocity in m/sec ) ] * Distance v=.km/s Delay in msec ( -3 ) v=3.km/s Delay in msec ( -3 ) CPU Bus cm,5,3 m,5,33 RS3, V4/V.8 5 m,75,5 LA, Copper, RJ45 m,5,3333 LA, FO, X./V.-V. km,5,33333 Local Subscriber Line,5 km,5,83333 WA Link Repeater km,5,333333 WA Link Repeater km,5,3333333 WA FO Link Repeater. km 5, 3,3333333 WA FO Link Repeater. km 5, 33,3333333 Satellite Link 4. km, 33,3333333 Satellite Link 5. km 5, 66,6666667. km 5, 333,3333333 3. km 5,, Total Delay = Serialization Delay + Propagation Delay + (Switching Delay) Protocol Principles, v4.8 74 Page - 37

How Long is a Bit? Length (in m) = [ ( / ( bitrate per sec) ] * [ ( velocity in m/sec ) ] Bitrate Bit Length in meter Bit Length in meter Analogue Modem 9,6 kbit/s 833,33 35, Analogue Modem 48 kbit/s 466,67 65, DS 64 kbit/s 35, 4687,5 ISD (B) 8 kbit/s 56,5 343,75 PCM-3, E,48 Mbit/s 97,66 46,48 Token Ring 4 4 Mbit/s 5, 75, Ethernet Mbit/s, 3, Token Ring6 6 Mbit/s,5 8,75 Fast Ethernet, FDDI Mbit/s, 3, ATM STM, OC-3 55 Mbit/s,9,94 ATM STM4, OC- 6 Mbit/s,3,48 Gigabit Ethernet Gigabit/s,,3 OC-48,5 Gigabit/s,8, Gigabit Ethernet Gigabit/s,,3 Copper LWL - Free Space. km /sec 3. km / sec Protocol Principles, v4.8 75 Propagation Delay and umber of Bits on a given Link Source km Tp =,5ms,5 bits 5 bits Destination kbit/s Mbit/s Source km Tp = ms Destination bit. bits kbit/s Mbit/s Source 5 km Tp = 67ms Destination 67 bits.67. bits kbit/s Mbit/s Protocol Principles, v4.8 76 Page - 38

How Large should be the Window Size? choice of window size is determined by response ( = round trip RTT) x (propagation + serialization) delay plus response delay of partner available buffer size transmitter/receiver bandwidth (bit rate) of communication channel principle to achieve the optimum: the sender s window must be big enough so that the sender can fully utilize the channel volume the channel volume can be expressed by the Delay-Bandwidth Product window size W in bytes = RTT x BW Protocol Principles, v4.8 77 early Empty Pipe with Idle-RQ and W = Vienna Tokyo W = t = s KB Data.5 Mbit/s Ack This pipe allows storing of.5 Mbit/s 35 ms = 55, bit 64 KB of data. t = 35 ms Idle-RQ only allows one frame to be outstanding. That means W =!!! Assume KByte (4 byte) maximum frame size, then the maximal achievable rate is (4 8) bit /.35 s 3 kbit/s Protocol Principles, v4.8 78 Page - 39

Full Pipe with Continous-RQ and W = 64 W = 64 Vienna t = s KB Data I (63)... I() Tokyo.5 Mbit/s Ack()... Ack (64) This pipe allows.5 Mbit/s 35 ms = 55, bit 64 KB of data. t = 35 ms This situation corresponds with a true sliding window Continous-RQ (C-RQ) allows several frames to be outstanding. With KByte maximum Frame Size optimum would be W = 64!!! Protocol Principles, v4.8 79 Only Half Pipe Used with C-RQ and W = 3 Vienna Tokyo W = 3 t = s capacity unused KB Data I (3)... I().5 Mbit/s Ack()... Ack (3) This pipe allows.5 Mbit/s 35 ms = 55, bit 64 KB of data. t = 35 ms This situation corresponds with a true jumping window With KByte maximum Frame Size and W = 3 the pipe could be used only half the!!! Protocol Principles, v4.8 8 Page - 4

Optimal Window Size - Sliding Window optimal window size (Continuous-RQ) acknowledgments arrive just in to keep the window always open sliding window requirement for optimum window size W in bytes in minimum equal to RTT x BW if window size is smaller than RTT x BW transmission will be stopped until acknowledgments arrive jumping window Idle RQ behaviour in worst case with W = if window size is too large in case of errors many good frames must be retransmitted (see Go Back ) Protocol Principles, v4.8 8 Timers - Retransmission Timeout the value for retransmission outs with line protocols can be easily calculated using the following parameters bitrate maximum data frame size worst case at receiver to generate an acknowledgment size of acknowledgment frame calculation for network protocols with varying transmission delays is more complex adaptive process is necessary Protocol Principles, v4.8 8 Page - 4

Agenda Introduction 3 Layer Model and Service Types ARQ Techniques Introduction Idle RQ Continuous RQ Selective Acknowledgement GoBack Positive Acknowledgement Selective Reject Sequence umbers and Windowing Delay Bandwidth Product Flow Control HDLC Overview Protocol Principles, v4.8 83 Flow Control if data frames arrive faster than application is able to process, receiver runs out of available buffer storage and good frames must be discarded by the receiver discarded data frames will cause retransmission but they will be still discarded because of lack of buffers therefore receiver should control the rate of transmission of data frames flow control overload/congestion situation indicated to the sender using flow control messages sender stops and waits until receiver is able to process frames again Protocol Principles, v4.8 84 Page - 4

Flow Control Host A Host B OS OS application software communication software flow control indicating congestion application software communication software communication hardware Tmt_A Rcv_A signal reference Rcv_B Tmt_B communication hardware Protocol Principles, v4.8 85 Flow Control windowing could be used to implement flow control receiver does not generate acknowledgements in case of congestion sender will stop transmission if send window is closed problem with windowing after out unconfirmed frames will be retransmitted after a defined amount of unsuccessful retransmissions, the connection is considered to be broken therefore flow control is based on separate flow control frames and windowing Protocol Principles, v4.8 86 Page - 43

Flow Control typically used flow control messages STOP, e.g. HDLC s Receiver ot Ready (RR) GO, e.g. HDLC s Receiver Ready (RR) in case of congestion receiver signals STOP on receipt of STOP sender will suspend transmitting in the worst case, sender will use the send window before stopping transmission receiver signals GO when data flow can resume STOP and GO may contain (R) and hence be used for acknowledgement Protocol Principles, v4.8 87 Flow Control 3 3 I () I () I () I (3) ACK()+STOP ACK()+STOP ACK(3)+STOP 3... ACK(3)+GO ACK(4)+GO W = 6 Protocol Principles, v4.8 88 Page - 44

Flow Control / Keepalive in case of full duplex data communication STOP and GO control frames are used for flow control in both directions in some cases STOP and GO frames are further used for connection management keepalive procedure if no data frames are waiting for transmission a GO frame can signal keepalive to the partner if traffic was suspended by STOP a periodic repetition of STOP can signal keepalive to the partner in both cases keepalives maintain the connection Protocol Principles, v4.8 89 Flow Control / Adaptive Windowing window size could be constant or dynamic during life of a connection constant window size is used e.g. by HDLC, X.5 if window size is dynamic a start value is negotiated during connection establishment actual window size will be dynamically adjusted to an optimal value receiver continuously advertises optimal value (e.g. based on availability free buffer memory) advertised window size = -> STOP advertised window size > -> GO adaptive windowing e.g used by TCP Protocol Principles, v4.8 9 Page - 45

Agenda Introduction 3 Layer Model and Service Types ARQ Techniques Introduction Idle RQ Continuous RQ Selective Acknowledgement GoBack Positive Acknowledgement Selective Reject Sequence umbers and Windowing Delay Bandwidth Product Flow Control HDLC Overview Protocol Principles, v4.8 9 HDLC High-level Data Link Control most widely used data link control protocol based on building elements synchronous transmission bit-oriented line protocol using bitstuffing Continuous RQ with GoBack, piggybacked ACK P/F procedure (see appendix chapter for details) provides many options half-duplex and full-duplex transmission (see appendix chapter for details) point-to-point and multipoint configuration (see appendix chapter for details) switched or non-switched channels Protocol Principles, v4.8 9 Page - 46

HDLC Frame Format hex7e 8-6 bits 8-6 bits 6 or 3 bits hex7e Flag (F) Address (A) Control (C) Information (I) FCS Flag (F) Send Sequence umber (S) P/F Receive Sequence umber (R) Information Frame, I-Frame Supervisory Code P/F Receive sequence number (R) Supervisory Frame, S-Frame Code P/F Code Unnumbered Frame, U-Frame 3 4 5 6 7 P / F = Poll / Final Bit Protocol Principles, v4.8 93 Supervisory Frames Supervisory Code P/F Receive Sequence umber (R) RR (Receiver Ready) = ACK plus GO REJ (Reject) = ACK RR (Receiver ot Ready) = ACK plus STOP SREJ (Selective Reject) = SREJ Protocol Principles, v4.8 94 Page - 47

Unnumbered Frames Code P/F Code Command UI SRM DISC UP R R R R3 SIM SARM RSET SARME SRME SABM XID SABME Response UI RD UA R R R R3 RIM FRMR DM XID Protocol Principles, v4.8 95 HDLC Data Link Services HDLC can provide connection-oriented service setup of connection done by U-frames SRM, SARM, SABM, UA I-frames and S-frame can be used only after connection setup I, RR, RR, REJ, SREJ clearing of a connection done by U-frames DISC, UA HDLC can provide connectionless service only U-frames can be used UI for data transport Protocol Principles, v4.8 96 Page - 48

Frame-Types Connection-Oriented Connection-Less I Information UI Unnumbered Information RR REJ RR SREJ Receiver Ready Reject Receiver ot Ready Selective Reject SRM Set ormal Response Mode SABM Set Async Balanced Mode SARM Set Async Response Mode SRME Set RM Extended Mode SABME Set ABM Extended Mode SARME Set ARM Extended Mode XID Miscellaneous Exchange Identification DISC Disconnect UP Unnumbered Poll UA RSET FRMR RD DM Unnumbered Acknowledge Reset Frame Reject Request Disconnect Disconnect Mode SIM Set Initialization Mode RIM Request Initialization Mode R-3 on-reserved Protocol Principles, v4.8 97 HDLC Example: Initializing / Keepalive / First Data Frame A -> B V (S): A SABM RR () hello I (,) first data frame A->B B receive buffer UA.. RR () hello ack RR () acknowledgement of first data frame V (R): Protocol Principles, v4.8 98 Page - 49

HDLC Example: Data Frames A->B, B->A with piggyback ACK V (S): 3 3 4 4 4 4 A 3 3 I (, 3) I (, 4) I (3, 5) I (3, ).. I( 4, 3) RR (4) B receive buffer 3 B has nothing to transmit therefore no piggyback acknowledgement V (R): 3 3 4 Protocol Principles, v4.8 99 HDLC Example: Keepalive V (S): 4 4 4 5 5 5 5 3 3 4 4 4 I (3, ) RR () hello I (4, ) 3 RR (4).. RR (4) hello ack 4 RR (5) V (R): 4 4 5 Protocol Principles, v4.8 Page - 5

HDLC Example: Flow Control 3 3 I (.) I (,) I (,) I (3,) W = 6 RR() STOP RR() RR(3) 3... RR(3) GO RR(4) Protocol Principles, v4.8 HDLC Family LAPB - Link Access Procedure Balanced link layer protocol for X.5 LAPD - Link Access Procedure D-Channel ISD V. - used on ISD terminal adapters for multiplexing HDLC LAPM - Link Access Procedure for Modems PPP - Point-to-Point Protocol encapsulates network PDUs and identifies protocol type SDLC - Synchronous Data Link Control (IBM) LAPB (X.5) LAPD (ISD) V. (ISD) LLC (LAs) LAPM (V.4) Frame Relay PPP SDLC (SA) Protocol Principles, v4.8 Page - 5