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

Similar documents
INTERNET ARCHITECTURE & PROTOCOLS

Data Link Control Protocols

Data and Computer Communications

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

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

Chapter 7: Data Link Control. Data Link Control Protocols

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

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

3. Data Link Layer 3-2

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


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

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

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

Data Link Control Protocols

Chapter 11 Data Link Control 11.1

Chapter 11 Data Link Control 11.1

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

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

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

Chapter 5 Data-Link Layer: Wired Networks

HDLC (High level Data Link Control)

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

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

Data Link Layer, Part 4. Exemplary Protocols

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

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

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

Chapter 3. The Data Link Layer

Data Link Protocols DATA LINK PROTOCOLS. Asynchronous Protocols. Types of Data Link Protocols XMODEM. Asynchronous Protocols.

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

CEG3185 TUT6. Prepared by Zhenxia Zhang Revisited by Jiying Zhao

HDLC PROTOCOL. Michel GARDIE

CS422 Computer Networks

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

Computer Network : Lecture Notes Nepal Engineering College Compiled by: Junior Professor: Daya Ram Budhathoki Nepal Engineering college, Changunarayan

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

The Data Link Layer Chapter 3

Data Link layer (CN chap 3.1, 3.4, 3.6)

Data Link Control. Outline. DLC functions

HDLC. Telecom Systems Chae Y. Lee

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

DLL: Flow Control DLL. Simplex. Fast sender / slow receiver scenario. Various protocols used. Simplified examples implemented in C.

ET4254 Communications and Networking 1

Automatic Repeat Request Data Link Layer Traffic Management

DATA LINK CONTROL PROTOCOLS

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

The University of Sydney AUSTRALIA. Advanced Communication Networks

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

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

Data Link Protocols. TCP/IP Suite and OSI Reference Model

4. Error correction and link control. Contents

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

Computer Networking. Reliable Transport. Reliable Transport. Principles of reliable data transfer. Reliable data transfer. Elements of Procedure

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

Outline: Connecting Many Computers

Data Link Layer (part 2)

1.Describe the layer presentation in the TCPIP model and explain the protocol of each layer. July 2014/Jan 2015

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

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

Agenda. Protocol Principles

King Fahd University of Petroleum & Minerals Computer Engineering g Dept

Chapter 3. The Data Link Layer

CCNA Exploration1 Chapter 7: OSI Data Link Layer

The Data Link Layer Chapter 3

Telecommunication Protocols Laboratory Course. Lecture 2

10.1 REVIEW QUESTIONS

06/05/2008. Chapter 3. The Data Link Layer. Data Link Layer Design Issues. Services Provided to the Network Layer. Error Control Flow Control

Lecture 7: Flow Control"

Transmission SIGNALs

DATA LINK LAYER: NEED

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

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

Communication Networks

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

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

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

C08a: Data Link Protocols

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

Jaringan Komputer. Data Link Layer. The Data Link Layer. Study the design principles

Ethernet Switches (more)

POINT TO POINT DATALINK PROTOCOLS. ETI 2506 Telecommunication Systems Monday, 7 November 2016

Other Data Link Protocols: Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering

Other Protocols. Arash Habibi Lashkari

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

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

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

CHAPTER 15 LOCAL AREA NETWORKS ANSWERS TO QUESTIONS

User Datagram Protocol

Ethernet Switches Bridges on Steroids. Ethernet Switches. IEEE Wireless LAN. Ad Hoc Networks

1. Data Link Layer Protocols

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

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

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

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

Ethereal Exercise 2 (Part A): Link Control Protocol

Data Link Layer, Part 5 Sliding Window Protocols. Preface

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

INTERNATIONAL TELECOMMUNICATION UNION. SERIES X: DATA NETWORKS AND OPEN SYSTEM COMMUNICATION Public data networks Interfaces

AX.25 Link Access Protocol. for Amateur Packet Radio. Version 2.2 Revision: 28 August 2017

Transcription:

Layer 2 Technologies Layer 2: final level of encapsulation of data before transmission over a physical link responsible for reliable transfer of frames between hosts, hop by hop, i.e. on a per link basis Protocol functions at this layer include Flow control: Ensuring the source sending frames does not overflow the receiver Error control: Ensuring all frames are correctly received by the receiver (typically based on cyclic codes) Frame delineation (method to identify the start and end of a frame on a transmission link) Access control (for shared medium operations, such as shared Ethernet, WLAN) 1

Layer 2 Technologies Some layer 2 technologies can operate over a shared physical medium, allowing Communications between multiple hosts without the need for forwarding. These are technologies used in shared LAN applications (shared Ethernet, WLAN) Basic layer 2 technologies are point to point only and rely on encapsulated layer 3 to perform forwarding at layer 3 (e.g. HDLC, PPP,..) Some layer 2 technologies use Virtual Circuit operations to allow forwarding at layer 2. Examples are in WAN networking (Frame Relay, ATM,..) and to some extent in LAN applications (Switched Ethernet) 2

Flow Control: Stop and Wait Most basic flow control mechanism: Source transmits frame Destination receives frame and replies with frame confirming reception, called Acknowledgement (ACK) Source waits for ACK before sending next frame Destination can stop flow by not sending ACK Source uses time-out to resend frame if no ACK is received (source assumes frame is lost) Receiver may get two copies of same frame! Use ACK,0 and ACK,1 (1 bit sequence nr) Link is not used while transmitter waits for acknowledgement If link bit rate high, and/or packets small, and /or long link, transmission time smaller than propagation time => under utilization of link 3

Stop and Wait Time 4

Sliding Window Flow Control Allow multiple frames to be in transit Receiver has buffer W long Transmitter can send up to W frames without having to wait for an Acknowledgment (ACK) Only W frames can be unacknowledged at any given time Each frame is numbered (Sequence Number) Sequence number bounded by size of Sequence Number field (k bits) Frames are numbered modulo 2 k and numbers are used in a cyclical fashion. ACK includes number of next frame expected Piggybacking, in duplex connections include acknowledgement info as Protocol Control Information with the data, If no data to send, use dedicated acknowledgement frame If data but no acknowledgement to send, send last acknowledgement number again 5

Sliding Window Diagram k=3 bits (Seq. Nr = 0 to 7) W = 7 6

Example Sliding Window Frame 0 Frame 2 Frame 1 Ack 3 Frame 3 Frame 4 Frame 5 Ack 4 Frame 6 7

Error Control For the Detection (and correction in some cases) of errors, an error detection/correction field added to message If correction capability is used, mechanism is called Forward Error Correction If only detection capability, retransmission of the message is requested. The mechanism is called: ARQ - Automatic Repeat request Practically, Flow Control and Error Control operate jointly: Error detection: Negative acknowledgement and retransmission No error: Positive acknowledgment No acknowledgment: Retransmission after timeout 2 slightly different Sliding Window mechanisms posible Go Back N and Selective Repeat 8

Go Back-N Based on sliding window: window size controls number of outstanding frames If no error, ACK as usual with number of next frame expected (also called RR, Receive Ready) If error, reply with rejection (called REJ) Discard that frame and all future frames until error frame received correctly. Transmitter must go back and retransmit that frame and all subsequent frames Receiver detects error in frame i Receiver sends REJ-i Source gets REJ-i Source retransmits frame i and all subsequent frames 9

Selective Repeat Also called Selective Reject Only rejected frames (SREJ sent by receiver) are retransmitted Subsequent frames are accepted by the receiver and buffered => Minimizes retransmission Receiver must maintain large enough buffer Receiver must reorder frames after reception of missing ones More complex logic in source to re-send frame out of sequence 10

Go Back N vs Selective Repeat Ack 2 Ack 2 Ack 4 Ack 4 Ack 5 Ack 7 Ack 7 Go Back N Ack 1 Selective Repeat 11

Maximum window size Go Back-N Maximum window size should be set as 2 k -1 Ex. K=3, window = 8: source sends frame 0,1,2,3,4,5,6,7. Receiver sends ACK 0 (receiver to accept 8 frames starting with number 0). If acknowledgement lost, sender times out and retransmits 0,1,2,3,4,5,6,7. Receiver accepts these as new frames, although they are duplicates. If we take window = 7: source sends frame 0,1,2,3,4,5,6. Receiver sends ACK 7 (receiver to accept 7 frames starting with number 7). If acknowledgement lost, sender times out and retransmits 0,1,2,3,4,5,6. Receiver rejects these frames as it expects frame 7 first, so there are no duplicated frames. 12

Maximum window size Selective Reject Maximum window size should be set as 2 k-1 Ex. K=3, window = 5. source sends frame 0,1,2,3,4. Receiver sends ACK 5 (receiver will accept frames 5,6,7,0,1 in any order). If acknowledgement lost, sender times out and retransmits 0,1,2,3,4. Receiver accepts duplicated frames 0 and 1 as new frames received out of order. Same with window = 4 (2 k-1 ): source sends frame 0,1,2,3. Receiver sends ACK 4 (receiver to accept frames 4,5,6,7). If acknowledgement lost, sender times out and retransmits 0,1,2,3. Receiver does not accept these duplicated frames as numbers don t overlap. 13

High Level Data Link Control HDLC: ISO 13239 largely used, and basis for several other important protocols Modes of operation Asynchronous Balanced Mode (ABM) most widely used Balanced configuration: either station may initiate transmission without receiving permission Unbalanced configurations: primary sends commands to secondary that can only send responses to commands. Asynchronous Response Mode (ARM), rarely used Normal Response Mode (NRM): primary equipment polling multiple terminals 14

Frame Structure 1 byte 1 to n bytes 1 or 2 bytes 2 (4) bytes 1 byte Flag Address Control Payload FCS Flag Single frame format for all data and control exchanges Control field identifies the type of frame Flags: Delineation - Delimit frame at both ends with sequence : 01111110 Payload: encapsulated upper layer data to be carried FCS: Frame Check Sequence (Error detection); 2 or 4 bytes. Address: Usually 8 bits long 15

Control Field N(s): send sequence number N(r): receive sequence number S: Supervisory function M: Unnumbered function 1 2 3 4 5 6 7 8 I: Information 0 N(s) N(r) S: Supervisory 1 0 S N(r) 3 bits sequence number U: Unnumbered 1 1 M M 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 I: Information 0 N(s) N(r) S: Supervisory 1 0 S N(r) 7 bits sequence number 16

Control Field Different for different frame type Information - data to be transmitted to user (next layer up) Flow and error control piggybacked on information frames Supervisory - ARQ when piggyback not used Field S to identify REJ for GoBack-N, SREJ for selective reject,.. Unnumbered - supplementary link control: Field M to identify connection set up, disconnection,. First one or two bits of control field identify frame type 3 or 7 bits (extended mode) sequence numbers (specified during connection set up) 17

Point to Point Protocol (PPP) Encapsulation of packets (i.e. Layer 3 PDUs, e.g. IP) for transmission over point to point links (RFCs 1661 & 1662) Used e.g. over dial up modem links Allows multiplexing of different Layer 3 protocols over a serial link Based on HDLC, with following changes: A protocol field is added to identify the upper layer protocol encapsulated in the frame. PPP does not assign individual station addresses; the address field is by default set to 11111111 (Broadcast). Control field is fixed and set by default to Unnumbered information type of frame (see HDLC) Flag Address Control Protocol Data FCS Flag 8 bits 8 bits 8 bits 16 bits Variable 16 (32) bits 8 bits 18

Point to Point Protocol (PPP) Connections are not set up with Unnumbered frames. specific LCP (Link Control Protocol) packets are used. LCP packets are encapsulated in PPP frames (protocol field Hex C021) for: establishment and termination of a link configuration of a link (e.g. payload size) test of a link Specific NCP (Network Control Protocol) packets are then used to choose and configure the network layer protocols to be transmitted. NCP packets are encapsulated in PPP frames IPCP is used to negotiate IP parameters (e.g. IP address of device) PPP frames can then carry over the link various agreed network layer protocols data units 19