1 Comnet 2010 Communication Networks Recitation 9 Fairness & TCP Congestion Control.

Slides:



Advertisements
Similar presentations
CS144 Review Session 4 April 25, 2008 Ben Nham
Advertisements

Transportation Layer (2). TCP full duplex data: – bi-directional data flow in same connection – MSS: maximum segment size connection-oriented: – handshaking.
Transport Layer3-1 TCP. Transport Layer3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection.
1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July A note on the use.
Introduction1-1 message segment datagram frame source application transport network link physical HtHt HnHn HlHl M HtHt HnHn M HtHt M M destination application.
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.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 16 Omar Meqdadi Department of Computer Science and Software Engineering University.
1 Transport Layer Lecture 9 Imran Ahmed University of Management & Technology.
CS 471/571 Transport Layer 5 Slides from Kurose and Ross.
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
Transport Layer 3-1 Chapter 3 outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4 principles.
1 TCP Congestion Control. 2 TCP Segment Structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement.
TCP: Transmission Control Protocol Overview Connection set-up and termination Interactive Bulk transfer Timers Improvements.
TCP segment structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number rcvr window size ptr.
TCP Congestion Control Dina Katabi & Sam Madden nms.csail.mit.edu/~dina 6.033, Spring 2014.
EEC-484/584 Computer Networks Lecture 15 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
The Transport Layer. 2 Purpose of this layer Interface end-to-end applications and protocols –Turn best-effort IP into a usable interface Data transfer.
1 Congestion Control Outline Queuing Discipline Reacting to Congestion Avoiding Congestion.
Communication Networks Recitation 12: TCP Rehearsal.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer Transport Layer: TCP. Transport Layer 3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
TCP Congestion Control TCP sources change the sending rate by modifying the window size: Window = min {Advertised window, Congestion Window} In other words,
1 TCP Transport Control Protocol Reliable In-order delivery Flow control Responds to congestion “Nice” Protocol.
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.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
TCP Congestion Control
Introduction 1 Lecture 14 Transport Layer (Congestion Control) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
Courtesy: Nick McKeown, Stanford 1 TCP Congestion Control Tahir Azim.
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.
3: Transport Layer3b-1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection m MSS: maximum.
2: Transport Layer 21 Transport Layer 2. 2: Transport Layer 22 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data.
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.
TCP Transport Control Protocol Information management 2 Groep T Leuven – Information department 2/35 Introduction UDP provides the connection.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
CSE679: Computer Network Review r Review of the uncounted quiz r Computer network review.
What is TCP? Connection-oriented reliable transfer Stream paradigm
Winter 2008CS244a Handout 71 CS244a: An Introduction to Computer Networks Handout 7: Congestion Control Nick McKeown Professor of Electrical Engineering.
Winter 2003CS244a Handout 71 CS492B Project #2 TCP Tutorial # Jin Hyun Ju.
CS 6401 Congestion Control in TCP Outline Overview of RENO TCP Reacting to Congestion SS/AIMD example.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
Transport Layer3-1 Transport Layer If you are going through Hell Keep going.
CIS679: TCP and Multimedia r Review of last lecture r TCP and Multimedia.
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
DMET 602: Networks and Media Lab Amr El Mougy Yasmeen EssamAlaa Tarek.
Other Methods of Dealing with Congestion
09-Transport Layer: TCP Transport Layer.
Chapter 3 outline 3.1 Transport-layer services
DMET 602: Networks and Media Lab
TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 full duplex data:
Chapter 6 TCP Congestion Control
Introduction to Networks
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
TCP.
TCP.
Review: UDP demultiplexing TCP demultiplexing Multiplexing?
IIT Indore (c) Neminath Hubballi
Other Methods of Dealing with Congestion
Other Methods of Dealing with Congestion
Introduction to Computer Networks
Presentation transcript:

1 Comnet 2010 Communication Networks Recitation 9 Fairness & TCP Congestion Control

2 Comnet 2010 Max-Min Fairness The intuition: to maximize the bandwidth allocated to the session with the minimum allocationThe intuition: to maximize the bandwidth allocated to the session with the minimum allocation More formally: to maximize the allocation of each session i under constrain that an increase in i’s allocation doesn’t cause a decrease in some other session allocation with the same or smaller rate than iMore formally: to maximize the allocation of each session i under constrain that an increase in i’s allocation doesn’t cause a decrease in some other session allocation with the same or smaller rate than i

3 Comnet 2010 Example of max-min fair flow Capacity=1 Session 1 Session 2 Session 3 Session 0 Maximal fair flow division will be to give for the sessions 0,1,2 a flow rate of 1/3 and for the session 3 a flow rate of 2/3 Capacity=1

4 Comnet 2010 TCP Overview Connection- orientedConnection- oriented Byte-streamByte-stream –app writes bytes –TCP sends segments –app reads bytes Reliable data transferReliable data transfer Full duplexFull duplex Flow control: keep sender from overrunning receiverFlow control: keep sender from overrunning receiver Congestion control: keep sender from overrunning networkCongestion control: keep sender from overrunning network

5 Comnet 2010 TCP Segment Structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number rcvr window size ptr urgent data checksum F SR PAU head len not used Options (variable length) URG: urgent data (generally not used) PSH: push data now (generally not used) RST, SYN, FIN: connection management (reset, setup teardown commands) # bytes rcvr willing to accept ACK: ACK # valid counting by bytes of data (not segments!) Also in UDP

6 Comnet 2010 Connection Establishment Active participant (client) Passive participant (server) SYN, SequenceNum = x SYN + ACK, SequenceNum = y, ACK, Acknowledgment = y + 1 Acknowledgment = x + 1

7 Comnet 2010 Connection Termination Active participant (server) Passive participant (client) FIN, SequenceNum = x Acknowledgment = y + 1 x + 1 FIN, SequenceNum= y

8 Comnet 2010 Internet Congestion Collapse In the late 80s, the Internet suffered a congestion collapseIn the late 80s, the Internet suffered a congestion collapse Host Congestion! Packet drops!! Data+ Retransmissions More Drops!!! Collapse

9 Comnet 2010 Detecting Congestion Packet drops indicate congestionPacket drops indicate congestion –Is that really true? –Why does it work? Src Dst Packet Ack Drop Timeout! No Ack = Congestion!

10 Comnet 2010 Controlling Congestion – The Effect of Window Size Note that sender’s window is equal to the number of sender packets in flight (in the network).Note that sender’s window is equal to the number of sender packets in flight (in the network). A Window’s worth of packets X acks Window X more packets Source Destination

11 Comnet 2010 Controlling Congestion Reduce window  less packets in the networkReduce window  less packets in the network Increase window  more packets in the networkIncrease window  more packets in the network Idea: Concept of a congestion window – window is smaller when congestion is larger and vice versaIdea: Concept of a congestion window – window is smaller when congestion is larger and vice versa

12 Comnet 2010 Additive Increase, Multiplicative Decrease Each time a packet drop occurs, slash window size in half (multiplicative decrease)Each time a packet drop occurs, slash window size in half (multiplicative decrease) –Multiplicative decrease is necessary to avoid congestion When no losses are observed, gradually increase window size (additive increase)When no losses are observed, gradually increase window size (additive increase)

13 Comnet 2010 Additive Increase D A DDAADDAADA Src Dest

14 Comnet 2010 Leads to the TCP “sawtooth” t Rate halved Timeouts Could take a long time to get started!

15 Comnet 2010 “Slow Start” Designed to cold-start connection quickly at startup or if a connection has been halted (e.g. window dropped to zero, or window full, but ACK is lost). How it works: increase cwnd by 1 for each ACK received. D A DDAADD AA D A Src Dest D A

16 Comnet 2010 Slow Start halved 3 Dupacks Exponential “slow start” t Rate Why is it called slow-start? Because TCP originally had no congestion control mechanism. The source would just start by sending a whole window’s worth of data. Slow start in operation until it reaches half of previous cwnd.

17 Comnet 2010 Fast Retransmit & Recovery Upon 3 duplicate ACKs, TCP retransmits.Upon 3 duplicate ACKs, TCP retransmits. Do not enter slow- start.Do not enter slow- start. Packet 1 Packet 2 Packet 3 Packet 4 Packet 5 Packet 6 Retransmit packet 3 ACK 1 ACK 2 ACK 6 ACK 2 SenderReceiver

18 Comnet 2010 TCP Vegas Uses congestion avoidance instead of congestion controlUses congestion avoidance instead of congestion control –Reno: Congestion control React to congestion after it occurs –Vegas: Congestion avoidance Predict and avoid congestion before it occurs

19 Comnet 2010 Observation Packet accumulation in the network can be inferred by monitoring RTT and sending ratePacket accumulation in the network can be inferred by monitoring RTT and sending rate Bottleneck Link Overloaded Router Sending Rate cwnd Sending Rate = cwnd / RTT

20 Comnet 2010 TCP Vegas Congestion Control BaseRTT is the minimum of all measured RTTs (commonly the RTT of the first packet)BaseRTT is the minimum of all measured RTTs (commonly the RTT of the first packet) If not overflowing the connection, thenIf not overflowing the connection, then ExpectRate = CongestionWindow/BaseRTT Source calculates ActualRate once per RTTSource calculates ActualRate once per RTT Source compares ActualRate with ExpectRateSource compares ActualRate with ExpectRate Diff = ExpectedRate - ActualRate if Diff <  increase CongestionWindow linearly else if Diff >  decrease CongestionWindow linearly else leave CongestionWindow unchanged