1 Computer Networks Transport Layer (Part 4). 2 Transport layer So far… –Transport layer functions –Specific transport layers UDP TCP –In the middle of.

Slides:



Advertisements
Similar presentations
TCP Variants.
Advertisements

TCP Variations: Tahoe, Reno, New Reno, Vegas, Sack
TCP/IP Over Lossy Links - TCP SACK without Congestion Control.
Different TCP Flavors CSCI 780, Fall TCP Congestion Control Slow-start Congestion Avoidance Congestion Recovery Tahoe, Reno, New-Reno SACK.
TCP and Congestion Control
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.
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.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 ECSE-6600: Internet Protocols Informal Quiz #07 Shivkumar Kalyanaraman: GOOGLE: “Shiv RPI”
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.
Congestion Control Tanenbaum 5.3, /12/2015Congestion Control (A Loss Based Technique: TCP)2 What? Why? Congestion occurs when –there is no reservation.
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.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
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.
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)
Introduction 1 Lecture 14 Transport Layer (Congestion Control) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
3: Transport Layer3b-1 Principles of Congestion Control Congestion: r informally: “too many sources sending too much data too fast for network to handle”
Transport Layer 4 2: Transport Layer 4.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
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.
Computer Networking Lecture 16 – Transport Protocols Dejian Ye, Liu Xin.
EE 122: Congestion Control and Avoidance Kevin Lai October 23, 2002.
Computer Networking TCP (cont.). Lecture 16: Overview TCP congestion control TCP modern loss recovery TCP interactions TCP options TCP.
TCP Tutorial - Part III - It is licensed under a Creative Commons Attribution 2.5 License Laboratory of Intelligent KUT (
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
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:
1 Sonia FahmyPurdue University TCP Congestion Control Sonia Fahmy Department of Computer Sciences Purdue University
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
TCP Congestion Control Computer Networks TCP Congestion Control 1.
1 TCP - Part II. 2 What is Flow/Congestion/Error Control ? Flow Control: Algorithms to prevent that the sender overruns the receiver with information.
TCP Congestion Control
CS 6401 Congestion Control in TCP Outline Overview of RENO TCP Reacting to Congestion SS/AIMD example.
TCP Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우. TCP congestion control2 Contents 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit.
@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.
@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.
15-744: Computer Networking
CS450 – Introduction to Networking Lecture 19 – Congestion Control (2)
Approaches towards congestion control
Chapter 3 outline 3.1 transport-layer services
COMP 431 Internet Services & Protocols
Introduction to Congestion Control
Transport Layer (Part 3)
Lecture 19 – TCP Performance
TCP - Part II Suman Banerjee CS 640, UW-Madison
CS640: Introduction to Computer Networks
Lecture 16 – Transport Protocols
Lecture 18 – More TCP & Congestion Control
If both sources send full windows, we may get congestion collapse
Transport Layer: Congestion Control
TCP flow and congestion control
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Presentation transcript:

1 Computer Networks Transport Layer (Part 4)

2 Transport layer So far… –Transport layer functions –Specific transport layers UDP TCP –In the middle of congestion control This class –Finish TCP –Advanced topics Survey of advanced transport layer issues Queue management and congestion control (in particular)

3 TL: TCP Tahoe slow start Recall –Connection starts out with cwnd=1 –Increases cwnd by 1 segment for every acknowledgement Exponential increase cwnd doubled every RTT

4 TL: TCP Tahoe congestion avoidance Loss implies congestion – why? –Not necessarily true on all link types If loss occurs when cwnd = W –Network can handle 0.5W ~ W segments –Loss detected via timeout or 3 duplicate acknowledgements (“fast retransmit”) –Set ssthresh to 0.5W and slow-start from cwnd=1 Upon receiving ACK with cwnd > ssthresh –Increase cwnd by 1/cwnd –Results in additive increase

5 TL: TCP Tahoe congestion avoidance /* slowstart is over */ /* cwnd > ssthresh */ Until (loss event) { every w segments ACKed: cwnd++ } ssthresh = cwnd/2 cwnd = 1 perform slowstart Congestion avoidance 1 1: TCP Reno halves cwnd and skips slowstart after three duplicate ACKs

6 TL: TCP Tahoe congestion avoidance plot Time Sequence No

7 TL: TCP Tahoe fast retransmit Timeouts (see previous) Duplicate acknowledgements (dupacks) –Repeated acks for the same sequence number –When can duplicate acks occur? Loss Packet re-ordering Window update – advertisement of new flow control window –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

8 TL: TCP Tahoe fast retransmit Time Sequence No Duplicate Acks Retransmission X

9 Time Sequence No X X X X TL: TCP Tahoe fast retransmit plot

10 TL: TCP Reno All mechanisms in Tahoe Add delayed acks (see flow control section) Header prediction –Implementation designed to improve performance –Has common case code inlined Add “fast recovery” to Tahoe’s fast retransmit –Do not revert to slow-start on fast retransmit –Upon detection of 3 duplicate acknowledgments Trigger retransmission (fast retransmission) Set cwnd to 0.5W (multiplicative decrease) and set threshold to 0.5W (skip slow-start) Go directly into congestion avoidance –If loss causes timeout (i.e. self-clocking lost), revert to TCP Tahoe

11 TL: TCP Reno congestion avoidance /* slowstart is over */ /* cwnd > ssthresh */ Until (loss detected) { every w segments ACKed: cwnd++ } /* fast retrasmit */ if (3 duplicate ACKs) { ssthresh = cwnd/2 cwnd = cwnd/2 skip slow start go to fast recovery } Congestion avoidance 1

12 TL: TCP Reno example RTT W W+1 2W Congestion avoidance Fast Retransmit/Recovery Slow-start

13 TL: TCP Reno fast recovery Tahoe –Loses self-clocking Issues in recovering from loss –Cumulative acknowledgments freeze window after fast retransmit On a single loss, get almost a window’s worth of duplicate acknowledgements –Dividing cwnd abruptly in half further reduces sender’s ability to transmit Reno –Use fast recovery to transition smoothly into congestion avoidance –Each duplicate ack notifies sender that single packet has cleared network –Inflate window temporarily while recovering lost segment –Allow new packets out with each subsequent duplicate acknowledgement to maintain self-clocking –Deflate window to cwnd/2 after lost packet is recovered

14 TL: TCP Reno fast recovery behavior Behavior –Sender is idle for some time Waiting for ½ cwnd worth of dupacks Window inflation puts “inflated cwnd” at original cwnd after ½ cwnd worth of dupacks Additional dupacks push “inflated cwnd” beyond original cwnd allowing for additional data to be pushed out during recovery –After pausing for ½ cwnd worth of dupacks Transmits at original rate after wait Ack clocking rate is same as before loss –Results in ½ RTT time idle, ½ RTT time at old rate –Upon recovery of lost segment, cwnd deflated to cwnd/2

15 TL: TCP Reno fast recovery example TCP connection with cwnd=16 at segment number 32 –Receiver receives segment 31 and sends cumulative ack 32 –Sender sends segments –Segment 32 lost, but receiver receives and acknowledges each them with cumulative ack 32 –Receiver sends 16 duplicate cumulative acks for ack 32 acks from 31, 33, 34=>rexmit 32 (cwnd=8) acks from 35, 36, 37, 38, 39, 40, (cwnd=16) ack from 43=>send 49 (cwnd=17) acks from 44, 45, 46, 47, 48=> send 50, 51, 52, 53, 54 (cwnd=22) –Receiver gets rexmit of 32 and sends back ack 49 ack 49=>deflate window (cwnd=8), send 55, 56

16 TL: TCP Reno fast recovery plot Time Sequence No Sent for each dupack after W/2 dupacks arrive

17 TL: TCP Reno and fairness Fairness goal: if N TCP sessions share same bottleneck link, each should get 1/N of link capacity TCP congestion avoidance: AIMD: additive increase, multiplicative decrease –increase window by 1 per RTT –decrease window by factor of 2 on loss event TCP connection 1 bottleneck router capacity R TCP connection 2

18 TL: Why is TCP Reno fair? Recall phase plot discussion with two competing sessions: Additive increase gives slope of 1, as throughout increases multiplicative decrease decreases throughput proportionally R R equal bandwidth share Connection 1 throughput Connection 2 throughput congestion avoidance: additive increase loss: decrease window by factor of 2 congestion avoidance: additive increase loss: decrease window by factor of 2

19 TL: TCP Reno and multiple losses Multiple losses cause timeout in TCP Reno Time Retransmission timeout Sequence No Duplicate Acks X X X X Now what?

20 TL: TCP NewReno changes More intelligent slow-start –Estimate ssthresh based while in slow-start Adapt more gradually to new window Address multiple losses in window

21 TL: TCP NewReno gradual adaptation Send a new packet out for each pair of dupacks Do not wait for ½ cwnd worth of duplicate acks to clear

22 TL: TCP NewReno gradual fast recovery plot Time Sequence No Sent after every other dupack

23 TL: TCP NewReno and multiple losses Partial acknowledgements –Window is advanced, but only to the next lost segment –Stay in fast recovery for this case, keep inflating window on subsequent duplicate acknowledgements –Remain in fast recovery until all segments in window at the time loss occurred have been acknowledged –Do not halve congestion window again until recovery is completed When does NewReno timeout? –When there are fewer than three dupacks for first loss –When partial ack is lost How quickly does NewReno recover multiple losses? –At a rate of one loss per RTT

24 TL: TCP NewReno multiple loss plot Time Sequence No X X X X Now what? – partial ack recovery

25 TL: TCP with SACK Basic problem is that cumulative acks only provide little information –Add selective acknowledgements Ack for exact packets received Not used extensively (yet) Carry information as bitmask of packets received –Allows multiple loss recovery per RTT via bitmask How to deal with reordering?

26 TL: TCP with SACK plot Time Sequence No X X X X Now what? – send retransmissions as soon as detected

27 TL: Interaction of flow and congestion control Sender’s max window (advertised window, congestion window) Question: –Can flow control mechanisms interact poorly with congestion control mechanisms? Answer: –Yes…..Delayed acknowledgements and congestion windows Delayed Acknowledgements –TCP congestion control triggered by acks If receive half as many acks  window grows half as fast –Slow start with window = 1 Will trigger delayed ack timer First exchange will take at least 200ms Start with > 1 initial window –Bug in BSD, now a “feature”/standard

28 TL: TCP Flavors Tahoe, Reno, NewReno Vegas TCP Tahoe (distributed with 4.3BSD Unix) –Original implementation of Van Jacobson’s mechanisms –Includes slow start, congestion avoidance, fast retransmit TCP Reno –Fast recovery TCP NewReno, SACK, FACK –Improved slow start, fast retransmit, and fast recovery

29 TL: Evolution of TCP TCP & IP RFC 793 & TCP described by Vint Cerf and Bob Kahn In IEEE Trans Comm 1983 BSD Unix 4.2 supports TCP/IP 1984 Nagle’s algorithm to reduce overhead of small packets; predicts congestion collapse 1987 Karn’s algorithm to better estimate round-trip time 1986 Congestion collapse observed 1988 Van Jacobson’s algorithms congestion avoidance and congestion control (most implemented in 4.3BSD Tahoe) BSD Reno fast retransmit delayed ACK’s 1975 Three-way handshake Raymond Tomlinson In SIGCOMM 75

30 TL: TCP Through the 1990s ECN (Floyd) Explicit Congestion Notification 1993 TCP Vegas (Brakmo et al) real congestion avoidance 1994 T/TCP (Braden) Transaction TCP 1996 SACK TCP (Floyd et al) Selective Acknowledgement 1996 Hoe Improving TCP startup 1996 FACK TCP (Mathis et al) extension to SACK

31 TL: TCP and Security Transport layer security –Layer underneath application layer and above transport layer –SSL, TLS –Provides TCP/IP connection the following…. Data encryption Server authentication Message integrity Optional client authentication –Original implementation: Secure Sockets Layer (SSL) Netscape (circa 1994) for more informationhttp:// Submitted to W3 and IETF –New version: Transport Layer Security (TLS)

32 TL: TCP and Quality of Service Ad hoc… –Connection-based service differentiation Web switches Operating system policies –Buffer allocation –Scheduling of protocol handlers

33 TL: Advanced topics TCP header compression –Many header fields fixed or change slightly –Compress header to save bandwidth TCP timestamp option –Ambiguity in RTT for retransmitted packets –Sender places timestamp in packet which receiver echoes back TCP sequence number wraparound (TCP PAWS) –32-bit sequence/ack # wraps around –10Mbs: 57 min., 100Mbs: 6 min., 622Mbs: 55 sec.  < MSL! –Use timestamp option to disambiguate TCP window scaling option –16-bit advertised window can’t support large bandwidth*delay networks –For 100ms network, need 122KB for 10Mbs (16-bit window = 64KB) –1.2MB for 100Mbs, 7.4MB for 622Mbs –Scaling factor on advertised window specifies # of bits to shift to the left –Scaling factor exchanged during connection setup

34 TL: Advanced topics (continued) Non-responsive, aggressive applications –Applications written to take advantage of network resources (multiple TCP connections) –Network-level enforcement, end-host enforcement of fairness Congestion information sharing –Individual connections each probe for bandwidth (to set ssthresh) –Share information between connections on same machine or nearby machines (SPAND, Congestion Manager) Short transfers slow –Flows timeout on loss if cwnd < 3 –3-4 packet flows (most HTTP transfers) need 2-3 round-trips to complete –Change dupack threshold for small cwnd –Use larger initial cwnd (IETF approved initial cwnd = 3 or 4)

35 TL: Advanced topics (continued) Asymmetric TCP –TCP over highly asymmetric links is limited by ACK throughput (40 byte ack for every MTU-sized segment) –Coalesce multiple acknowledgements into single one TCP over wireless –TCP infers loss on wireless links as congestion and backs off –Add link-layer retransmission and explicit loss notification (to squelch RTO) TCP-friendly rate control –Multimedia applications do not work well over TCP’s sawtooth –Derive smooth, stable equilibrium rate via equations based on loss rate TCP Vegas –TCP increases rate until loss –Avoid losses by backing off sending rate when delays increase

36 TL: Advanced topics (continued) ATM –TCP uses implicit information to fix sender’s rate –Explicitly signal rate from network elements ECN –TCP uses packet loss as means for congestion control –Add bit in IP header to signal congestion (hybrid between TCP approach and ATM approach) Active queue management –Congestion signal the result of congestion not a signal of imminent congestion –Actively detect and signal congestion beforehand