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

Similar documents
Lecture 7: Flow Control"

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

Lecture 7: Flow & Media Access Control"

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

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

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

The Transport Layer Reliability

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

Principles of Reliable Data Transfer

Reliable Transport : Fundamentals of Computer Networks Bill Nace

CS43: Computer Networks Reliable Data Transfer. Kevin Webb Swarthmore College October 5, 2017

CS 43: Computer Networks. 16: Reliable Data Transfer October 8, 2018

Reliable Data Transfer

ECE697AA Lecture 3. Today s lecture

Error Detection Codes. Error Detection. Two Dimensional Parity. Internet Checksum Algorithm. Cyclic Redundancy Check.

Lecture 6: Reliable Transmission. CSE 123: Computer Networks Alex Snoeren (guest lecture) Alex Sn

Chapter 3: Transport Layer Part A

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

CSCI-1680 Link Layer Reliability John Jannotti

CSCD 330 Network Programming

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

CSC 401 Data and Computer Communications Networks

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

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

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

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

CSE 461: Introduction to Computer Communication Networks. Chunjong Park

CSE/EE 461. Sliding Windows and ARQ. Last Time. This Time. We finished up the Network layer Internetworks (IP) Routing (DV/RIP, LS/OSPF)

Networked Systems and Services, Fall 2018 Chapter 2. Jussi Kangasharju Markku Kojo Lea Kutvonen

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

Communication Networks

The Transport Layer Multiplexing, Error Detection, & UDP

rdt2.0 has a fatal flaw!

Direct Link Networks (II)

CS457 Transport Protocols. CS 457 Fall 2014

Basic Reliable Transport Protocols

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

TDTS06: Computer Networks

TCP over wireless links

Chapter 11 Data Link Control 11.1

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

Overview. TCP congestion control Computer Networking. TCP modern loss recovery. TCP modeling. TCP Congestion Control AIMD

Lecture 10: Transpor Layer Principles of Reliable Data Transfer

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

Transport Layer (TCP/UDP)

CS321: Computer Networks Congestion Control in TCP

Chapter 3 Transport Layer

Chapter 3: Transport Layer

CSCI-1680 Link Layer I Rodrigo Fonseca

Data Link Layer, Part 5 Sliding Window Protocols. Preface

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

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

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Data Link Control Protocols

Outline Computer Networking. TCP slow start. TCP modeling. TCP details AIMD. Congestion Avoidance. Lecture 18 TCP Performance Peter Steenkiste

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

Networking Link Layer

ECE 435 Network Engineering Lecture 10

Transport Layer Marcos Vieira

Question. Reliable Transport: The Prequel. Don t parse my words too carefully. Don t be intimidated. Decisions and Their Principles.

Lecture - 14 Transport Layer IV (Reliability)

STEVEN R. BAGLEY PACKETS

NWEN 243. Networked Applications. Layer 4 TCP and UDP

ELEN Network Fundamentals Lecture 15

CMSC 332 Computer Networks Reliable Data Transfer

Fall 2012: FCM 708 Bridge Foundation I

Chapter 3 Transport Layer

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

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

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

CSC 4900 Computer Networks: Reliable Data Transport

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

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

Administrivia. FEC vs. ARQ. Reliable Transmission FEC. Last time: Framing Error detection. FEC provides constant throughput and predictable delay

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

Sliding Window Protocols, Connection Management, and TCP Reliability

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

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

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

Reliable Transport I: Concepts and TCP Protocol

Recap. More TCP. Congestion avoidance. TCP timers. TCP lifeline. Application Presentation Session Transport Network Data Link Physical

The Data Link Layer Chapter 3

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

Transport Layer Protocols TCP

Applied Networks & Security

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli)

Contents. CIS 632 / EEC 687 Mobile Computing. TCP in Fixed Networks. Prof. Chansu Yu

UNIT IV -- TRANSPORT LAYER

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

Impact of transmission errors on TCP performance. Outline. Random Errors

Computer Networks. Sándor Laki ELTE-Ericsson Communication Networks Laboratory

Chapter 11 Data Link Control 11.1

Chapter 11 Data Link Control 11.1

CS 3516: Advanced Computer Networks

CSC 4900 Computer Networks: TCP

Chapter III: Transport Layer

DualRTT: Enhancing TCP Performance During Delay Spikes

Lecture 5. Homework 2 posted, due September 15. Reminder: Homework 1 due today. Questions? Thursday, September 8 CS 475 Networks - Lecture 5 1

TCP: Flow and Error Control

CS4700/CS5700 Fundamentals of Computer Networks

Transcription:

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

Please turn in HW #1 Thank you

From last class: Sequence Numbers Sender Receiver Sender Receiver Timeout Timeout Timeout Timeout Ignored! Sequence numbers solve this problem Receiver can simply ignore duplicate data But must still send an ACK! (Why?) Simplest ARQ: Stop-and-wait Only one outstanding frame at a time Called alternating bit protocol in book (1 bit sequence number)

Stop-and-Wait Performance Lousy performance if xmit 1 pkt << prop. delay How bad? Want to utilize all available bandwidth Need to keep more data in flight How much? Remember the bandwidth-delay product? Also limited by quality of timeout (how long?) CSE 123 Lecture 7: Flow Control 4

Pipelined Transmission Sender Receiver Sender Receiver Ignored! Keep multiple packets in flight Allows sender to make efficient use of the link Sequence numbers ensure receiver can distinguish frames Sender buffers outstanding un-acked packets Receiver ACKs the highest consecutive frame received» ACKs are cumulative (covers current frame and all previous) What to do after a loss? 5

Go-Back-N Sender Receiver Sender Receiver timeout Retransmit all packets from point of loss Packets sent after loss event are ignored (i.e., sent again) Simple to implement (receiver very simple) Sender controls how much data is in flight 6

How many packets in flight? Send Window Timeout Sender Receiver Bound on number of outstanding packets Window opens upon receipt of new ACK Window resets entirely upon a timeout Limits amount of waste Still lots of duplicates We can do better with selective retransmission Go-Back-N Example with window size 3 7

Sliding Window Single mechanism that supports: Multiple outstanding packets Reliable delivery In-order delivery Flow control Sender and receiver each maintain window abstractions to track outstanding packets At the core of all modern ARQ protocols Go-Back-N is a special case Receive window size of one 8

Sliding Window Sender Sender: Window Size Window bounds outstanding unacked data Implies need for buffering at sender Last ACK applies to in-order data What to do on a timeout? Last ACK Last Sent Go-Back-N: resend all unacknowledged data on timeout Selective Repeat: timer per packet, resend as needed 9

Sliding Window Receiver Receive Window Receiver: Last Received Largest Accepted Receiver buffers too: data may arrive out-of-order or faster than can be consumed» Flow control: tell sender how much buffer left at receiver Receiver ACK choices: Cumulative, Selective (exempt missing frames), Negative 10

Deciding When to Retransmit How do you know when a packet has been lost? Ultimately sender uses timers to decide when to retransmit But how long should the timer be? Too long: inefficient (large delays, poor use of bandwidth) Too short: may retransmit unnecessarily (causing extra traffic) Right timer is based on the round-trip time (RTT) Which can vary greatly for reasons well see later 11

Can we shortcut the timeout? Timeout is long in practice Lots of variation in RTT and timeout must be conservative If packets are usually in order then out-of-order ACKs imply that a packet was lost Negative ACK» Receiver requests missing packet Fast retransmit» When sender receives multiple duplicate acknowledgements resends missing packet 12

Fast retransmit Sender Receiver Don t bother waiting Receipt of duplicate acknowledgement (dupack) indicates loss Retransmit immediately Used in TCP Need to be careful if frames can be reordered Today s TCP identifies a loss if there are three duplicate ACKs in a row 13

Is ARQ the Only Way? No. We could use redundancy Send additional data to compensate for lost packets Why not use retransmission? Broadcast media with lots of receivers» If each one ACK/NAK then hard to scale Lots of messages Lots of state» Heterogeneous receivers Some receivers can handle 500kbps others 100Mbps E.g., variable quality wireless reception Highly lossy or very long delay channels (e.g., satellite) 14

Forward Error Correction Use erasure codes to redundantly encode k data frames into m>k encoded frames E.g., Reed Solomon Codes, Tornado codes, Raptor codes, etc Multicast/broadcast encoded frames speculatively A receiver can reconstruct message from any k frames in the set of m encoded frame 15

A Digital Fountain File Transmission 0 hours 1 hour 2 hours 3 hours User 1 User 2 4 hours 5 hours 16

Summary The primary way we achieve reliability over an unreliable channel is automatic repeat request Explicitly notify sender of received packets by sending an acknowledgement (ACK) Resend packets that are not ACKed within some timeframe We can make this efficient by having many unacked packets simultaneously in flight Sliding Window is the standard technique to manage this process and keep the sender and receiver in sync And limit the amount of data needing to be buffered Can use pattern of ACKs to infer losses by making assumptions about packet reordering

For Next Time (Friday) No class on Wednesday! For Friday Media Access Control Keep reading 2.6 in P&D (Keep) going on the project 18