Outline. TCP connection setup/data transfer. 15-441 Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics



Similar documents
TCP in Wireless Mobile Networks

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

La couche transport dans l'internet (la suite TCP/IP)

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

TCP Flow Control. TCP Receiver Window. Sliding Window. Computer Networks. Lecture 30: Flow Control, Reliable Delivery

Transport Layer Protocols

Computer Networks. Chapter 5 Transport Protocols

Mobile Communications Chapter 9: Mobile Transport Layer

TCP and Wireless Networks Classical Approaches Optimizations TCP for 2.5G/3G Systems. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

La couche transport dans l'internet (la suite TCP/IP)

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation

Simulation-Based Comparisons of Solutions for TCP Packet Reordering in Wireless Network

TCP over Wireless Networks

TCP for Wireless Networks

Lecture Objectives. Lecture 07 Mobile Networks: TCP in Wireless Networks. Agenda. TCP Flow Control. Flow Control Can Limit Throughput (1)

Transport Layer. Chapter 3.4. Think about

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

Chapter 6 Congestion Control and Resource Allocation

Visualizations and Correlations in Troubleshooting

Congestion Control Review Computer Networking. Resource Management Approaches. Traffic and Resource Management. What is congestion control?

Optimization of Communication Systems Lecture 6: Internet TCP Congestion Control

Transport Layer and Data Center TCP

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

This sequence diagram was generated with EventStudio System Designer (

Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:

TCP/IP Over Lossy Links - TCP SACK without Congestion Control

TCP/IP Optimization for Wide Area Storage Networks. Dr. Joseph L White Juniper Networks

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

[Prof. Rupesh G Vaishnav] Page 1

TCP, Active Queue Management and QoS

Transport layer protocols for ad hoc networks

17: Queue Management. Queuing. Mark Handley

Low-rate TCP-targeted Denial of Service Attack Defense

First Midterm for ECE374 03/24/11 Solution!!

Transport layer issues in ad hoc wireless networks Dmitrij Lagutin,

Chapter 5. Transport layer protocols

Application Level Congestion Control Enhancements in High BDP Networks. Anupama Sundaresan

A Congestion Control Algorithm for Data Center Area Communications

Lecture 8 Performance Measurements and Metrics. Performance Metrics. Outline. Performance Metrics. Performance Metrics Performance Measurements

TCP Westwood for Wireless

2 TCP-like Design. Answer

TCP in Wireless Networks

International Journal of Scientific & Engineering Research, Volume 6, Issue 7, July ISSN

Data Networks Summer 2007 Homework #3

Protagonist International Journal of Management And Technology (PIJMT) Online ISSN Vol 2 No 3 (May-2015) Active Queue Management

1. The subnet must prevent additional packets from entering the congested region until those already present can be processed.

Computer Networks - CS132/EECS148 - Spring

Allocating Network Bandwidth to Match Business Priorities

SJBIT, Bangalore, KARNATAKA

15-441: Computer Networks Homework 2 Solution

TCP Adaptation for MPI on Long-and-Fat Networks

Research of TCP ssthresh Dynamical Adjustment Algorithm Based on Available Bandwidth in Mixed Networks

How To Write A Transport Layer Protocol For Wireless Networks

Parallel TCP Data Transfers: A Practical Model and its Application

TCP Performance Management for Dummies

A Passive Method for Estimating End-to-End TCP Packet Loss

CS268 Exam Solutions. 1) End-to-End (20 pts)

A Survey: High Speed TCP Variants in Wireless Networks

Computer Networks UDP and TCP

Network Intrusion Detection Systems. Beyond packet filtering

Secure SCTP against DoS Attacks in Wireless Internet

Solving complex performance problems in TCP/IP and SNA environments.

Improving Effective WAN Throughput for Large Data Flows By Peter Sevcik and Rebecca Wetzel November 2008

An enhanced TCP mechanism Fast-TCP in IP networks with wireless links

TCP PACKET CONTROL FOR WIRELESS NETWORKS

CS551 End-to-End Internet Packet Dynamics [Paxson99b]

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

Active Queue Management (AQM) based Internet Congestion Control

Final for ECE374 05/06/13 Solution!!

MODBUS MESSAGING ON TCP/IP IMPLEMENTATION GUIDE V1.0b CONTENTS

A packet-reordering solution to wireless losses in transmission control protocol

On the Evolution of End-to-end Congestion Control in the Internet: An Idiosyncratic View

QoS Parameters. Quality of Service in the Internet. Traffic Shaping: Congestion Control. Keeping the QoS

THE UNIVERSITY OF AUCKLAND

Multipath TCP in Practice (Work in Progress) Mark Handley Damon Wischik Costin Raiciu Alan Ford

Networking part 3: the transport layer

An Improved TCP Congestion Control Algorithm for Wireless Networks

QoS issues in Voice over IP

SELECTIVE-TCP FOR WIRED/WIRELESS NETWORKS

Pig Laboratory. Additional documentation for the laboratory. Exercises and Rules. Tstat Data

CSE331: Introduction to Networks and Security. Lecture 9 Fall 2006

Mobile Computing/ Mobile Networks

ECSE-6600: Internet Protocols Exam 2

Stop And Wait. ACK received; transmit frame 2 CS 455 3

Architecture and Performance of the Internet

A Transport Protocol for Multimedia Wireless Sensor Networks

Advanced Computer Networks Project 2: File Transfer Application

Per-Flow Queuing Allot's Approach to Bandwidth Management

APPENDIX 1 USER LEVEL IMPLEMENTATION OF PPATPAN IN LINUX SYSTEM

First Midterm for ECE374 02/25/15 Solution!!

Improving our Evaluation of Transport Protocols. Sally Floyd Hamilton Institute July 29, 2005

Distributed Systems 3. Network Quality of Service (QoS)

A Study on TCP Performance over Mobile Ad Hoc Networks

Transcription:

Outline 15-441 Computer Networking Lecture 8 TCP & Congestion Control TCP connection setup/data transfer TCP Reliability Congestion sources and collapse Congestion control basics Lecture 8: 09-23-2002 2 Connection Establishment A and B must agree on initial sequence number selection Use 3-way handshake Sequence Number Selection Why not simply chose 0? Must avoid overlap with earlier incarnation Security issues A B SYN + Seq A SYN+ACK-A + Seq B ACK-B Lecture 8: 09-23-2002 3 Lecture 8: 09-23-2002 4 1

Connection Setup Connection Tear-down SYN RCVD Send FIN passive OPEN create TCB rcv SYN snd SYN ACK rcv ACK of SYN D LISTEN rcv SYN snd ACK ESTAB delete TCB SEND snd SYN Rcv SYN, ACK Snd ACK delete TCB active OPEN create TCB Snd SYN SYN SENT Normal termination Allow unilateral close TCP must continue to receive data even after closing Cannot close connection immediately What if a new connection restarts and uses same sequence number? Lecture 8: 09-23-2002 5 Lecture 8: 09-23-2002 6 Tear-down Packet Exchange Connection Tear-down Sender FIN FIN-ACK FIN Receiver Data write Data ack send FIN FIN WAIT-1 FIN WAIT-2 ESTAB send FIN rcv FIN snd ACK rcv FIN+ACK snd ACK CLOSING rcv FIN send ACK WAIT snd FIN LAST-ACK rcv ACK of FIN rcv ACK of FIN FIN-ACK rcv FIN snd ACK TIME WAIT Timeout=2msl delete TCB D Lecture 8: 09-23-2002 7 Lecture 8: 09-23-2002 8 2

Detecting Half-open Connections Outline TCP A TCP B TCP connection setup/data transfer 1. (CRASH) 2. D 3. SYN-SENT <SEQ=400><CTL=SYN> 4. (!!) <SEQ=300><ACK=100><CTL=ACK> 5. SYN-SENT <SEQ=100><CTL=RST> 6. SYN-SENT 7. SYN-SENT <SEQ=400><CTL=SYN> (send 300, receive 100) ESTABLISHED (??) ESTABLISHED (Abort!!) D TCP Reliability Congestion sources and collapse Congestion control basics Lecture 8: 09-23-2002 9 Lecture 8: 09-23-2002 10 Reliability Challenges Congestion related losses Variable packet delays What should the timeout be? Reordering of packets Ensure sequences numbers are not reused How long do packets live? MSL = 120 seconds based on IP behavior 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. Reason??? Error control is based on byte sequences, not packets. Retransmitted packet can be different from the original lost packet Why? Lecture 8: 09-23-2002 11 Lecture 8: 09-23-2002 12 3

Round-trip Time Estimation Wait at least one RTT before retransmitting Importance of accurate RTT estimators: Low RTT unneeded retransmissions High RTT poor throughput RTT estimator must adapt to change in RTT But not too fast, or too slow! Spurious timeouts Conservation of packets principle never more than a window worth of packets in flight Initial Round-trip Estimator Round trip times exponentially averaged: New RTT = α (old RTT) + (1 - α) (new sample) Recommended value for α: 0.8-0.9 0.875 for most TCP s Retransmit timer set to β RTT, where β = 2 Every time timer expires, RTO exponentially backed-off Like Ethernet Not good at preventing spurious timeouts Why? Lecture 8: 09-23-2002 13 Lecture 8: 09-23-2002 14 Jacobson s Retransmission Timeout Retransmission Ambiguity Key observation: At high loads round trip variance is high Solution: Base RTO on RTT and standard deviation rttvar = χ * dev + (1- χ)rttvar Dev = linear deviation Inappropriately named actually smoothed linear deviation Sample RTT A B Original transmission RTO ACK X retransmission Sample RTT A B Original transmission RTO ACK retransmission Lecture 8: 09-23-2002 15 Lecture 8: 09-23-2002 16 4

Karn s RTT 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 Timestamp Extension Used to improve timeout mechanism by more accurate measurement of RTT When sending a packet, insert current timestamp into option 4 bytes for timestamp, 4 bytes for echo Receiver echoes timestamp in ACK Actually will echo whatever is in timestamp Removes retransmission ambiguity Can get RTT sample on any packet Lecture 8: 09-23-2002 17 Lecture 8: 09-23-2002 18 Timer Granularity Outline Many TCP implementations set RTO in multiples of 200,500,1000ms Why? Avoid spurious timeouts RTTs can vary quickly due to cross traffic Make timers interrupts efficient What happens for the first couple of packets? Pick a very conservative value (seconds) TCP connection setup/data transfer TCP Reliability Congestion sources and collapse Congestion control basics Lecture 8: 09-23-2002 19 Lecture 8: 09-23-2002 20 5

Congestion Causes & Costs of Congestion 10 Mbps 1.5 Mbps Four senders multihop paths Timeout/retransmit Q: What happens as rate increases? 100 Mbps Different sources compete for resources inside network Why is it a problem? Sources are unaware of current state of resource Sources are unaware of each other Manifestations: Lost packets (buffer overflow at routers) Long delays (queuing in router buffers) In many situations will result in < 1.5 Mbps of throughput for the above topology (congestion collapse) Lecture 8: 09-23-2002 21 Lecture 8: 09-23-2002 22 Causes & Costs of Congestion Congestion Collapse When packet dropped, any upstream transmission capacity used for that packet was wasted! Definition: Increase in network load results in decrease of useful work done Many possible causes Spurious retransmissions of packets still in flight Classical congestion collapse How can this happen with packet conservation Solution: better timers and TCP congestion control Undelivered packets Packets consume resources and are dropped elsewhere in network Solution: congestion control for ALL traffic Lecture 8: 09-23-2002 23 Lecture 8: 09-23-2002 24 6

Other Congestion Collapse Causes Congestion Control and Avoidance Fragments Mismatch of transmission and retransmission units Solutions Make network drop all fragments of a packet (early packet discard in ATM) Do path MTU discovery Control traffic Large percentage of traffic is for control Headers, routing messages, DNS, etc. Stale or unwanted packets Packets that are delayed on long queues Push data that is never used A mechanism which: Uses network resources efficiently Preserves fair network resource allocation Prevents or avoids collapse Congestion collapse is not just a theory Has been frequently observed in many networks Lecture 8: 09-23-2002 25 Lecture 8: 09-23-2002 26 Approaches Towards Congestion Control Two broad approaches towards congestion control: End-end congestion control: No explicit feedback from network Congestion inferred from end-system observed loss, delay Approach taken by TCP Network-assisted congestion control: Routers provide feedback to end systems Single bit indicating congestion (SNA, DECbit, TCP/IP ECN, ATM) Explicit rate sender should send at Problem: makes routers complicated Example: TCP Congestion Control Very simple mechanisms in network FIFO scheduling with shared buffer pool Feedback through packet drops TCP interprets packet drops as signs of congestion and slows down This is an assumption: packet drops are not a sign of congestion in all networks E.g. wireless networks Periodically probes the network to check whether more bandwidth has become available. Lecture 8: 09-23-2002 27 Lecture 8: 09-23-2002 28 7

Outline Objectives TCP connection setup/data transfer TCP Reliability Congestion sources and collapse Simple router behavior Distributedness Efficiency: X = Σx i (t) Fairness: (Σx i ) 2 /n(σx i2 ) Convergence: control system must be stable Congestion control basics Lecture 8: 09-23-2002 29 Lecture 8: 09-23-2002 30 Basic Control Model Linear Control Reduce speed when congestion is perceived How is congestion signaled? Either mark or drop packets How much to reduce? Increase speed otherwise Probe for available bandwidth how? Many different possibilities for reaction to congestion and probing Examine simple linear controls Window(t + 1) = a + b Window(t) Different a i /b i for increase and a d /b d for decrease Supports various reaction to signals Increase/decrease additively Increased/decrease multiplicatively Which of the four combinations is optimal? Lecture 8: 09-23-2002 31 Lecture 8: 09-23-2002 32 8

Phase Plots Phase Plots Simple way to visualize behavior of competing connections over time What are desirable properties? What if flows are not equal? Overload Optimal point Underutilization Lecture 8: 09-23-2002 33 Lecture 8: 09-23-2002 34 Additive Increase/Decrease Muliplicative Increase/Decrease Both X 1 and X 2 increase/ decrease by the same amount over time Additive increase improves fairness and additive decrease reduces fairness T 0 T 1 Both X 1 and X 2 increase by the same factor over time Extension from origin constant fairness T 0 T 1 Lecture 8: 09-23-2002 35 Lecture 8: 09-23-2002 36 9

Convergence to Efficiency Distributed Convergence to Efficiency a=0 b=1 x H x H Lecture 8: 09-23-2002 37 Lecture 8: 09-23-2002 38 Convergence to Fairness Convergence to Efficiency & Fairness x H x H x H x H Lecture 8: 09-23-2002 39 Lecture 8: 09-23-2002 40 10

What is the Right Choice? Next Lecture Constraints limit us to AIMD Can have multiplicative term in increase AIMD moves towards optimal point x 0 x x 2 2 x 1 TCP Congestion Control TCP Loss Recovery TCP Modeling Lecture 8: 09-23-2002 41 Lecture 8: 09-23-2002 42 11