Stop And Wait. ACK received; transmit frame 2 CS 455 3



Similar documents
Data Link Layer. Flow Control. Flow Control

Physical Layer, Part 2 Digital Transmissions and Multiplexing

Computer Networks. Chapter 5 Transport Protocols

0,2 D(0) A(1) D(1) 1,3 D(2) 0,2 D(0) A(1) D(1) 1,3 D(2) D(3) D(3) D(1) D(1) A(4) D(2) 4,6 D(3) A(4) 4,6 GO BACK 3 SELECTIVE REJECT WINDOW SLIDES

Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine

CSE331: Introduction to Networks and Security. Lecture 9 Fall 2006

Chapter 3: Sample Questions, Problems and Solutions Bölüm 3: Örnek Sorular, Problemler ve Çözümleri

Computer Networks. Data Link Layer

First Midterm for ECE374 02/25/15 Solution!!

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

EXAMPLES AND PROBLEMS. Competence Based Education Internet Protocols

TCP for Wireless Networks

1. The subnet must prevent additional packets from entering the congested region until those already present can be processed.

First Midterm for ECE374 03/24/11 Solution!!

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

Data Link Layer Overview

3.4 SLIDING WINDOW PROTOCOLS

TCP in Wireless Mobile Networks

EKSAMEN / EXAM TTM

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

CS263: Wireless Communications and Sensor Networks

Introduction. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross

Overview of Network Hardware and Software. CS158a Chris Pollett Jan 29, 2007.

: Instructor

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

Congestion Control Overview

Mobile Computing/ Mobile Networks

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

TCP and Wireless Networks Classical Approaches Optimizations TCP for 2.5G/3G Systems. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

Simulation-Based Comparisons of Solutions for TCP Packet Reordering in Wireless Network

Transport Layer Protocols

Data Communications & Networks. Session 6 Main Theme Reliable Data Transfer. Dr. Jean-Claude Franchitti

Mobile Communications Chapter 9: Mobile Transport Layer

Answer: that dprop equals dtrans. seconds. a) d prop. b) d trans

Per-Flow Queuing Allot's Approach to Bandwidth Management

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

LANs. Local Area Networks. via the Media Access Control (MAC) SubLayer. Networks: Local Area Networks

Dynamic Source Routing in Ad Hoc Wireless Networks

15-441: Computer Networks Homework 2 Solution

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

A study of Skype over IEEE networks: voice quality and bandwidth usage

[Prof. Rupesh G Vaishnav] Page 1

Attenuation (amplitude of the wave loses strength thereby the signal power) Refraction Reflection Shadowing Scattering Diffraction

CH.1. Lecture # 2. Computer Networks and the Internet. Eng. Wafaa Audah. Islamic University of Gaza. Faculty of Engineering

The Quality of Internet Service: AT&T s Global IP Network Performance Measurements

Outline. TCP connection setup/data transfer Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics

The Problem with TCP. Overcoming TCP s Drawbacks

DATA COMMUNICATIONS AND NETWORKING. Solved Examples

First Midterm for ECE374 03/09/12 Solution!!

Lecture Objectives. Lecture 07 Mobile Networks: TCP in Wireless Networks. Agenda. TCP Flow Control. Flow Control Can Limit Throughput (1)

AN IMPROVED SNOOP FOR TCP RENO AND TCP SACK IN WIRED-CUM- WIRELESS NETWORKS

Operating Systems and Computer Networks / Datenverarbeitung 2 / Data Processing 2

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

15-441: Computer Networks Homework 1

Analog vs. Digital Transmission

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation

Homework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14

Random Access Protocols

Applications. Network Application Performance Analysis. Laboratory. Objective. Overview

28 Networks and Communication Protocols

Based on Computer Networking, 4 th Edition by Kurose and Ross

Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:

Computer Networks. Definition of LAN. Connection of Network. Key Points of LAN. Lecture 06 Connecting Networks

GATE CS Topic wise Questions Computer Network

TCOM 370 NOTES LOCAL AREA NETWORKS AND THE ALOHA PROTOCOL

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

EECS 122: Introduction to Computer Networks Multiaccess Protocols. ISO OSI Reference Model for Layers

CSE3214 Computer Network Protocols and Applications. Chapter 1 Examples and Homework Problems

VPN over Satellite A comparison of approaches by Richard McKinney and Russell Lambert

COMPUTER NETWORKS REVIEW QUESTIONS AND PROBLEMS

Ring Local Area Network. Ring LANs

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

Access Control: Firewalls (1)

ECE 333: Introduction to Communication Networks Fall 2002

TCP Westwood for Wireless

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

Network Performance: Networks must be fast. What are the essential network performance metrics: bandwidth and latency

Three Key Design Considerations of IP Video Surveillance Systems

Computer Networks Homework 1

Lab Exercise Objective. Requirements. Step 1: Fetch a Trace

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

Congestions and Control Mechanisms n Wired and Wireless Networks

Synchronization in. Distributed Systems. Cooperation and Coordination in. Distributed Systems. Kinds of Synchronization.

What is Network Latency and Why Does It Matter?

Final for ECE374 05/06/13 Solution!!

Chapter 5. Transport layer protocols

Digital Audio and Video Data

Protocols and Architecture. Protocol Architecture.

Process Control and Automation using Modbus Protocol

How To Make A Multi-User Communication Efficient

MOBILITY AND MOBILE NETWORK OPTIMIZATION

CS6956: Wireless and Mobile Networks Lecture Notes: 2/11/2015. IEEE Wireless Local Area Networks (WLANs)

Understanding Latency in IP Telephony

Remote Copy Technology of ETERNUS6000 and ETERNUS3000 Disk Arrays

Professor: Ian Foster TAs: Xuehai Zhang, Yong Zhao. Winter Quarter.

Configuring an efficient QoS Map

CS268 Exam Solutions. 1) End-to-End (20 pts)

Applying Active Queue Management to Link Layer Buffers for Real-time Traffic over Third Generation Wireless Networks

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

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 455 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 455 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 455 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 455 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 455 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 455 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 455 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 455 8 4

Sequence Numbers Frames are numbered alternately: 0, 1, 0, 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 455 9 Example Sender transmit retransmit ACK(0) received; transmit Frame(1) Lost Receiver received delivered to network layer received No delivery to network layer this time, based on seq # CS 455 10 5

Sender transmit retransmit ACK(0) received; removed from buffer; transmit Frame(1) ACK(0) 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 455 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 455 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 455 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 455 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. 0 0 3 3 1 1 1 1 0 0 3 3 1 1 0 0 3 3 window size = 3 0 1 3 0 1 3 0 1 3 n= 0 1 3 0 1 3 0 1 3 CS 455 15 Example : Small Window If window size is small relative to the round-trip time, then the stop-and-wait phenomenon still occurs. 0 0 0 3 3 3 1 1 1 0 0 0 3 3 1 1 1 0 0 1 3 0 1 3 0? 0 1 3 0 1 3 0 CS 455 16 8

Go-Back-N with Transmission Errors Case 1: n large enough 0 0 1 1 3 3 0 0 3 1 1 1 3 1 3 3 3 1 time-out interval 0 1 3 0 1 3 1 3 0 1 3 0 D D 1 3 CS 455 17 Case : n too small 0 0 0 3 3 3 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 time-out interval 0 1 3 0 1 0 1 0 1 3 D D 0 1 CS 455 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: 0 1 3 0 Question: what is the second frame 0? There are two legitimate possibilities, and we have no way to tell. CS 455 19 Scenario 1 Nothing wrong; temporarily nothing to send after 3 0 1 3 0 0 1 3 0 In this case, the second frame 0 is a new frame (the 5th frame). CS 455 0 10

Scenario Timeout and retransmit 1st frame 0 1 3 0 0 1 3 0 The second frame 0 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 455 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. 0 1 3 0 1 3 0 1 0 1 3 0 1 3 0 1 CS 455 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 455 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 455 4 1

Selective Repeat in Action 0 0 1 1 3 4 3 4 5 5 6 6 7 7 0 0 Window size = 4 0 1 3 4 5 6 7 0 N=3 0 1 3 4 5 6 7 0 4 4 5 3 3 3 0 1 5 6 7 8 4 3 CS 455 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: 0 1 3 4 0 Again there are two readings for the second frame 0 and the receiver has no way to tell. CS 455 6 13

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

Performance Issues C: channel capacity in bps I: interrupt and service time + signal propagation delay, one way Think of I as the round-trip time F: number of bits per frame To avoid stop-and-wait (that is, waste of bandwidth), window size W 1+CI/F. CS 455 9 What is CI? The Meaning of CI Examples Signal speed c=*10 8 m/sec 10Mbps over 1km, CI=10 10 6 (1000/c) 50 bits 65 kbps over 3000 km, CI 960 bits (satellite) 64 kbps with I=70 msec, CI 17000 bits CS 455 30 15

Discussion To determine the window size over a communication link, we must consider The data rate of the link The propagation delay over the link The second factor is especially important in WANs. For high-bandwidth and long-distance links, good performance can be achieved only with large windows. CS 455 31 Reviewing the Basics 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 455 3 16