Data Link Layer, Part 5 Sliding Window Protocols. Preface

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

Data Link Layer, Part 4. Exemplary Protocols

Sequence Number. Acknowledgment Number. Data

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

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

The Transport Layer Reliability

Lecture 7: Flow Control"

Chapter 11 Data Link Control 11.1

Data Link Control Protocols

Data Link Layer, Part 3 Medium Access Control. Preface

CSE 123: Computer Networks Alex C. Snoeren. HW 1 due NOW!

Data Link Layer, Part 5. Medium Access Control

Chapter 11 Data Link Control 11.1

Transport Protocols and TCP: Review

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

Lecture 7: Sliding Windows. CSE 123: Computer Networks Geoff Voelker (guest lecture)

Programming Assignment 3: Transmission Control Protocol

Transport Protocols & TCP TCP

Chapter 11 Data Link Control 11.1

Lecture 7: Flow & Media Access Control"

The Transmission Control Protocol (TCP)

CS 640 Introduction to Computer Networks Spring 2009

Data Link Control. Surasak Sanguanpong Last updated: 11 July 2000

Basic Reliable Transport Protocols

EECS 122, Lecture 19. Reliable Delivery. An Example. Improving over Stop & Wait. Picture of Go-back-n/Sliding Window. Send Window Maintenance

UNIT IV -- TRANSPORT LAYER

DATA LINK LAYER UNIT 7.

CS321: Computer Networks Congestion Control in TCP

Problem 7. Problem 8. Problem 9

TCP: Flow and Error Control

Analyzation of Automatic Repeat Request (ARQ) Protocols

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

User Datagram Protocol (UDP):

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

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

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

Communications Software. CSE 123b. CSE 123b. Spring Lecture 3: Reliable Communications. Stefan Savage. Some slides couresty David Wetherall

INTERNET ARCHITECTURE & PROTOCOLS

Inst: Chris Davison

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

ICS 451: Today's plan. Sliding Window Reliable Transmission Acknowledgements Windows and Bandwidth-Delay Product Retransmission Timers Connections

10.1 REVIEW QUESTIONS

Improving Reliable Transport and Handoff Performance in Cellular Wireless Networks

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

Communication Networks

ECE697AA Lecture 3. Today s lecture

The Transport Layer. Why is there a transport layer? Addressing

Episode 4. Flow and Congestion Control. Baochun Li Department of Electrical and Computer Engineering University of Toronto

Chapter 24 Congestion Control and Quality of Service 24.1

Reliable Transport : Fundamentals of Computer Networks Bill Nace

Module 15 Communication at Data Link and Transport Layer

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

CMPE150 Midterm Solutions

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

IS370 Data Communications and Computer Networks. Chapter 5 : Transport Layer

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

CS457 Transport Protocols. CS 457 Fall 2014

Outline. CS5984 Mobile Computing

Topics. TCP sliding window protocol TCP PUSH flag TCP slow start Bulk data throughput

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

TCP over wireless links

CS321: Computer Networks Error and Flow Control in TCP

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Chapter 3 Review Questions

Mobile Transport Layer Lesson 10 Timeout Freezing, Selective Retransmission, Transaction Oriented TCP and Explicit Notification Methods

CRC. Implementation. Error control. Software schemes. Packet errors. Types of packet errors

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

The Transport Layer: TCP & Reliable Data Transfer

ECE 435 Network Engineering Lecture 10

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

Basic Protocols and Error Control Mechanisms

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

COMPUTER NETWORK. Homework #2. Due Date: April 12, 2017 in class

Network Layer, Part 2 Routing. Terminology

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

The Data Link Layer Chapter 3

Flow Control, and Congestion Control

EE 122: Error detection and reliable transmission. Ion Stoica September 16, 2002

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

Name Student ID Department/Year. Midterm Examination. Introduction to Computer Networks Class#: 901 E31110 Fall 2007

Solutions for Chapter similar to 1 and 3

Lixia Zhang M. I. T. Laboratory for Computer Science December 1985

Homework 3 50 points. 1. Computing TCP's RTT and timeout values (10 points)

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

Data Link Layer: Overview, operations

file:///c:/users/hpguo/dropbox/website/teaching/fall 2017/CS4470/H...

NWEN 243. Networked Applications. Layer 4 TCP and UDP

Mobile Transport Layer Lesson 02 TCP Data Stream and Data Delivery

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

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

Data Link Control Protocols

6.033 Lecture 12 3/16/09. Last time: network layer -- how to deliver a packet across a network of multiple links

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

TCP/IP-2. Transmission control protocol:

Data and Computer Communications

Transport Protocols. CSCI 363 Computer Networks Department of Computer Science

Transport Protocols and TCP

4. Error correction and link control. Contents

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

Transport Layer (TCP/UDP)

Transcription:

Data Link Layer, Part 5 Sliding Window Protocols These slides are created by Dr. Yih Huang of George Mason University. Students registered in Dr. Huang's courses at GMU can make a single machine-readable copy and print a single copy of each slide for their own reference, so long as each slide contains the copyright statement, and GMU facilities are not used to produce paper copies. Permission for any other use, either in machinereadable or printed form, must be obtained from the author in writing. CS 656 1 Preface We are about to discuss a series of protocols used between a pair of directly-connected sender and receiver. These protocols serve three purposes 1. to guarantee delivery reliability,. to enforce correct ordering of frames delivered to the network layer at the receiving end, and 3. to provide flow control. CS 656 1

Stop And Wait The sender transmits a frame. If the receiver successfully receives the frame, it delivers the frame to its network layer and returns an acknowledgement (ACK) to the sender. Only after receiving the ACK will the sender be allowed to transmit the next frame. Sender transmit frame 1 ACK received; transmit frame Receiver frame 1 received; returns ACK frame received; returns ACK CS 656 3 Problem This simple protocol provides flow control but dose not enforce reliability Actually, it fails in noisy links. What would happen when a transmission (the frame or the ACK) is corrupted? Sender transmit frame 1 wait for ACK indefinitely and cannot proceed Error Deadlocked! Receiver frame 1 received; returns ACK CS 656 4

Discussion What could cause the receiver not to receive the frame successfully? transmission errors reported by the error detection mechanism the frame is so corrupted by noises that the receiver dose not even recognize its arrival when the frame arrives at the receiver, there is not enough memory to accommodate it CS 656 5 The Time-out Mechanism The sender re-transmits a frame if the ACK does not arrive within some predetermined length of time. Sender transmit frame 1 Time-out interval ACK not received; retransmit frame 1 This implies that the sender DLL must keep the frame until it receives the ACK. CS 656 6 3

Discussion Causes for not receiving the ACK: the frame is not received due to previously discussed causes the frame is successfully delivered but the ACK is not received by the sender This protocol is still flawed: although the delivery of the frame is guaranteed, the receiver s network layer may see multiple copies of a frame. CS 656 7 The Problem of Duplicates Sender transmit frame 1 retransmit frame 1 ACK received; transmit frame Lost Receiver frame 1 received frame 1 delivered to network layer frame 1 received frame 1 delivered to network layer Network layer Sees duplicates CS 656 8 4

Sequence Numbers Frames are numbered alternately:, 1,, 1, These are 1-bit sequence numbers. Receiver acknowledges the correct frames with an ACK of the same sequence number as the frame. If not receiving the corresponding ACK after a time-out period, the sender retransmits the frame. CS 656 9 Example Sender transmit retransmit ACK() received; transmit Frame(1) Lost Receiver received delivered to network layer received No delivery to network layer this time, based on seq # CS 656 1 5

Sender transmit retransmit ACK() received; removed from buffer; transmit Frame(1) ACK() discarded Receiver received received delivered to network layer No delivery When is received the second time, it is acknowledged but not delivered to network layer CS 656 11 Improving Performance Stop-and-wait wastes bandwidth. Solution is to allow multiple outstanding frames. that is, to send the next frame before the current one is acknowledged. Two approaches: 1. go-back-n: receiver discards all frames following an error, forcing the sender to go back to the lost frame, and retransmit all frames from that point. selective repeat: receiver stores correct frames following the lost one(s); sender retransmits only lost frames CS 656 1 6

Go-Back-N Each frame is tagged with an n-bit sequence number. Only n - 1 frames may be outstanding. The sender maintains a set of n - 1 buffers, called a (sliding) window, to keep unacknowledged frames. When transmitting a frame, the frame is also copied to a slot of the window. the copy is for retransmissions the slot is freed when the frame s ACK arrives CS 656 13 Sliding Windows Image a sequence of frames waiting for transmission. Both Go-back-N and Selective-repeat define a window that slides from left to right over time. Window At a given moment, only those frames in the window can be transmitted. They are thus called Sliding Window Protocols. CS 656 14 7

Example 1: Large Window When window size is large relative to the round-trip time, we can take full advantages of the bandwidth. 3 3 1 1 1 1 3 3 1 1 3 3 window size = 3 1 3 1 3 1 3 n= 1 3 1 3 1 3 CS 656 15 Example : Small Window If window size is small relative to the round-trip time, then the stop-and-wait phenomenon still occurs. 3 3 3 1 1 1 3 3 1 1 1 1 3 1 3? 1 3 1 3 CS 656 16 8

Go-Back-N with Transmission Errors Case 1: n large enough 1 1 3 3 3 1 1 1 3 1 3 3 3 1 time-out interval 1 3 1 3 1 3 1 3 D D 1 3 CS 656 17 Case : n too small 3 3 3 1 1 1 1 1 1 1 1 1 time-out interval 1 3 1 1 1 3 D D 1 CS 656 18 9

Why the Restriction n -1? Consider n=. Let us allow 4 outstanding frames and see what happens. The receiver sees the following frames: 1 3 Question: what is the second frame? There are two legitimate possibilities, and we have no way to tell. CS 656 19 Scenario 1 Nothing wrong; temporarily nothing to send after 3 1 3 1 3 In this case, the second frame is a new frame (the 5th frame). CS 656 1

Scenario Timeout and retransmit 1st frame 1 3 1 3 The second frame is a duplicate. It must not be delivered to the network layer. However, it is acknowledged to prevent the sender from time-out again. CS 656 1 Optimizations The receiver attaches ACKs to outgoing frames destined to the sender; this technique is called piggybacking. Further, we can aggregate ACKs that is, the ACK of the i-th frame also acknowledges the receipt of all the frames up to i. 1 3 1 3 1 1 3 1 3 1 CS 656 11

Discussions One issue of piggybacking is how long the receiver should wait for an outgoing data frame waiting too long may cause the sender to time out and retransmit unnecessarily Impatient receivers, on the other hand, lose the opportunities of piggybacking Another optimization is to have the receiver, upon a corrupted frame, immediately replies a negative acknowledgement (NACK), forcing the sender to retransmit before time-out. CS 656 3 Selective Repeat Sender maintains a window of size n-1 to keep outstanding, unacknowledged frames. Sender retransmits a frame that is not acknowledged after time-out. Receiver acknowledges the receipt of a frame with an ACK containing the sequence no. of the frame. Receiver also maintains a window of size n-1, used to store frames following a damaged one. Frames delivered to the network layer in order. CS 656 4 1

Selective Repeat in Action 1 1 3 4 3 4 5 5 6 6 7 7 Window size = 4 1 3 4 5 6 7 N=3 1 3 4 5 6 7 4 4 5 3 3 3 1 5 4 6 7 8 3 CS 656 5 Why the Restriction of n-1 Consider n=3. Let us allow 5 outstanding frames and see what happens. The receiver sees the following frames: 1 3 4 Again there are two readings for the second frame and the receiver has no way to tell. CS 656 6 13

Scenario 1 Timeout and retransmit the 1st frame 1 3 4 1 3 4 The second frame is a duplicate. CS 656 7 Scenario 1 3 4 5 6 7 1 3 4 The second frame is a new frame. It shall be buffered in the receiver window to wait for the arrivals of 5 to 8. CS 656 8 14

Discussion Stop-and-wait, go-back-n, and selective repeat achieve the same functions; differences are in performance. How does a slow receiver curb the sender? How is reliability enforced? How is correct ordering enforced? CS 656 9 15