Network Protocols: Design and Analysis Polly Huang EE NTU

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.
Simulation-based Comparison of Tahoe, Reno, and SACK TCP Kevin Fall & Sally Floyd Presented: Heather Heiman September 10, 2002.
Different TCP Flavors CSCI 780, Fall TCP Congestion Control Slow-start Congestion Avoidance Congestion Recovery Tahoe, Reno, New-Reno SACK.
1 TCP Congestion Control. 2 TCP Segment Structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement.
CS551: Basic TCP Mechanisms Christos Papadopoulos (
Congestion Control Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
1 TCP - Part II. 2 What is Flow/Congestion/Error Control ? Flow Control: Algorithms to prevent that the sender overruns the receiver with information.
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth Edition,Peterson.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
Computer Networking Lecture 17 – More TCP & Congestion Control Copyright ©, Carnegie Mellon University.
Introduction to Congestion Control
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.
TCP Variations Naveen Manicka CISC 856 – Fall 2005 Computer & Information Sciences University of Delaware Nov 10, 2005 Most slides are borrowed from J.
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.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
15-744: Computer Networking L-10 Congestion Control.
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.
Computer Networks : TCP Congestion Control1 TCP Congestion Control.
Congestion Avoidance and Control CSCI 780, Fall 2005.
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.
1 EE 122: Advanced TCP Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson,
COMT 4291 Communications Protocols and TCP/IP COMT 429.
CS 4396 Computer Networks Lab
1 Transport Protocols (continued) Relates to Lab 5. UDP and TCP.
CSE 461 University of Washington1 Topic How TCP implements AIMD, part 1 – “Slow start” is a component of the AI portion of AIMD Slow-start.
1 TCP III - Error Control TCP Error Control. 2 ARQ Error Control Two types of errors: –Lost packets –Damaged packets Most Error Control techniques are.
EE 122: Congestion Control and Avoidance Kevin Lai October 23, 2002.
1 TCP - Part II Relates to Lab 5. This is an extended module that covers TCP data transport, and flow control, congestion control, and error control in.
Lecture 9 – More TCP & Congestion Control
What is TCP? Connection-oriented reliable transfer Stream paradigm
Network Protocols: Design and Analysis Polly Huang EE NTU
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Computer Networking Lecture 18 – More TCP & Congestion Control.
Lab The network simulator ns The network simulator ns Allows us to watch evolution of parameters like cwnd and ssthresh Allows us to watch evolution of.
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:
1 TCP Timeout And Retransmission Chapter 21 TCP sets a timeout when it sends data and if data is not acknowledged before timeout expires it retransmits.
1 Sonia FahmyPurdue University TCP Congestion Control Sonia Fahmy Department of Computer Sciences Purdue University
TCP End-To-End Congestion Control Wanida Putthividhya Dept. of Computer Science Iowa State University Jan, 27 th 2002 (May, 25 th 2001)
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
1 TCP - Part II. 2 What is Flow/Congestion/Error Control ? Flow Control: Algorithms to prevent that the sender overruns the receiver with information.
1 Computer Networks Congestion Avoidance. 2 Recall TCP Sliding Window Operation.
Congestion Avoidance and Control Van Jacobson and Michael Karels Presented by Sui-Yu Wang.
TCP OVER ADHOC NETWORK. TCP Basics TCP (Transmission Control Protocol) was designed to provide reliable end-to-end delivery of data over unreliable networks.
TCP Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우. TCP congestion control2 Contents 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit.
Recap Slow start introduced cwnd Slow start introduced cwnd Can transmit up to Can transmit up to min( cwnd, offered window ) Flow control by the sender.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
Network Protocols: Design and Analysis Polly Huang EE NTU
TCP - Part II.
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Introduction to Networks
Introduction to Congestion 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.
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.
TCP Tutorial - Part III -
CS640: Introduction to Computer Networks
Lecture 18 – More TCP & Congestion Control
State Transition Diagram
EE 122: Lecture 10 (Congestion Control)
TCP III - Error Control TCP Error Control.
Transport Layer: Congestion Control
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Presentation transcript:

Network Protocols: Design and Analysis Polly Huang EE NTU

TCP Papers [Jacobson88a] [Fall96a]

Polly Huang, NTU EE3 Key ideas [Jacboson88a]: –implementation of transport layer TCP –theory behind TCP congestion control: packet conservation –congestion control alg and how it relates to other TCP algorithms [Fall96a]: –benefits of SACK (selective acknowledgements) –compares several loss recovery algorithms

Polly Huang, NTU EE4 Agenda connection setup and teardown flow control congestion control theory congestion control practice (in TCP) –slow start –congestion avoidance loss recovery putting it together security performance

Polly Huang, NTU EE5 TCP Congestion Control two mechanisms: –slow start –congestion avoidance interacts very closely with loss repair: –good retransmit timeout (RTO) estimation –fast retransmit and recovery –why? packet loss is the signal for congestion packet loss recovery can cause redundant work during times of congestion but need to recover from loss reasonably quickly or goodput drops to zero

Polly Huang, NTU EE6 TCP Congestion Principals underlying principle: packet conservation –at equilibrium, inject packet into network only when one is removed –basis for stability of physical systems components: –how to get there: slow start –how to stay there: congestion avoidance

Polly Huang, NTU EE7 TCP Congestion Control Mechanisms new congestion window cwnd –what the network can handle –vs. flow control window (wnd): what the other end can handle sender limits tx –min (wnd, cwnd) –(and also considers outstanding data)

Polly Huang, NTU EE8 TCP Self-clocking PrPr PbPb ArAr AbAb receiver sender AsAs depends on ACK stream to keep packets flowing (Redrawn from [Jacobson88a]) packet spacing at receiver xxx pck spacing at botteneck xxx ACK spacing at sender

Polly Huang, NTU EE9 Slow Start How do we get the ACK clock started? –Initialize cwnd = 1 –Upon receipt of every ACK, cwnd = cwnd + 1 Implications –how much in each RTT? increase multipliciatively (doubles each rtt) –Will overshoot window and cause packet loss (but remember, packet loss is part of the plan)

Polly Huang, NTU EE10 Slow Start Example 1 one RTT one pkt time 0R 2 1R 3 4 2R R (redrawn from [Jacobson88a] Fig 2)

Polly Huang, NTU EE11 Slow Start Time-Sequence Plot time Data (KB)

Polly Huang, NTU EE12 When to End Slow-Start? Want to end when the pipe is full –do end when cwnd > ssthresh –start with large ssthresh, but then refine it On packet loss –cwnd=1 and go back to slow start –ssthresh = cwnd / 2 assume that pipe size was somewhere between last good window (cwnd/2) and current window (cwnd) Eventually, ssthresh is right and transition to congestion avoidance without packet loss

Polly Huang, NTU EE13 Congestion Avoidance upon receiving ACK –Increase cwnd by 1/cwnd –This is additive increase (over 1 RTT it adds up to increasing by 1 segment) why not multiplicative increase? –growing too fast in equilibrium => oscillations

Polly Huang, NTU EE14 Congestion Window time Congestion window

Polly Huang, NTU EE15 Problems So Far have way to fill pipe (slow start) have way to run at equilibrium (congestion avoidance) but tough transition –no good initial ssthresh –large ssthresh causes packet loss, every time  need approaches to quickly recover from packet loss (or explicit signal of congestion)

Polly Huang, NTU EE16 Agenda connection setup and teardown flow control congestion control loss recovery security performance

Polly Huang, NTU EE17 TCP Loss Recovery timeout and retransmit fast retransmit fast recovery New-Reno partial ACKs SACK

Polly Huang, NTU EE18 Fallback Mechanism: Timeout retransmission timer (RTO) –if no ACK after RTO fires, reset cwnd and resend lowest unACK’ed segment but they’re very crude –completely stop the ACK clock –force slow-start again –are often slow—a long time with no traffic …but is there more information?

Polly Huang, NTU EE19 Digression: RTO Calculation Must estimate RTO –don’t know it at start –may change due to congestion or path change But need a good estimate –too low => unnecessary retransmits –too high => low utilitization

Polly Huang, NTU EE20 Initial Round-trip Estimator Round trip times exponentially averaged: New RTT =  (old RTT) + (1 -  ) (new sample) Recommended value for  : Retransmit timer set to  RTT, where  = 2 Every RTO expiration, increase it multiplicatively

Polly Huang, NTU EE21 Retransmission Ambiguity AB ACK Sample RTT AB Original transmission retransmission Sample RTT Original transmission retransmission ACK RTO what does the ACK indicate?

Polly Huang, NTU EE22 Karn’s Retransmission Timeout Estimator Accounts for retransmission ambiguity If a segment has been retransmitted: –Don’t count RTT sample on ACKs for this segment –Keep backed off time-out for next packet –Reuse RTT estimate only after one successful transmission

Polly Huang, NTU EE23 Jacobson’s Retransmission Timeout Estimator Key observation: –Using  RTT for timeout doesn’t work (not adaptive enough with fixed  : at high loads, variance is high) Solution: –If D denotes mean variation (measured) –Timeout = RTT + 4D –  is now adaptive (and can do it with integer math in few l.o.c.)

Polly Huang, NTU EE24 TCP Loss Recovery timeout and retransmit fast retransmit fast recovery New-Reno partial ACKs SACK

Polly Huang, NTU EE25 Fast Retransmit Interpret n duplicate ACKs as loss indication –in fact, send a dup ACK for every packet you get after a missing one –but beware: now packet re-ordering causes problems Goal: avoid RTO by fixing the one missing segment

Polly Huang, NTU EE26 Fast Retransmit Example fast retransmit after 3 dup ACKs from [Fall96a] figure 2 fast retx helps a lot, but not always (if no dup ACKs)

Polly Huang, NTU EE27 Fast Recovery Problem: fast retx still forces slow-start, breaking the ACK clock Fast Recovery Solution: artificially inflate the cwnd as more dup ACKs come in –cut cwnd, but instead of slow start, do additive increase for each ACK –justification: each dup ACK represents a packet leaving the network, so we can increase cwnd –exit when out of dup ACKs

Polly Huang, NTU EE28 Fast Retransmit and Recovery If we get 3 duplicate ACKs for segment N –Retransmit segment N –Set ssthresh to 0.5*cwnd –Set cwnd to ssthresh + 3 [why?] For every subsequent duplicate ACK –Increase cwnd by 1 segment When new ACK received –Reset cwnd to ssthresh (resume congestion avoidance)

Polly Huang, NTU EE29 Fast Recovery Example fast retransmit after 3 dup ACKs fast recovery due to add’tl dup ACKs

Polly Huang, NTU EE30 New-Reno Partial ACKs But fast retx and recovery only repair one lost segment per RTT New-Reno idea: use partial ACKs to stay in fast recovery and fix more lost segments (But there are diminishing returns here…)

Polly Huang, NTU EE31 New-Reno Example fast retransmit after 3 dup ACKs fast recovery due to add’tl dup ACKs additional fast retx and recovery from New Reno from [Fall96a] figure 3

Polly Huang, NTU EE32 SACK Forget these hacks, have receiver just tell sender what’s missing  SACK: selective acknowledgement –use TCP options to encode some info about multiple losses and avoid all of this guess work –but why is SACK deployment so much slower than Reno, New-Reno?

Polly Huang, NTU EE33 Agenda connection setup and teardown flow control congestion control theory congestion control practice (in TCP) loss recovery putting it together security performance

Polly Huang, NTU EE34 Jacobson Observations Compare Figure 3 vs. Figure 4 Compare Figure 8 vs. Figure 9

Polly Huang, NTU EE35 Jacobson88a Figure 3: No CC

Polly Huang, NTU EE36 Jacobson88a Figure 4: with CC

Polly Huang, NTU EE37 Jacobson88a Figure 8: 4x no CC

Polly Huang, NTU EE38 Jacobson88a Figure 9: 4x w/CC

Polly Huang, NTU EE39 Other questions/observations? xxx