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

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

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

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

Lecture 7: Flow Control"

UNIT IV -- TRANSPORT LAYER

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

CS519: Computer Networks. Lecture 5, Part 4: Mar 29, 2004 Transport: TCP congestion control

CS519: Computer Networks. Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing

image 3.8 KB Figure 1.6: Example Web Page

Data Link Control Protocols

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

Principles of Reliable Data Transfer

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

TCP Congestion Control

TCP Congestion Control

TCP so far Computer Networking Outline. How Was TCP Able to Evolve

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

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

Applied Networks & Security

Lecture 21: Congestion Control" CSE 123: Computer Networks Alex C. Snoeren

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

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

The Transport Layer Reliability

8. TCP Congestion Control

Outline Computer Networking. Functionality Split. Transport Protocols

Flow Control, and Congestion Control

Congestion Control. Brighten Godfrey CS 538 January Based in part on slides by Ion Stoica

TCP over wireless links

Congestion Control End Hosts. CSE 561 Lecture 7, Spring David Wetherall. How fast should the sender transmit data?

CS321: Computer Networks Congestion Control in TCP

Transport Layer (TCP/UDP)

Network Management & Monitoring

Good Ideas So Far Computer Networking. Outline. Sequence Numbers (reminder) TCP flow control. Congestion sources and collapse

IIP Wireless. Presentation Outline

Network Protocols. Transmission Control Protocol (TCP) TDC375 Autumn 2009/10 John Kristoff DePaul University 1

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

Multiple unconnected networks

ECE697AA Lecture 3. Today s lecture

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

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

Reliable Transport I: Concepts and TCP Protocol

ADVANCED COMPUTER NETWORKS

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

Lecture 14: Congestion Control"

L12: end to end layer

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Internet Networking recitation #10 TCP New Reno Vs. Reno

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

CS419: Computer Networks. Lecture 10, Part 3: Apr 13, 2005 Transport: TCP performance

Recap. TCP connection setup/teardown Sliding window, flow control Retransmission timeouts Fairness, max-min fairness AIMD achieves max-min fairness

Internet Protocols Fall Outline

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

Reliable Transport II: TCP and Congestion Control

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

2.4 Error Detection Bit errors in a frame will occur. How do we detect (and then. (or both) frames contains an error. This is inefficient (and not

Programming Assignment 3: Transmission Control Protocol

Basic Reliable Transport Protocols

CS457 Transport Protocols. CS 457 Fall 2014

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

TCP: Flow and Error Control

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

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

Flow Control, and Congestion Control

Flow and Congestion Control

Reliable Transport I: Concepts and TCP Protocol

Sequence Number. Acknowledgment Number. Data

TCP/IP Performance ITL

Bandwidth Allocation & TCP

Overview. TCP & router queuing Computer Networking. TCP details. Workloads. TCP Performance. TCP Performance. Lecture 10 TCP & Routers

Fast Retransmit. Problem: coarsegrain. timeouts lead to idle periods Fast retransmit: use duplicate ACKs to trigger retransmission

Does current Internet Transport work over Wireless? Reviewing the status of IETF work in this area

Announcements. IP Forwarding & Transport Protocols. Goals of Today s Lecture. Are 32-bit Addresses Enough? Summary of IP Addressing.

TCP Performance. EE 122: Intro to Communication Networks. Fall 2006 (MW 4-5:30 in Donner 155) Vern Paxson TAs: Dilip Antony Joseph and Sukun Kim

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

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

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

CS4700/CS5700 Fundamentals of Computer Networks

Operating Systems and Networks. Network Lecture 10: Congestion Control. Adrian Perrig Network Security Group ETH Zürich

Where we are in the Course. Topic. Nature of Congestion. Nature of Congestion (3) Nature of Congestion (2) Operating Systems and Networks

Operating Systems and Networks. Network Lecture 8: Transport Layer. Adrian Perrig Network Security Group ETH Zürich

Operating Systems and Networks. Network Lecture 8: Transport Layer. Where we are in the Course. Recall. Transport Layer Services.

Outline. CS5984 Mobile Computing

CSE 123A Computer Networks

CS 640 Introduction to Computer Networks Spring 2009

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

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

11/24/2009. Fundamentals of Computer Networks ECE 478/578. Flow Control in TCP

Computer Networking Introduction

CSE 461. TCP and network congestion

Data Link Layer, Part 5 Sliding Window Protocols. Preface

Transport Protocols and TCP: Review

Congestion control in TCP

Chapter 24. Transport-Layer Protocols

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

ECE 333: Introduction to Communication Networks Fall 2001

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2015

Chapter 11 Data Link Control 11.1

User Datagram Protocol

Improving the Robustness of TCP to Non-Congestion Events

Transcription:

EECS 122, Lecture 19 Today s Topics: More on Reliable Delivery Round-Trip Timing Flow Control Intro to Congestion Control Kevin Fall, kfall@cs cs.berkeley.eduedu Reliable Delivery Stop and Wait simple ARQ scheme, bad performance degrades with increasing RTT poor performance derives from not filling the pipe How to fill the pipe? Recall the bandwidth-delay product is a measure of the bit storage capacity of a path so, if we can keep a bw-delay product s worth of data in network, we fully utilize it An Imagine a long-distance T1 line: bandwidth: 1.544Mb/s, RTT about 45ms bw-delay product about 70Kb (8700 bytes) Assuming Stop&Wait w/frame size 1KB: performance is ~ (1frame)/(1 RTT) = 1KB/(0.045s) = 182Kb/s limits performance to about 1/8 of link Improving over Stop & Wait Want a way to fill up the bandwidth- delay product of the path Extend S&W with the ability to introduce >1 packet into the network before receiving an ACK Go-back-n, also called Sliding Window introduce a window of size n can inject n packets into net before hearing an ACK Picture of Go-back-n/Sliding Window Send 1, set timer 1 Send 2, set timer 2 Send 3, set timer 3 Cancel timer 1, send 4 Cancel timer 2, send 5 Cancel timer 3, send 6 Timer 5 expires, re-send 5 Timer 6 expires, re-send 6 Send 7 Receive 1, send ACK Receive 2, send ACK Receive 3, send ACK Time Send Window Maintenance So, how does the sender keep track of what to send? Sliding windows: label each packet with a sequence number a window is a collection of adjacent sequence numbers the size of the collection is the sender s window size 1

(send window, w=3) (recv( ACK for 8) Sent and ACK d Send Window be sent Sent and ACK d Send Window be sent In-window packets are sent but not yet ACK d, also called unacknowledged packets Window has slid forward, allowing 11 to be sent, and 8 to be retired Receive Window Maintenance keeps a similar window Why? has a finite buffer left window edge is first packet receiver wants to see right edge is last packet it can hold packets < left edge or > right edge dropped other (good) packets are queued, allowing for fixing up out-of-order packets (recv( window, w=3) Recv d and ACK d Recv Window receive In-window packets may be received, even out of order (recv( packet 8) Recv d and ACK d Recv Window be received Window has slid forward, allowing 11 to be received, and implying an ACK generation for 8 Some Observations With sliding windows, it is possible to fully utilize a link, provided the window size is large enough. Throughput is ~ (w/rtt); Stop & Wait is like w = 1. has to buffer all unacknowledged packets, because they may require retransmission may be able to accept out-of- order packets, but only up to its buffer limits 2

Retransmissions So, the sender needs to set timers in order to know when to retransmit a packet the may have been lost How long to set the timer for? Too short: may retransmit before data or ACK has arrived, creating duplicates Too long: if a packet is lost, will take a long time to recover (inefficient) Retransmission Timer The amount of time the sender should wait is about the round-trip time (RTT( RTT) between the sender and receiver For link-layer networks (LANs), this value is essentially known For multi-hop WANS, rarely known Must work in both environments, so protocol should adapt to the path behavior Adaptive Retransmission Timer In order to set retransmission timer, must know approximate RTT for both WAN and LAN connections One way: measure each send/ack combination take time-averaged estimate of RTT set timer to some factor times this average (used in early TCPs we will see improvements once we cover TCP in detail) The Question of ACKs What exactly should the receiver ACK? Some possibilities: ACK every packet, giving its sequence number use cumulative ACK,, where an ACK for number n implies ACKS for all k < n use negative ACKs (NACKs), indicating which packet did not arrive use selective ACKs (SACKs), indicating those that did arrive, even if not in order Issues with ACKs ACKs might be dropped in the network: often results in similar behavior as though a packet was dropped so, do ACKs need reliable transfer too? If so, then chicken-and-egg problem note that with cumulative ACKs,, not too bad if some ACKs are lost, provided there are many of them focus on cumulative ACKS (used by TCP) Cumulative and Delayed ACKs Cumulative ACK : receiver receives packets 1,2,3,5,6,7,8 sends ACKs for 1,2,3 or maybe 1,2,3,3,3,3,3 upon receiving packet 4, ACKs 8 Observations: can t ACK out-of-order packets can delay ACKs,, say, for every other packet delaying might be useful for piggybacking ACKs on data (on reverse-direction flow) 3

Send Window Size Issues A bigger send window size provides larger throughput (well, maybe) if w is too big for what the receiver can handle, extra data is discarded at the receiver and must be retransmitted (inefficient) if w is too big for what the network can handle, extra is discarded within the network and must be retransmitted (also inefficient) Want flow and congestion control Avoiding receiver overrun Flow control recall receiver s window is a measure of how much data receiver can buffer would rather the sender not send more than the receiver can handle need a way for the receiver to tell the sender how much buffer space is available Window advertisement receiver tells sender how much space available Seq 1 Seq 1 ACK=1 Win=3 ACK=1 Win=3 4

Seq 2 Seq 2 ACK=2 Win=2 ACK=2 Win=2 Seq 4 Seq 3 Seq 4 ACK=3 Win=1 5

receives ACK for 3, but remembers it sent 3 & 4 when win=2, so no more yet ACK=3 Win=1 ACK=4 Win=0 ACK=4 Win=0 Flow Control now frozen due to flow control Flow control happens when receiver is unable to keep up with sender s rate consuming process may be busy receiving computer may be slow Window information arrives with ACKs, so send window slides forward at the same time it might shrink or expand Sliding Windows w/flow Control Purposes of sliding window: guarantees the reliable and efficient delivery of data ensures data is delivered in order (or at least corrected at receiver) provides for flow control Flow control is implemented by changing the sender s window based on the receiver s advertised window (send window, w=3) Sent and ACK d Send Window now receives (ACK:8, win:2) be sent 6

(recv( ACK:8, win:2) Sent and ACK d Recv Window Window Size=2 be sent Window has slid forward, but has also become smaller (by left window edge moving to the right). Window shrinkage (moving right edge to the left) is usually avoided. Flow and Congestion Control Limiting the sender s rate based on receiver: flow control based on network: congestion control Congestion Control try to limit the sender s rate based on the ability of the network to deliver traffic 7

ACK:1,win:100 ACK:1,win:100 8

Results of Congestion Large queue occupancy implies: increased delay possible increased jitter increased loss probability Lost packet may trigger retransmissions: sending more packets into the network while it is running over capacity exacerbates the congestion problem in the limit, leads to congestion collapse Congestion Collapse Condition in which network is busy, but no (not much) useful work is being accomplished Can occur with protocols that are not careful to avoid congesting the network Happened in real life in the ARPAnet about 1987 or so Dealing with Congestion Need these to deal with congestion: a way to determine the network is becoming congested or is already congested an algorithm to slow down during times of congestion a way to speed up if the network becomes uncongested Detecting Congestion Two approaches explicit: network tells you implicit: endpoint infers using traffic statistics On the Internet: TCP uses packet loss to indicate congestion (an implicit approach) ICMP Source Quench, and TCP ECN (experimental) provide explicit signaling Do lost packets always mean congestion? 9