CS640: Introduction to Computer Networks

Slides:



Advertisements
Similar presentations
CSCI-1680 Transport Layer II Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Advertisements

TCP Variants.
TCP and Congestion Control
Congestion Control Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
TCP Congestion Control Dina Katabi & Sam Madden nms.csail.mit.edu/~dina 6.033, Spring 2014.
Router Buffer Sizing and Reliability Challenges in Multicast Aditya Akella 02/28.
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth Edition,Peterson.
Introduction 1 Lecture 14 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
Computer Networking Lecture 17 – More TCP & Congestion Control Copyright ©, Carnegie Mellon University.
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
Transport Layer3-1 Congestion Control. Transport Layer3-2 Principles of Congestion Control Congestion: r informally: “too many sources sending too much.
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Third Ed.,Peterson.
15-744: Computer Networking L-10 Congestion Control.
Lecture 18 – TCP Performance
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #7 TCP New Reno Vs. Reno.
1 Internet Networking Spring 2002 Tutorial 10 TCP NewReno.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Week 9 TCP9-1 Week 9 TCP 3 outline r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management.
Computer Networks : TCP Congestion Control1 TCP Congestion Control.
1 Chapter 3 Transport Layer. 2 Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4.
Data Communication and Networks
1 Internet Networking Spring 2004 Tutorial 10 TCP NewReno.
Networks : TCP Congestion Control1 TCP Congestion Control.
Networks : TCP Congestion Control1 TCP Congestion Control Presented by Bob Kinicki.
Advanced Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth.
CMPE 257 Spring CMPE 257: Wireless and Mobile Networking Spring 2005 E2E Protocols (point-to-point)
TCP Congestion Control
Introduction 1 Lecture 14 Transport Layer (Congestion Control) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
3: Transport Layer3b-1 Principles of Congestion Control Congestion: r informally: “too many sources sending too much data too fast for network to handle”
Computer Networking Lecture 17 – TCP Performance Dejian Ye, Liu Xin.
COMT 4291 Communications Protocols and TCP/IP COMT 429.
Lecture 9 – More TCP & Congestion Control
Computer Networking Lecture 16 –TCP in detail Eric Anderson Fall
What is TCP? Connection-oriented reliable transfer Stream paradigm
Lecture 18 – More TCP & Congestion Control
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Computer Networking Lecture 18 – More TCP & Congestion Control.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms Computer Network System Sirak Kaewjamnong Semester 1st, 2004.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
Network Protocols: Design and Analysis Polly Huang EE NTU
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
1 Computer Networks Congestion Avoidance. 2 Recall TCP Sliding Window Operation.
TCP Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우. TCP congestion control2 Contents 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Chapter 3 outline 3.1 transport-layer services
COMP 431 Internet Services & Protocols
Introduction to Congestion Control
Advance Computer Networking
Chapter 5 TCP Transmission Control
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
TCP.
Lecture 19 – TCP Performance
So far, On the networking side, we looked at mechanisms to links hosts using direct linked networks and then forming a network of these networks. We introduced.
Congestion Control in TCP
Lecture 18 – More TCP & Congestion Control
State Transition Diagram
If both sources send full windows, we may get congestion collapse
CS4470 Computer Networking Protocols
TCP Congestion Control
EE 122: Lecture 10 (Congestion Control)
TCP III - Error Control TCP Error Control.
Transport Layer: Congestion Control
Chapter 3 outline 3.1 Transport-layer services
Computer Networking TCP.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Presentation transcript:

CS640: Introduction to Computer Networks Aditya Akella Lecture 16 TCP – III Reliability and Implementation Issues

So Far Transport protocols and TCP functionality overview Principles of reliable data transfer TCP segment structure Connection management Congestion control

More on Reliability TCP provides a “reliable byte stream” Challenges: “Loss recovery” key to ensuring this abstraction Sender must retransmit lost packets Challenges: Congestion related losses Variable packet delays What should the timeout be? Reordering of packets How to tell the difference between a delayed packet and a lost one?

TCP = Go-Back-N Variant Sliding window with cumulative acks Receiver can only return a single “ack” sequence number to the sender. Acknowledges all bytes with a lower sequence number Starting point for retransmission Duplicate acks sent when out-of-order packet received But: sender only retransmits a single packet. Only one that it knows is lost Sent after timeout Network is congested  shouldn’t overload it Choice of timeout interval  crucial

Round-trip Time Estimation Reception success known only after one RTT Wait at least one RTT before retransmitting Importance of accurate RTT estimators: Low RTT estimate unneeded retransmissions High RTT estimate poor throughput RTT estimator must adapt to change in RTT But not too fast, or too slow!

Original TCP RTT Estimator Round trip times exponentially averaged: New RTT = a (old RTT) + (1 - a) (new sample) Recommended value for a: 0.8 - 0.9 0.875 for most TCP’s Retransmit timer set to (2 * RTT) Whenever timer expires, RTO exponentially backed-off Not good at preventing spurious timeouts Why?

Jacobson’s Retransmission Timeout Key observation: At high loads round trip variance is high Solution: Base RTO on RTT and deviation RTO = RTT + 4 * rttvar new_rttvar = b * dev + (1- b) old_rttvar Dev = linear deviation Inappropriately named – actually smoothed linear deviation

AIMD Implementation If loss occurs when cwnd = W Upon receiving ACK Network can handle < W segments Set cwnd to 0.5W (multiplicative decrease) Known as “congestion control” Upon receiving ACK Increase cwnd by (1 packet)/cwnd What is 1 packet?  1 MSS worth of bytes After cwnd packets have passed by  approximately increase of 1 MSS Known as “congestion avoidance” Implements AIMD

Control/Avoidance Behavior Congestion Window Time Cut Congestion Window and Rate Packet loss + Timeout Grabbing back Bandwidth

Improving Loss Recovery: Fast Retransmit Waiting for timeout to retransmit is inefficient Are there quicker recovery schemes? Use duplicate acknowledgements as an indication Fast retransmit What are duplicate acks (dupacks)? Repeated acks for the same sequence When can duplicate acks occur? Loss Packet re-ordering Assume re-ordering is infrequent and not of large magnitude Use receipt of 3 or more duplicate acks as indication of loss Don’t wait for timeout to retransmit packet

Fast Retransmit X Retransmission Duplicate Acks Sequence No Note: Timeouts can still happen (burst losses in a window) Packets Acks Time

Packet Pacing In steady state, a packet is sent when an ack is received Data transmission remains smooth, once it is smooth (steady state) “Self-clocking” behavior Pb Pr Sender Receiver As Ar Ab

How to Change Window When a loss occurs have W packets outstanding A bunch of dupacks arrive Rexmit on 3rd dupack But dupacks keep arriving Must wait for a new ack New cwnd = 0.5 * cwnd Send new cwnd packets in a burst Risk losing ack clocking

Preserving Clocking: Fast Recovery Each duplicate ack notifies sender that single packet has cleared network When < cwnd packets are outstanding Allow new packets out with each new duplicate acknowledgement Behavior Sender is idle for some time – waiting for ½ cwnd worth of dupacks Transmits at original rate after wait Ack clocking rate is same as before loss

Sent for each dupack after Fast Recovery (Reno) Sent for each dupack after W/2 dupacks arrive Sequence No X Packets Acks Time

Timeouts can still happen! X X X Now what? - timeout X Sequence No Packets Acks Time

Reaching Steady State Doing AIMD is fine in steady state… But how to get to steady state? How does TCP know what is a good initial rate to start with? Quick initial phase to help get up to speed Called “slow” start (!!)

Slow Start Slow start Implications Initialize cwnd = 1 Upon receipt of every ack, cwnd = cwnd + 1 Implications Window actually increases to W in RTT * log2(W) Can overshoot window and cause packet loss

Slow Start Example One RTT 0R 1 1R 2 3 2R 4 6 5 7 3R 8 10 12 14 9 11 One pkt time 1R 1 2 3 2R 2 3 4 6 5 7 3R 4 5 6 7 8 10 12 14 9 11 13 15

Return to Slow Start If too many packets are lost self clocking is lost as well Need to implement slow-start and congestion avoidance together When timeout occurs set ssthresh to 0.5w If cwnd < ssthresh, use slow start Else use congestion avoidance

The Whole TCP “Saw Tooth” Congestion Window Timeouts may still occur Time Slowstart to pace packets Fast Retransmit and Recovery Initial Slowstart

TCP Performance Can TCP saturate a link? Congestion control Increase utilization until… link becomes congested React by decreasing window by 50% Window is proportional to rate * RTT Doesn’t this mean that the network oscillates between 50 and 100% utilization? Average utilization = 75%?? No…this is *not* right!

Unbuffered Link The router can’t fully utilize the link W Minimum window for full utilization t The router can’t fully utilize the link If the window is too small, link is not full If the link is full, next window increase causes drop With no buffer TCP achieves 75% utilization

TCP Performance In the real world, router queues play important role Window is proportional to rate * RTT But, RTT changes as well as the window Window to fill links = propagation RTT * bottleneck bandwidth Role of Buffers  If window is larger, packets sit in queue on bottleneck link

TCP Performance In the real world, router queues play important role Role of Buffers  If window is larger, packets sit in queue on bottleneck link If we have a large router queue  can get 100% utilization But, router queues can cause large delays How big does the queue need to be? Windows vary from W  W/2 To make sure that link is always full W/2 > RTT * BW W = RTT * BW + Qsize  Qsize > RTT * BW Ensures 100% utilization Delay? Varies between RTT and 2 * RTT Queuing between 0 and RTT

Buffered Link W Minimum window for full utilization Buffer t With sufficient buffering we achieve full link utilization The window is always above the “critical” threshold Buffer absorbs changes in window size Buffer Size = Height of TCP Sawtooth Minimum buffer size needed is 2T*C This is the origin of the rule-of-thumb

TCP Summary General loss recovery TCP sliding window flow control Stop and wait Selective repeat TCP sliding window flow control TCP state machine TCP loss recovery Timeout-based RTT estimation Fast retransmit, recovery

TCP Summary Congestion collapse Congestion control Definition & causes Congestion control Why AIMD? Slow start & congestion avoidance modes ACK clocking Packet conservation TCP performance modeling How does TCP fully utilize a link? Role of router buffers

Next Class Naming and the DNS