TCP and Congestion Control

Similar documents
Transport Layer and Data Center TCP

Transport Layer Protocols

Computer Networks. Chapter 5 Transport Protocols

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

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

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

TCP in Wireless Mobile Networks

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

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

Higher Layer Protocols: UDP, TCP, ATM, MPLS

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

Chapter 5. Transport layer protocols

Computer Networks - CS132/EECS148 - Spring

15-441: Computer Networks Homework 2 Solution

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

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

This sequence diagram was generated with EventStudio System Designer (

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

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

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

[Prof. Rupesh G Vaishnav] Page 1

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

First Midterm for ECE374 03/09/12 Solution!!

Computer Networks. Data Link Layer

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

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

Ethernet. Ethernet. Network Devices

q Connection establishment (if connection-oriented) q Data transfer q Connection release (if conn-oriented) q Addressing the transport user

Computer Networks UDP and TCP

Mobile Communications Chapter 9: Mobile Transport Layer

Chapter 6 Congestion Control and Resource Allocation

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

Networking Overview. (as usual, thanks to Dave Wagner and Vern Paxson)

Advanced Computer Networks Project 2: File Transfer Application

TCP for Wireless Networks

Visualizations and Correlations in Troubleshooting

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

Transport Protocols and Distributed Applications

Transport Layer. Chapter 3.4. Think about

Data Communications & Networks. Session 6 Main Theme Reliable Data Transfer. Dr. Jean-Claude Franchitti

Final for ECE374 05/06/13 Solution!!

TCP Performance Management for Dummies

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

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

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

Transport layer protocols for ad hoc networks

A Transport Protocol for Multimedia Wireless Sensor Networks

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

TCP/IP Networking for Wireless Systems. Integrated Communication Systems Group Ilmenau University of Technology

2 TCP-like Design. Answer

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

Lecture 5: Network Attacks I. Course Admin

Mobile Computing/ Mobile Networks

Data Networks Summer 2007 Homework #3

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

Access Control: Firewalls (1)

Defending Computer Networks Lecture 6: TCP and Scanning. Stuart Staniford Adjunct Professor of Computer Science

TCP Adaptation for MPI on Long-and-Fat Networks

How do I get to

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

TCP in Wireless Networks

IP - The Internet Protocol

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

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

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Lecture Computer Networks

Data Link Layer. Flow Control. Flow Control

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

The Problem with TCP. Overcoming TCP s Drawbacks

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

Computer Networks Practicum 2015

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

Multiple Choice Questions

Homework 3 assignment for ECE374 Posted: 03/13/15 Due: 03/27/15

Congestions and Control Mechanisms n Wired and Wireless Networks

TCP/IP Support Enhancements

CMPE 150 Winter 2009

Low-rate TCP-targeted Denial of Service Attack Defense

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

IP address format: Dotted decimal notation:

High Speed Internet Access Using Satellite-Based DVB Networks

What is a DoS attack?

High-Speed TCP Performance Characterization under Various Operating Systems

A Survey: High Speed TCP Variants in Wireless Networks

Internet Protocols. Background CHAPTER

2.1 Introduction. 2.2 Voice over IP (VoIP)

Exercises TCP/IP Networking. Solution. With Solutions

Effect of Packet-Size over Network Performance

TCP over Wireless Networks

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

The Fundamentals of Intrusion Prevention System Testing

Configuring TCP Intercept (Preventing Denial-of-Service Attacks)

Network Security: Workshop. Dr. Anat Bremler-Barr. Assignment #2 Analyze dump files Solution Taken from

Sample Network Analysis Report

Improved Digital Media Delivery with Telestream HyperLaunch

TFTP TRIVIAL FILE TRANSFER PROTOCOL OVERVIEW OF TFTP, A VERY SIMPLE FILE TRANSFER PROTOCOL FOR SIMPLE AND CONSTRAINED DEVICES

Introduction to TCP/IP

Ina Minei Reuven Cohen. The Technion. Haifa 32000, Israel. Abstract

Architecture and Performance of the Internet

SIP: Session Initiation Protocol

Transcription:

TCP and Congestion Control EECS 122 Valentine s Day, 2006 Transport Layer 1 HW 2: Ethereal Labs Lecture today: Wrap up on reliable data transfer. See how principles are applied to TCP Talk about congestion control. Transport Layer 2 1

Forward Erasure/Error Correction: A Different Approach to RDT Our approach to reliable data delivery is based on ACKs and retransmissions, i.e. feedback. Long RTTs => long delays and/or low throughput An alternative approach is via forward corrections for errors and losses. Transport Layer 3 Error Dectection and Loss Recovery Message to Hong Kong: Hope this will be our last Valentine s Day apart. One extra parity-check word can detect error. It can also recover from a single loss. With more parity-check words, one can recover from multiple losses. Transport Layer 4 2

Example: Fountain Codes Transport Layer 5 TCP Overview Reliable data transfer Flow control Congestion control Transport Layer 6 3

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 socket door point-to-point: one sender, one receiver reliable, in-order byte steam: no message boundaries pipelined: TCP congestion and flow control set window size send & receive buffers application writes data TCP send buffer segment application reads data TCP receive buffer socket door full duplex data: bi-directional data flow in same connection MSS: maximum segment size connection-oriented: handshaking (exchange of control msgs) init s sender, receiver state before data exchange flow controlled: sender will not overwhelm receiver Transport Layer 7 TCP segment structure URG: urgent data (generally not used) ACK: ACK # valid PSH: push data now (generally not used) RST, SYN, FIN: connection estab (setup, teardown commands) Internet checksum (as in UDP) 32 bits source port # dest port # head len sequence number acknowledgement number not used UAP RSF checksum Receive window Urg data pnter Options (variable length) application data (variable length) counting by bytes of data (not segments!) # bytes rcvr willing to accept Transport Layer 8 4

TCP seq. # s and ACKs Seq. # s: byte stream number of first byte in segment s data ACKs: seq # of next byte expected from other side cumulative ACK Full-duplex: ACK s for one direction are piggybacked on data segments in the other direction User types C host ACKs receipt of echoed C Host A Host B Seq=42, ACK=79, data = C Seq=79, ACK=43, data = C Seq=43, ACK=80 simple telnet scenario host ACKs receipt of C, echoes back C time Transport Layer 9 TCP reliable data transfer TCP creates rdt service on top of IP s unreliable service Pipelined segments Cumulative acks TCP uses single retransmission timer Retransmissions are triggered by: timeout events duplicate acks (fast retransmit) TimeOut intervals often doubled after a timeout. Transport Layer 10 5

TCP sender events: data rcvd from app: Create segment with seq # seq # is byte-stream number of first data byte in segment start timer if not already running (think of timer as for oldest unacked segment) expiration interval: TimeOutInterval timeout: retransmit segment that caused timeout restart timer Ack rcvd: If acknowledges previously unacked segments update what is known to be acked start timer if there are outstanding segments Transport Layer 11 TCP= Hybrid Go-Back-N and Selective Repeat Cumulative ACK (like GBN) Out-of-order segments often buffered at receiver and not discarded (but no individual ACK sent) Transport Layer 12 6

TCP Round Trip Time and Timeout Q: how to set TCP timeout value? longer than RTT but RTT varies too short: premature timeout unnecessary retransmissions too long: slow reaction to segment loss Q: how to estimate RTT? SampleRTT: measured time from segment transmission until ACK receipt ignore retransmissions SampleRTT will vary, want estimated RTT smoother average several recent measurements, not just current SampleRTT Transport Layer 13 TCP Round Trip Time and Timeout EstimatedRTT = (1- α)*estimatedrtt + α*samplertt Exponential weighted moving average influence of past sample decreases exponentially fast typical value: α = 0.125 Transport Layer 14 7

Example RTT estimation: RTT: gaia.cs.umass.edu to fantasia.eurecom.fr 350 300 RTT (milliseconds) 250 200 150 100 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 time (seconnds) SampleRTT Estimated RTT Transport Layer 15 TCP Round Trip Time and Timeout Setting the timeout EstimtedRTT plus safety margin large variation in EstimatedRTT -> larger safety margin first estimate of how much SampleRTT deviates from EstimatedRTT: DevRTT = (1-β)*DevRTT + β* SampleRTT-EstimatedRTT (typically, β = 0.25) Then set timeout interval: TimeoutInterval = EstimatedRTT + 4*DevRTT Transport Layer 16 8

Fast Retransmit Time-out period often relatively long: long delay before resending lost packet Detect lost segments via duplicate ACKs. Sender often sends many segments back-toback If segment is lost, there will likely be many duplicate ACKs. If sender receives 3 ACKs for the same data, it supposes that segment after ACKed data was lost: fast retransmit: resend segment before timer expires Transport Layer 17 TCP Flow Control receive side of TCP connection has a receive buffer: flow control sender won t overflow receiver s buffer by transmitting too much, too fast app process may be slow at reading from buffer speed-matching service: matching the send rate to the receiving app s drain rate Transport Layer 18 9

TCP Flow control: how it works (Suppose TCP receiver discards out-of-order segments) spare room in buffer = RcvWindow = RcvBuffer-[LastByteRcvd - LastByteRead] Rcvr advertises spare room by including value of RcvWindow in segments Sender limits unacked data to RcvWindow guarantees receive buffer doesn t overflow Transport Layer 19 10