Copyright 2008 Kenneth M. Chipps Ph.D. www.chipps.com Controlling Flow Last Update 2008.03.04 1.0.0 1.

Slides:



Advertisements
Similar presentations
1 Transport Protocols & TCP CSE 3213 Fall April 2015.
Advertisements

© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
Transport Layer – TCP (Part2) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Guide to TCP/IP, Third Edition
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Congestion Control Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
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 Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Third Ed.,Peterson.
CSEE W4140 Networking Laboratory Lecture 7: TCP flow control and congestion control Jong Yul Kim
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
CSEE W4140 Networking Laboratory Lecture 7: TCP congestion control Jong Yul Kim
Computer Networks : TCP Congestion Control1 TCP Congestion Control.
Networks : TCP Congestion Control1 TCP Congestion Control.
Networks : TCP Congestion Control1 TCP Congestion Control Presented by Bob Kinicki.
Computer Networks Transport Layer. Topics F Introduction  F Connection Issues F TCP.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
Advanced Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth.
1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
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 : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
26-TCP Dr. John P. Abraham Professor UTPA. TCP  Transmission control protocol, another transport layer protocol.  Reliable delivery  Tcp must compensate.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transport Layer Last Update Copyright Kenneth M. Chipps Ph.D.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
Chapter 12 Transmission Control Protocol (TCP)
Transport Control Protocol (TCP) Features of TCP, packet loss and retransmission, adaptive retransmission, flow control, three way handshake, congestion.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
CSC 311 Chapter Eight FLOW CONTROL TECHNIQUES. CSC 311 Chapter Eight How do we manage the large amount of data on the network? How do we react to a damaged.
2000 년 11 월 20 일 전북대학교 분산처리실험실 TCP Flow Control (nagle’s algorithm) 오 남 호 분산 처리 실험실
Copyright © Lopamudra Roychoudhuri
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.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Lecture 9 – More TCP & Congestion Control
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 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 TCP - Part II. 2 What is Flow/Congestion/Error Control ? Flow Control: Algorithms to prevent that the sender overruns the receiver with information.
Winter 2008CS244a Handout 71 CS244a: An Introduction to Computer Networks Handout 7: Congestion Control Nick McKeown Professor of Electrical Engineering.
ECE 4110 – Internetwork Programming
Data Link Layer Flow and Error Control. Flow Control Flow Control Flow Control Specifies the amount of data can be transmitted by sender before receiving.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Congestion Control 0.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
TCP - Part II.
Fast Retransmit For sliding windows flow control we waited for a timer to expire before beginning retransmission of a packet TCP uses an additional mechanism.
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Chapter 3 outline 3.1 transport-layer services
Chapter 6 TCP Congestion Control
Transport Layer Unit 5.
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
PUSH Flag A notification from the sender to the receiver to pass all the data the receiver has to the receiving application. Some implementations of TCP.
Dr. John P. Abraham Professor UTPA
CS640: Introduction to Computer Networks
Dr. John P. Abraham Professor UTPA
CS4470 Computer Networking Protocols
Transport Layer: Congestion Control
TCP flow and congestion control
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Error Checking continued
Presentation transcript:

Copyright 2008 Kenneth M. Chipps Ph.D. Controlling Flow Last Update

Objectives Learn how data flows are controlled in networks Copyright 2008 Kenneth M. Chipps Ph.D. 2

Flow Control Flow control typically occurs at the transport layer However, there are three methods of flow control seen at the data link layer –X-On/X-Off –Stop and Wait –Sliding Window Copyright 2008 Kenneth M. Chipps Ph.D. 3

X-On/X-Off X-On/X-Off is a simple memory buffer based method The receiving device allows data to be placed into the memory space allocated to the receiving buffer Once this space is full it says stop When space is available in the buffer it says start Copyright 2008 Kenneth M. Chipps Ph.D. 4

Stop and Wait In Stop and Wait it is even more basic The sending NIC sends a frame Once the receiving NIC has processed the frame it issues an ACK The sending frame then sends the next frame And so on This method is real slow Copyright 2008 Kenneth M. Chipps Ph.D. 5

Sliding Window Waiting for an acknowledgement for each packet is not very efficient To improve efficiency a sliding window or burst mode was developed The sliding window acknowledgement method allows multiple packets to be sent without waiting for an acknowledgement for the first to arrive Let’s see what this looks like Copyright 2008 Kenneth M. Chipps Ph.D. 6

Sliding Window Packets sent and acknowledged Current Window Packets sent at one time Packets waiting to be sent Packets sent and acknowledged Current Window Packets sent at one time Packets waiting to be sent 7

Copyright 2008 Kenneth M. Chipps Ph.D. Sliding Window The window slides one group to the right 8

Copyright 2008 Kenneth M. Chipps Ph.D. Sliding Window Packets sent and acknowledgedCurrent Window Packets sent at one time Packets waiting to be sent Packets sent and acknowledgedCurrent Window Packets sent at one time Packets waiting to be sent 9

Copyright 2008 Kenneth M. Chipps Ph.D. Sliding Window In the sliding window method all packets fall into one of three sets –Those to the left of the window that have been sent, received, and acknowledged –Those in the window that are being sent –Those to the right of the window not yet sent The lowest number, the one at the left edge of the window, is the first packet that has yet to be acknowledged 10

Copyright 2008 Kenneth M. Chipps Ph.D. Sliding Window When sending a packet a station includes in the TCP header the current size of its receive window This means that the sender can send that many bytes without stopping and waiting for an ACK 11

Sliding Window Copyright 2008 Kenneth M. Chipps Ph.D. 12

Copyright 2008 Kenneth M. Chipps Ph.D. Flow Control To enhance efficiency further and to prevent overloading a host each acknowledgement of the number of bytes received also contains a window advertisement that specifies how many bytes the receiver is prepared to accept at that point in time Typical values are 8,192 and 24,000 bytes In most cases 8,192 is used 13

Copyright 2008 Kenneth M. Chipps Ph.D. Flow Control Some servers will advertise a window of 24,000 bytes In response to an increased window size advertisement the sender speeds up or increases the size of the window Each time an acknowledgement message is received, the window size is doubled 14

Copyright 2008 Kenneth M. Chipps Ph.D. Flow Control In response to a decreased window size advertisement the sender slows down or decreases the size of the window If packet loss occurs, the sender cuts the window size back to half In case of a total connection collapse, the sender resumes the connection with a small window size 15

Copyright 2008 Kenneth M. Chipps Ph.D. Flow Control Thus the stream is throttled just as a car on the freeway is –During rush hour, it must slow –During the middle of the day, it can speed up 16

Copyright 2008 Kenneth M. Chipps Ph.D. Response to Congestion Since the endpoints cannot account for the congestion that may be encountered outside of their areas of control such as router problems They assume that the packets have been lost or damaged and just resend them Which leads to more and more congestion 17

Copyright 2008 Kenneth M. Chipps Ph.D. Response to Congestion TCP then needs to respond to the ICMP source quench packets that routers send out when congestion occurs They do this through –Multiplicative Decrease This says upon loss of a segment reduce the congestion window by half and For those segments that remain in the window, backoff the retransmission timer exponentially 18

Copyright 2008 Kenneth M. Chipps Ph.D. Response to Congestion –Slow Start This is used to prevent oscillation back and forth It says start with a single segment then increase the window one segment each time an acknowledgment is received –Congestion Avoidance Once the congestion windows reaches one-half of its original size before congestion, TCP then increases the congestion window by 1 only if all segments in the window have been acknowledged 19

Copyright 2008 Kenneth M. Chipps Ph.D. Silly Window Syndrome But too much speed adjustment can produce oscillation in the window size called silly window syndrome A solution for the problem that occurs when the sending and receiving applications operate at greatly different speeds 20

Copyright 2008 Kenneth M. Chipps Ph.D. Silly Window Syndrome This resulted in each acknowledgement advertising a small window and each segment carrying a small amount of data This is solved by the Nagle algorithm 21

Copyright 2008 Kenneth M. Chipps Ph.D. Silly Window Syndrome –On the receiving side Before sending an updated window advertisement after advertising a zero window, wait for space to become available that is either at least 50% of the buffer size or equal to the maximum segment size –On the sending side Do not send data until there is sufficient data to fill a maximum sized segment If still waiting to send when an acknowledgement arrives, send anyway Ignore pushes during this time 22

Copyright 2008 Kenneth M. Chipps Ph.D. Summary of Congestion Control Below is a nice summary of this process from a Network World newsletter by Steve Taylor and Jim Metzler from July 2005 –Last time, we discussed the fact that TCP has a flow control mechanism for each connection –The mechanism is based on a field in the segment header called the "Advertised Window“ –The Advertised Window specifies how many additional bytes of data the receiver can accept 23

Copyright 2008 Kenneth M. Chipps Ph.D. Summary of Congestion Control –The goal of congestion control is to ensure that the sending device does not transmit more data than the network can accommodate –To achieve this goal, the TCP congestion control mechanisms are based on a parameter referred to as the "Congestion Window“ 24

Copyright 2008 Kenneth M. Chipps Ph.D. Summary of Congestion Control –Determining the optimum value for the Congestion Window is somewhat tricky, particularly because network congestion changes over time –In order to ensure smooth end-to-end performance, TCP defines a parameter that is referred to as "Max Window“ –It is helpful to think of Max Window as being an upper limit on the number of bytes that the sender could transmit at any point in time 25

Copyright 2008 Kenneth M. Chipps Ph.D. Summary of Congestion Control –In order to ensure that the sending device does not send more data than the network and the receiving device can accommodate, Max Window is defined to be the lesser of Advertised Window and Congestion Window –However, data is continually being transmitted from the sending device to the receiving device and acknowledged by the receiving device 26

Copyright 2008 Kenneth M. Chipps Ph.D. Summary of Congestion Control –To account for this, TCP defines a parameter called Effective Window –Effective Window is equal to Max Window minus the number of bytes that have been sent, but not acknowledged –The next newsletter will describe some techniques that are used to compute the Congestion Window 27

Copyright 2008 Kenneth M. Chipps Ph.D. Summary of Congestion Control –Last time, we discussed how TCP combines a flow control parameter (Advertised Window) and a congestion control parameter (Congestion Window) to determine how many bytes the sending device can transmit (Effective Window) –We also mentioned that determining the optimum value for the Congestion Window is somewhat tricky because network congestion changes over time 28

Copyright 2008 Kenneth M. Chipps Ph.D. Summary of Congestion Control –TCP has multiple mechanisms to determine Congestion Window and today, we'll describe one of those called Additive Increase/Multiplicative Decrease (AI/MD) –AI/MD is typically used when the sending device is operating close to the available capacity of the network 29

Copyright 2008 Kenneth M. Chipps Ph.D. Summary of Congestion Control –The basic assumption made by AI/MD is that if the sender does not receive an acknowledgement of a sent packet, the packet was dropped by the network due to congestion –Hence, when faced with a timeout, AI/MD assumes there is network congestion and cuts Congestion Window in half –Subsequent timeouts result in additional halving of Congestion Window, which leads to the phrase "Multiplicative Decrease" 30

Copyright 2008 Kenneth M. Chipps Ph.D. Summary of Congestion Control –While AI/MD decreases Congestion Window rapidly, it increases Congestion Window slowly –Every time that the source is successful in sending a Congestion Window's worth of packets, it adds the equivalent of one packet to Congestion Window –Analysis of TCP throughput demonstrates that this slow increase and rapid decrease in Congestion Window results in throughput that resembles a saw tooth 31

Copyright 2008 Kenneth M. Chipps Ph.D. Summary of Congestion Control –This analysis also demonstrates that network throughput can be significantly impacted by packet loss –Future newsletters will examine some of the techniques that are used to overcome the performance limitations of TCP 32

Lab Do lab from eCollege Copyright Kenneth M. Chipps Ph.D. 33