Reliable Data Transfer

Similar documents
Principles of Reliable Data Transfer

CSC 401 Data and Computer Communications Networks

Chapter 3 Transport Layer

Chapter 3 Transport Layer

Reliable Transport : Fundamentals of Computer Networks Bill Nace

Chapter III: Transport Layer

rdt2.0 has a fatal flaw!

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

CSC 4900 Computer Networks: Reliable Data Transport

CS 3516: Advanced Computer Networks

Chapter 3 outline. 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management

Rdt2.0: channel with packet errors (no loss!)

Chapter 3: Transport Layer

Chapter 3: Transport Layer Part A

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 8

The Transport Layer Reliability

CMSC 332 Computer Networks Reliable Data Transfer

Transport services and protocols. Chapter 3 outline. Internet transport-layer protocols Chapter 3 outline. Multiplexing/demultiplexing

CC451 Computer Networks

Lecture 11: Transport Layer Reliable Data Transfer and TCP

Chapter 3 Transport Layer

CSCE 463/612 Networks and Distributed Processing Spring 2018

TCP. TCP: Overview. TCP Segment Structure. Maximum Segment Size (MSS) Computer Networks 10/19/2009. CSC 257/457 - Fall

Internet transport-layer protocols. Transport services and protocols. Sending and receiving. Connection-oriented (TCP) Connection-oriented

CSE 461: Introduction to Computer Communication Networks. Chunjong Park

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

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

The Transport Layer Multiplexing, Error Detection, & UDP

Sliding Window Protocols, Connection Management, and TCP Reliability

TDTS06: Computer Networks

Lecture 7: Flow Control"

CSCD 330 Network Programming

Lecture 3 The Transport Control Protocol (TCP) Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Transport layer. Our goals: Understand principles behind transport layer services: Learn about transport layer protocols in the Internet:

Lecture 5. Transport Layer. Transport Layer 1-1

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

Transport layer: Outline

Lecture 10: Transpor Layer Principles of Reliable Data Transfer

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

Chapter 3 Transport Layer

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

Congestion Control. Principles of Congestion Control. Network-assisted Congestion Control: ATM. Congestion Control. Computer Networks 10/21/2009

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

Transport Layer Overview

Congestion Control. Principles of Congestion Control. Network assisted congestion. Asynchronous Transfer Mode. Computer Networks 10/23/2013

Chapter 3 Transport Layer

CSC 401 Data and Computer Communications Networks

Communication Networks

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

Chapter 3 outline. TDTS06 Computer networks. Principles of Reliable data transfer. Reliable data transfer: getting started

CSCI Topics: Internet Programming Fall 2008

Course on Computer Communication and Networks. Lecture 4 Chapter 3; Transport Layer, Part A

Course on Computer Communication and Networks. Lecture 4 Chapter 3; Transport Layer, Part A

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

ECE697AA Lecture 3. Today s lecture

Lecture 07 The Transport Layer (TCP & UDP) Dr. Anis Koubaa

Chapter 3 Transport Layer

L5: Building Direct Link Networks III. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Chapter 3 outline. Transport services and protocols

Computer Networking: A Top Down Approach

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

Chapter 3 Transport Layer

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

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

Transport Layer Marcos Vieira

The GBN sender must respond to three types of events:

Chapter 3 Transport Layer

Lecture 7: Flow & Media Access Control"

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa

TCP : Fundamentals of Computer Networks Bill Nace

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

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

RSC Part III: Transport Layer 3. TCP

CSC 8560 Computer Networks: Transport Layer

ELEN Network Fundamentals Lecture 15

CSE 489/589 Programming Assignment 2

COSC4377. Useful Linux Tool: screen

Chapter 3 Transport Layer

Fall 2012: FCM 708 Bridge Foundation I

CSC 4900 Computer Networks: TCP

CS 655 System and Network Architectures and Implementation. Module 3 - Transport

CSCE 463/612 Networks and Distributed Processing Spring 2018

CS 3516: Computer Networks

CSC 401 Data and Computer Communications Networks

Computer Communication Networks Midterm Review

Chapter 2: outline. 2.1 principles of network applications app architectures app requirements

CSC358 Week 4. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Lecture 15: Transport Layer Congestion Control

Lecture 11 Overview. Last Lecture. This Lecture. Next Lecture. Medium Access Control. Flow and error control Source: Sections , 23.

UNIT IV -- TRANSPORT LAYER

Answers to Sample Questions on Transport Layer

Data Link Layer Overview

Computer Networks & Security 2016/2017

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

TCP/IP-2. Transmission control protocol:

LECTURE 3 - TRANSPORT LAYER

Transport Protocols & TCP TCP

Computer Networks. General Course Information. Addressing and Routing. Computer Networks 9/8/2009. Basic Building Blocks for Computer Networks

Announcements Computer Networking. What was hard. Midterm. Lecture 16 Transport Protocols. Avg: 62 Med: 67 STD: 13.

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

Transcription:

Reliable Data Transfer Kai Shen Reliable Data Transfer What is reliable data transfer? guaranteed arrival no error in order delivery Why is it difficult? unreliable underlying communication channel, which can be lossy, error-prone, and deliver packets out of order Where is it used in computer networks? reliable transport service on top of unreliable network layer reliable data link service on top of unreliable physical layer 10/14/2009 CSC 257/457 - Fall 2009 1 10/14/2009 CSC 257/457 - Fall 2009 2 Principles of Reliable Data Transfer Outline Characteristics of unreliable channel will determine complexity of reliable data transfer protocol e.g., delay in the channel is bounded in physical layer, not so for network layer Other services may interact with RDT protocol e.g., flow control, congestion control Here we study widely applicable RDT principles we don t make assumptions about the unreliable channel we don t consider interaction with other services Later we see what RDT is like in practice in a transport layer protocol TCP Overview of reliable data transfer a protocol: stop-and-wait one packet at a time an efficient i protocol: sliding window multiple packets simultaneously 10/14/2009 CSC 257/457 - Fall 2009 3 10/14/2009 CSC 257/457 - Fall 2009 4 CSC 257/457 - Fall 2009 1

Deal with Errors First deal with errors, later deal with packet loss. -based solution: receiver check errors if, send back positive otherwise, send back negative NAK ime Ti packet1 packet2 packet3 What if or NAK is corrupted? packet1 NAK packet1 packet2 error! 10/14/2009 CSC 257/457 - Fall 2009 5 What if or NAK is corrupted? Solution 1: creating special acknowledgments for s/naks. What if they get corrupted too?? Solution 2: treat corrupted acknowledgements as NAKs. Duplicated packets!! To solve duplicated packets: sequence number for each packet. corrupted packet #1 duplicate discard How many sequence numbers do we need here? 10/14/2009 CSC 257/457 - Fall 2009 6 Deal with Packet Loss: Timeouts Deal with Duplicated s t duplicate discard packet #1 duplicate discard Early duplicated packet sequence number. (not likely for data link protocol) Solution: each carries sequence number. With, NAK is not necessary any more. 10/14/2009 CSC 257/457 - Fall 2009 7 10/14/2009 CSC 257/457 - Fall 2009 8 CSC 257/457 - Fall 2009 2

Stop-and-Wait Efficiency of Stop-and-Wait Now we have a protocol: Time #0 packet #1 #1 Allow one outstanding (un-ed) packet stop-and-wait By the way, we haven t talked about in-order delivery. first packet bit transmitted, t = 0 last bit transmitted, t=l/r sender RTT arrives, send next packet, t = RTT + L / R efficiency = L / R RTT + L / R receiver first packet bit arrives last bit arrives, send Example: Packet size L = 1KB (8kbits), Transmission speed R = 1 Gbps, Roundtrip prop. delay RTT = 30ms. 0.027% efficiency! 10/14/2009 CSC 257/457 - Fall 2009 9 10/14/2009 CSC 257/457 - Fall 2009 10 Pipelined Protocols Pipelining: sender allows multiple, in-flight, yet-to- be-acknowledged d packets Pipelining: Increased Efficiency sender receiver first packet bit transmitted, t = 0 last bit transmitted, t = L / R RTT arrives, send next packet, t = RTT + L / R first packet bit arrives last packet bit arrives, send last bit of 2 nd packet arrives, send last bit of 3 rd packet arrives, send Increase utilization by a factor of 3! Channel util efficiency = 3*L / R RTT + L / R =.000024.030008 = 0.08% 10/14/2009 CSC 257/457 - Fall 2009 11 10/14/2009 CSC 257/457 - Fall 2009 12 CSC 257/457 - Fall 2009 3

A pipelined protocol: Sliding Window Allow multiple outstanding (un-ed) packets Upper bound on un-ed packets, called window Go-Back-N: window of up to N consecutive un-ed packets allowed; limit send buffer space Time Two variations: go-back-n, and selective repeat. 10/14/2009 CSC 257/457 - Fall 2009 13 cumulative with seq #n stands for s all packets up to, including seq #n recv s in send window sliding send window timer for each in-flight packet (or first in-flight packet) packet with seq #n s: retransmit #n and all higher seq # packets in window (buffering) 10/14/2009 CSC 257/457 - Fall 2009 14 Go-Back-N: GBN in Action In-order packet: Acknowledge it. Out-of-order packet: Discard! Optional: Re- packet with highest in-order seq # (sort of a N) alert sender something is wrong through duplicated s not critical for protocol ness; but may improve performance Drawback: Resend out-oforder packets To fix it: buffering Selective acknowledgement 10/14/2009 CSC 257/457 - Fall 2009 15 10/14/2009 CSC 257/457 - Fall 2009 16 CSC 257/457 - Fall 2009 4

Selective Repeat Selective Repeat:, Windows receiver buffers out-of-order packets for eventual in-order delivery to upper layer individually acknowledges all ly received packets sender maintains timer for each un-ed packet only s packets whose timers expire before s are received 10/14/2009 CSC 257/457 - Fall 2009 17 10/14/2009 CSC 257/457 - Fall 2009 18 Selective Repeat in Action Selective Repeat Implementation sender data from above: if there is available slot in window, send pkt (n): pkt n, restart timer (n): mark pkt n as received if n is smallest uned pkt, advance window base to next uned seq # (sliding!) receiver pkt n in [rcvbase, rcvbase+n-1] send (n) in-order: deliver (also deliver buffered, in-order pkts), advance window to next not-yet-received pkt (sliding!) out-of-order: buffer pkt n in [rcvbase-n, rcvbase-1] (n) otherwise: ignore 10/14/2009 CSC 257/457 - Fall 2009 19 10/14/2009 CSC 257/457 - Fall 2009 20 CSC 257/457 - Fall 2009 5

Sequence Number Space Disclaimer SeqNum field is finite; sequence numbers wrap around 0, 1,, S-1, 0, 1,, S-1, 0, 1, For a given window size N, how large a sequence number space is enough? out-of-order channel: an old packet carrying the same sequence number confused with a packet of current concern Parts of the lecture slides contain original work of James Kurose, Larry Peterson, and Keith Ross. The slides are intended for the sole purpose of instruction of computer networks at the University of Rochester. All copyrighted materials belong to their original owner(s). 10/14/2009 CSC 257/457 - Fall 2009 21 10/14/2009 CSC 257/457 - Fall 2009 22 CSC 257/457 - Fall 2009 6