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

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

Transport Layer Protocols

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

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

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

Computer Networks. Chapter 5 Transport Protocols

TCP in Wireless Mobile Networks

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

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

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

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

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

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

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

Chapter 6 Congestion Control and Resource Allocation

Chapter 5. Transport layer protocols

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

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

APPENDIX 1 USER LEVEL IMPLEMENTATION OF PPATPAN IN LINUX SYSTEM

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

TCP for Wireless Networks

Transport layer issues in ad hoc wireless networks Dmitrij Lagutin,

Optimization of Communication Systems Lecture 6: Internet TCP Congestion Control

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

TCP over Wireless Networks

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

[Prof. Rupesh G Vaishnav] Page 1

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

This sequence diagram was generated with EventStudio System Designer (

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

THE Internet provides a convenient and cost-effective

Higher Layer Protocols: UDP, TCP, ATM, MPLS

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

Data Link Layer. Flow Control. Flow Control

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

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

Visualizations and Correlations in Troubleshooting

Transport layer protocols for ad hoc networks

0,2 D(0) A(1) D(1) 1,3 D(2) 0,2 D(0) A(1) D(1) 1,3 D(2) D(3) D(3) D(1) D(1) A(4) D(2) 4,6 D(3) A(4) 4,6 GO BACK 3 SELECTIVE REJECT WINDOW SLIDES

Mobile Communications Chapter 9: Mobile Transport Layer

SJBIT, Bangalore, KARNATAKA

DEPARTMENT OF EECS MASSACHUSETTS INSTITUTE OF TECHNOLOGY Spring Quiz III. May 22, 2012

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

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

CMPE 150 Winter 2009

Data Networks Summer 2007 Homework #3

Computer Networks. Data Link Layer

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

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

Computer Networks UDP and TCP

TCP in Wireless Networks

Advanced Computer Networks Project 2: File Transfer Application

Transport Layer and Data Center TCP

A Study on TCP Performance over Mobile Ad Hoc Networks

Final for ECE374 05/06/13 Solution!!

Transport Layer. Chapter 3.4. Think about

Congestions and Control Mechanisms n Wired and Wireless Networks

Low-rate TCP-targeted Denial of Service Attack Defense

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

TCP Adaptation for MPI on Long-and-Fat Networks

A Survey: High Speed TCP Variants in Wireless Networks

TCP Performance Management for Dummies

Access Control: Firewalls (1)

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

TCP/IP Inside the Data Center and Beyond. Dr. Joseph L White, Juniper Networks

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

ECSE-6600: Internet Protocols Exam 2

2 TCP-like Design. Answer

A Transport Protocol for Multimedia Wireless Sensor Networks

Analysis of Congestion Models for TCP Networks

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

Mobile Computing/ Mobile Networks

Computer Networks - CS132/EECS148 - Spring

TCP Westwood for Wireless

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

High Speed Internet Access Using Satellite-Based DVB Networks

Question: 3 When using Application Intelligence, Server Time may be defined as.

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

Lecture Computer Networks

LANs. Local Area Networks. via the Media Access Control (MAC) SubLayer. Networks: Local Area Networks

IP address format: Dotted decimal notation:

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

Mathematical Modelling of Computer Networks: Part II. Module 1: Network Coding

Behavior Analysis of TCP Traffic in Mobile Ad Hoc Network using Reactive Routing Protocols

Ethernet. Ethernet. Network Devices

Parallel TCP Data Transfers: A Practical Model and its Application

Sample Network Analysis Report

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

TCP, Active Queue Management and QoS

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

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

Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine

The present and the future of TCP/IP

A Congestion Control Algorithm for Data Center Area Communications

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

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

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

Multipath TCP under Massive Packet Reordering

TCP PACKET CONTROL FOR WIRELESS NETWORKS

Transcription:

TCP Flow Control Computer Networks The receiver side of a TCP connection maintains a receiver buffer: Lecture : Flow Control, eliable elivery application process may be slow at reading from the buffer Flow control ensures that sender won t overflow receiver s buffer by transmitting too much, too fast liding Window TCP uses sliding window flow control: allows a larger amount of data in flight than has been acknowledged allows sender to get ahead of the receiver but not too far ahead TCP ending process Last byte written TCP eceiving process Last byte read TCP eceiver Window eceiver window size (rwnd) amount that can be sent without acknowledgment receiver can buffer this amount of data eceiver continually advertises buffer space available to sender by including the current value of rwnd in TCP header ender limits unacked data to rwnd guarantees receiver buffer wouldn t overflow Window ize Next byte ACKed (snd_una) Next byte sent (snd_next) Next byte expected Last byte received [exford] ata ACK d Outstanding Un-ack d data ata OK to send ata not OK to send yet [exford]

TCP Header with rwnd s port s port TCP Flow Control Problems Two flow-control problems: receiver too slow (silly-window syndrome) sender s data comes in small amount (Nagle s algorithm) Flags: YN FIN T PH UG ACK equence Number Acknowledgment eq# Checksum U A P F Options (variable) ata window size Urgent pointer [exford] illy-window syndrome: receiver window opens only by a small amount, hence sender can send only a small amount of data at a time Why is this not good? packet header overhead small packets cause more interrupts at busy receiver Host ender (size ) () (5) 5 () 5 () estination Host w = 5 application reads out byte w = application reads out byte w = olution to illy-window yndrome on t advertise window until it opens significantly (> ½*M or ½*rwnd) Implementation alternatives: ACK with rwnd=: sender probes after persistence timer goes off delayed ACK, but delayed not more than 5 ms or ACK every other segment (Why?) persist timer Host ender () () (5) probe 499 () estination Host w = 5 application reads out byte w = w = Characteristics of Interactive Applications User sends only a small amount of data, eg, instant messaging, sends one character at a time Problem: 4-byte header for every byte sent! olution: clumping, sender clumps data together, ie, sender waits for a reasonable amount of time before sending How long is reasonable?

Nagle Algorithm send first segment immediately accumulate data until ACK returns, or up to ½ sender window or ½ M Advantages: bulk transfer is not held up data sent as fast as network can deliver (see next slide) Nagle Algorithm Nagle sends data as fast as network can deliver: round-trip time () ender eceiver ender eceiver Host Host Host Host round-trip time () w without Nagle with Nagle pkts ACKs w accumulated data sent in pkt to w+ to w+ Can be disabled by setsockopt(tcp_noelay) w+ bytes in s w+ bytes in s TCP Error ecovery ender: maintains only one active timer, for snd_una, restarting the timer after retransmission TCP Go-back-N with Buffering eceiver: buffers out-of-order packets cumulative ACKs all packets received in-order eceiver: cumulative ACKs all packets received in-order out-of-order packets repeat the last ACK buffers out-of-order packets error recovery on TCP is actually more complicated because it s tied up with congestion control, but it still relies on retransmission timeout for correctness For illustration only! Actual error recovery tied up with congestion control

etransmission Timeout AQ depends on retransmission to achieve reliability: sender sets a timeout waiting for an ACK etransmission timeout (TO) computed from round-trip time (TT) expects ACK to arrive after an TT but on the Internet, TT of a path varies over time, due to: route changes congestion Varying TT complicates the computation of: retransmission timeout (TO) optimal sender s window size round-trip time () retransmission timeout ()! ender 4 ACKs Pkts eceiver 4 Implications of Bad TO TO too small: unnecessary retransmissions: ender outer A A estination TO too big: lower throughput: ender outer A estination Estimating TT TO must adapt to actual and current TT Estimate the TT by watching returning ACKs compute a smoothed estimate by keeping a running average of the TTs (aka Exponentially Weighted Moving Average (EWMA)) estimated_tt = α * estimated_tt + ( α ) * sample_tt where sample_tt: time between when a segment is transmitted and when its ACK is received α is the weight: α : each sample changes the estimate only a little bit α : each sample influences the estimate heavily α is typically ( ½, which allows for fast implementation ( right shifts)) Example TT Estimation

How to Compute TO? First try: TO = β TT, with β typically set to or Two problems: an ACK acknowledges receipt of data, is not an ACK for transmission: which packet to associate with an ACK in the case of retransmission? TTs spread too wide pdf mean? ender pkt i pkt i ack i = estination pkts with these must be rexmitted samples ACK Ambiguity Which retransmitted packet to associate with an ACK? original packet: retransmitted packet: TO can grow unbounded TO shrinks ender estination ender estination There is a feedback loop between TO computation and TT estimate ACK Ambiguity: Karn s Algorithm Karn s algorithm: adjust TT estimate only from non-retransmitted samples however, ignoring retransmissions could lead to insensitivity to long delays so, back off TO upon retransmission: TO new = γ TO old, γ typically = TT pread Too Wide TT estimate computed using EWMA only considers the mean, doesn t take variance into account pdf pkts with these must be rexmitted = mean Jacobson s algorithm: estimate deviation () of sample_tt new = α old + ( α) sample_tt estimated_tt compute new estimated_tt as usual take the deviation in sample_tt () into account when computing TO TO = estimated_tt + 4 samples

Timers Used in TCP TIME_WAIT: *ML persistence timer TO 4 keep-alive timer: probe the other side if connection has been idle for too long may be turned on/off idle period may be set using setsockopt()