CSEE W4140 Networking Laboratory Lecture 7: TCP flow control and congestion control Jong Yul Kim 03.22.2010.

Slides:



Advertisements
Similar presentations
Different TCP Flavors CSCI 780, Fall TCP Congestion Control Slow-start Congestion Avoidance Congestion Recovery Tahoe, Reno, New-Reno SACK.
Advertisements

3-1 TCP Protocol r point-to-point: m one sender, one receiver r reliable, in-order byte steam: m no “message boundaries” r pipelined: m TCP congestion.
1 TCP Congestion Control. 2 TCP Segment Structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement.
Transport Layer1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r reliable, in-order byte steam: m no “message boundaries” r pipelined: m TCP congestion.
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.
Announcement Homework 2 in tonight –Will be graded and sent back before Th. class Midterm next Tu. in class –Review session next time –Closed book –One.
Chapter 3 Transport Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 12.
Announcement Project 2 finally ready on Tlab Homework 2 due next Mon tonight –Will be graded and sent back before Tu. class Midterm next Th. in class –Review.
Transport Layer 3-1 outline r TCP m segment structure m reliable data transfer m flow control m 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.
Transport Layer3-1 Congestion Control. Transport Layer3-2 Principles of Congestion Control Congestion: r informally: “too many sources sending too much.
Transport Layer 3-1 Outline r TCP m Congestion control m Flow control.
Week 9 TCP9-1 Week 9 TCP 3 outline r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management.
1 Lecture 9: TCP and Congestion Control Slides adapted from: Congestion slides for Computer Networks: A Systems Approach (Peterson and Davis) Chapter 3.
CSEE W4140 Networking Laboratory Lecture 7: TCP congestion control Jong Yul Kim
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.
Data Communication and Networks
Transport Layer Congestion control. Transport Layer 3-2 Approaches towards congestion control End-to-end congestion control: r no explicit feedback.
1 Internet Networking Spring 2004 Tutorial 10 TCP NewReno.
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Networks : TCP Congestion Control1 TCP Congestion Control.
Networks : TCP Congestion Control1 TCP Congestion Control Presented by Bob Kinicki.
EEC-484/584 Computer Networks Lecture 16 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
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.
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.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley Chapter3_3.
Transport Layer3-1 Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles.
Transport Layer1 Flow and Congestion Control Ram Dantu (compiled from various text books)
Principles of Congestion Control Congestion: informally: “too many sources sending too much data too fast for network to handle” different from flow control!
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
17-1 Last time □ UDP socket programming ♦ DatagramSocket, DatagramPacket □ TCP ♦ Sequence numbers, ACKs ♦ RTT, DevRTT, timeout calculations ♦ Reliable.
1 Transport Protocols (continued) Relates to Lab 5. UDP and TCP.
TCP CS 168 Discussion Week 6 Many thanks to past EE 122 GSIs.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March
1 Transport Layer Lecture 10 Imran Ahmed University of Management & Technology.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
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.
Transport Layer 3- Midterm score distribution. Transport Layer 3- TCP congestion control: additive increase, multiplicative decrease Approach: increase.
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.
CS-1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
Advance Computer Networks Lecture#09 & 10 Instructor: Engr. Muhammad Mateen Yaqoob.
TCP. TCP ACK generation [RFC 1122, RFC 2581] Event at Receiver Arrival of in-order segment with expected seq #. All data up to expected seq # already.
EEC-484/584 Computer Networks Lecture 8 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
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.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Congestion Control 0.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
@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.
Transport Layer session 1 TELE3118: Network Technologies Week 11: Transport Layer TCP Some slides have been taken from: r Computer Networking:
Approaches towards congestion control
Transport Layer CS 381 3/7/2017.
Chapter 3 outline 3.1 transport-layer services
The Transport Layer (TCP)
Chapter 6 TCP Congestion Control
COMP 431 Internet Services & Protocols
Chapter 3 outline 3.1 Transport-layer services
Precept 2: TCP Congestion Control Review
TCP.
Flow and Congestion Control
Chapter 6 TCP Congestion Control
CS4470 Computer Networking Protocols
EE 122: Lecture 10 (Congestion Control)
Transport Layer: Congestion Control
Chapter 3 outline 3.1 Transport-layer services
TCP flow and congestion control
Presentation transcript:

CSEE W4140 Networking Laboratory Lecture 7: TCP flow control and congestion control Jong Yul Kim

Short review of TCP from last time  Characteristics of the IP network Delivers packets from host to host May lose packets (discarded by routers) Doesn’t care about packet order  TCP is a reliable, in-order, byte-stream service (delivers data from application to application)

Short review of TCP from last time  TCP is a reliable, in-order, byte-stream service The beauty of TCP is that it works without explicit support from the network Each end of the connection cooperate to make sure packets are delivered reliably and in order  Techniques used by TCP Sequence numbers Acknowledgements (and numbers) Retransmissions Timer

Today’s lecture  TCP Flow Control Throttling the rate of sender so that the receiver’s buffer does not overflow  TCP Congestion Control Throttling the rate of sender in the face of network congestion

TCP Flow Control (Receive Window)  When a connection is established, the receiver allocates a receive buffer.  Incoming packets are stored in the buffer so that the application can read data from the buffer.

TCP Flow Control (Receiver behavior)  The receiver lets the sender know: how much space is left in the buffer = RcvWindow by placing that value in the window size field in every segment that it sends to the sender

TCP Flow Control (Sender behavior)  Sender can fill up the spare room in the receiver’s buffer by sending more data  Sender maintains the size of data that has already been sent but unacknowledged = bytes_unACKed  Makes sure that bytes_unACKed ≤ RcvWindow

Network Congestion  Why does congestion occur? Too many senders sending at high rate Routers dropping packets due to overflowing buffers  What are the symptoms? Packet loss Packet queuing delay More retransmission  more packet loss Link bandwidth wasted on retransmissions

TCP Congestion Control  Remember: TCP has no support from the network about congestions Need to use end-to-end congestion control  TCP relies on perceived network congestion and throttles the sending rate accordingly

How does TCP know there is congestion in the network?  Answer: packet loss Timeout Three duplicate ACKs shown in diagram on right

How does TCP limit sending rate?  Using a variable called congestion window = CongWin  Size of unacknowledged data must be less than CongWin bytes_unACKed ≤ CongWin  Sending rate is roughly CongWin/RTT bytes/sec We can throttle the sending rate by controlling CongWin

TCP Congestion Control Algorithm  Is an algorithm that controls CongWin  Simply stated: Packet loss (=congestion)  decrease CongWin All is well  increase CongWin  Three main parts Additive-Increase, Multiplicative Decrease Slow Start Reaction to timeout events

Additive Increase, Multiplicative Decrease (AIMD)  Additive Increase Increase CongWin by 1 MSS every RTT while there is no packet loss  Multiplicative Decrease Decrease CongWin by half when packet is lost

Additive Increase, Multiplicative Decrease (AIMD) Congestion Avoidance phase

Slow Start (SS)  When connection is established CongWin is set to 1 MSS Increase CongWin by 1 MSS every ACK  Different from Additive Increase (+1 MSS every RTT) Until a loss occurs Result is an exponentially fast growth in sending rate

Slow Start (SS)

Example of Slow Start/Congestion Avoidance Assume that ssthresh = 8 Roundtrip times Cwnd (in segments) ssthresh

Reaction to Timeouts  We already discussed that TCP perceives congestion through packet loss  Packet is considered lost when: Timeout occurs Three duplicate ACKs are received  But timeouts and three duplicate ACKs are different. What do they tell about the severity of congestion?

Reaction to Timeouts  Let’s do something different for timeout. Reset CongWin to 1 MSS Begin again from Slow Start Slow start (exponential increase) until when?  New variable called Threshold Threshold is set to ½ CongWin After Threshold, do AIMD instead of SS

Lab 5 part 2 in the lab manual

Lab 5 part 2 – our version  Use Table 5.3 and Table 5.4 to configure PC1, PC2, Router1, and Router2.  Do parts 5(B), 6(A), 6(C), and 8.  For part 8, configure PC1 and PC2 so that all packets travel along PC1 – R1 – R2 – PC2 path.

Main Points of Lab 5 Parts 5~8  More about TCP Interactive applications over TCP Data transfer applications over TCP Congestion Control

Prelab and lab reports  Prelab 6 is due this Friday.  Lab report 5.1 is due this week before your labs.  Lab report BGP lab is due next week before your labs.