Transport Layer CS 381 3/7/2017.

Slides:



Advertisements
Similar presentations
Introduction 1 Lecture 14 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Advertisements

School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
Chapter 3 Transport Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 12.
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.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
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 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
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
Introduction 1 Lecture 14 Transport Layer (Congestion Control) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
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 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.
Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
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.
Chapter 3 Transport Layer
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
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!
17-1 Last time □ UDP socket programming ♦ DatagramSocket, DatagramPacket □ TCP ♦ Sequence numbers, ACKs ♦ RTT, DevRTT, timeout calculations ♦ Reliable.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March
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.
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.
These slides are adapted from Kurose and Ross
By N.Gopinath AP/CSE Unit: III Introduction to Transport layer.
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.
1 John Magee 20 February 2014 CS 280: Transport Layer: Congestion Control Concepts, TCP Congestion Control Most slides adapted from Kurose and Ross, Computer.
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.
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 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
-1- Georgia State UniversitySensorweb Research Laboratory CSC4220/6220 Computer Networks Dr. WenZhan Song Professor, Computer Science.
@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:
@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.
CS450 – Introduction to Networking Lecture 19 – Congestion Control (2)
Approaches towards congestion control
Chapter 3 outline 3.1 transport-layer services
Chapter 6 TCP Congestion Control
CS-1652 Jack Lange University of Pittsburgh
Introduction to Networks
COMP 431 Internet Services & Protocols
Chapter 3 outline 3.1 Transport-layer services
Chapter 3-3 TCP Congestion CTL *
TCP.
Flow and Congestion Control
Chapter 6 TCP Congestion Control
CSE 4213: Computer Networks II
October 1st, 2013 CS-1652 Jack Lange University of Pittsburgh
CS 5565 Network Architecture and Protocols
TCP Congestion Control
CS4470 Computer Networking Protocols
TCP Overview.
Chapter 3 outline 3.1 Transport-layer services
CS-1652 Congestion Control Jack Lange University of Pittsburgh
Transport Layer: Congestion Control
Chapter 3 outline 3.1 Transport-layer services
TCP flow and congestion control
Chapter 3 Transport Layer
October 4th, 2011 CS-1652 Jack Lange University of Pittsburgh
Chapter 3 Transport Layer
Presentation transcript:

Transport Layer CS 381 3/7/2017

Chapter 3 outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4 principles of reliable data transfer 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management 3.6 principles of congestion control 3.7 TCP congestion control Transport Layer

Principles of Congestion Control Informally: “too many sources sending too much data too fast for network to handle” Different from flow control! Flow Control: Sender decreases packet transmission to accommodate receiver. Manifestations: Lost packets (buffer overflow at routers) Long delays (queueing in router buffers) a top-10 problem! Transport Layer

Causes/costs of congestion: scenario 1 Two senders, two receivers One router, infinite buffers No errors/retransmissions No flow control No congestion control Both hosts transmitting continuously at the same time unlimited shared output link buffers Host A lin : original data Host B lout Transport Layer

Causes/costs of congestion: scenario 1 Maximum throughput for two senders: R/2 Link can’t deliver packets to receiver at a rate that exceeds R/2 As the sending rate approaches R/2, the average package delay increases (as the number of buffered packets increase). When the sending rate exceeds R/2, packet delay becomes infinite. Transport Layer

Causes/costs of congestion: scenario 1 First cost of a congested network: Large queuing delays are experienced as the packet arrival rate nears the link capacity Why? Processing packet header takes time! Transport Layer

Causes/costs of congestion: scenario 2 Two senders, two receivers one router, finite buffers Packets dropped when arriving to router with full buffer sender retransmission of lost packet Host A lout lin : original data l'in : original data, plus retransmitted data Host B finite shared output link buffers Transport Layer

Causes/costs of congestion: scenario 2 Case 1: Hosts only transmits data when it knows buffer space in the router is free. No packet loss Throughput up to R/2 Sending rate cannot exceed R/2 since packet loss is assumed never to occur Realistic scenario? NO! Why? R/2 lin lout Transport Layer

Causes/costs of congestion: scenario 2 Case 2: Sender retransmits only when a packet is know for certain to be lost. How does the sender know for sure a packet is lost? Performance is decreased as the sender resends lost packets Assume for each 3 packets transmitted, 1 packet is duplicated 33% performance decrease due to packet retransmissions in this case Second cost of a congested network: Sender must retransmit to compensate for lost packets due to router buffer overflow R/2 lin lout R/3 Transport Layer

Causes/costs of congestion: scenario 2 Case 3: Sender times out prematurely, retransmits a dup packet that has been delayed in the router buffer, but not lost Destination receives duplicate data Work done by router to forward duplicate data is wasted Assume each packet has to be forwarded twice by the router Due to large queueing delays 50% performance decrease due to packet retransmissions in this case Third cost of a congested network: Duplicate transmissions from sender due to large delays may cause routers to forward unneeded copies of data Transport Layer

Causes/costs of congestion: scenario 3 Four senders, four receivers Four routers, finite buffers Packets dropped when arriving to router with full buffer Sender retransmission of lost packet Host A lout lin : original data Host B l'in : original data, plus retransmitted data finite shared output link buffers Host D Host C Transport Layer

Causes/costs of congestion: scenario 3 Fourth cost of a congested network: When a packet is dropped along a path, any “upstream” transmission capacity used for that packet is wasted! Transport Layer

Approaches towards congestion control Two broad approaches Network-assisted congestion control: Routers provide feedback to end systems about current buffer state. Two ways: “Choke packet”: Examine sender packet header to obtain IP, notify about state of buffers. Router can update a field in the sender’s packet header that indicates state of buffers. Note: This can take up to 1 RTT. Complexity? Router explicit communication with end host processes Flooding, loss of choke packets, etc. Transport Layer

Approaches towards congestion control two broad approaches End-end congestion control: No explicit feedback from network core Congestion of network “inferred” by the end systems based on packet loss and delay This is the approach taken by TCP Segment loss (3 dup ACK, timeout) indicates congestion TCP adjusts sender’s transmission rate based on congestion Transport Layer

Approaches towards congestion control Two broad approaches Transport Layer

Chapter 3 outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4 principles of reliable data transfer 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management 3.6 principles of congestion control 3.7 TCP congestion control Transport Layer

TCP congestion control: Goal: TCP sender should transmit as fast as possible, but without congesting the network Q: how to find rate just below congestion level? Decentralized approach: each TCP sender sets its own rate, based on implicit feedback ACK: segment received (a good thing!), network not congested increase sending rate Lost segment: assume loss due to congested network decrease sending rate Transport Layer

TCP congestion control: TCP sender rate is dynamic based on current status of the network Questions: How does a TCP sender limit transmission rate? How does a TCP sender perceive network congestion? How does TCP react to network congestion? Transport Layer

TCP congestion control: How does a TCP sender limit transmission rate? Ignoring flow control, a TCP sender keeps track of a variable, congestion window, or cwnd. By adhering to the constraint: LastByteSent – LastByteAcked <= min{cwnd, rwnd} The TCP sender modifies the value of cwnd to adjust the rate at which it sends data into the network. Sending rate: ~cwnd/RTT bps Transport Layer

TCP congestion control: How does a TCP sender perceive network congestion? Excessive congestion in the network causes packets to be dropped or delayed, which creates a “loss” event at the TCP sender TCP considers a loss event as: Timeout for receiving ACK Receiving 3 dup ACKs The TCP sender perceives the above loss events as network congestion and adjusts its transmission rate to accommodate Transport Layer

TCP congestion control: How does a TCP sender react to network congestion? A lost packet implies congestion TCP sender rate should be decreased Successfully ACK’d packets implies that the network is delivering packets to the destination TCP sender rate should be increased Transport Layer

TCP congestion control: bandwidth probing “Probing for bandwidth”: increase transmission rate on receipt of ACK, until eventually loss occurs, then decrease transmission rate Continue to increase on ACK, decrease on loss Since available bandwidth is changing, depending on other connections in network ACKs being received, so increase rate X loss, so decrease rate X X X TCP’s “sawtooth” behavior sending rate X time Q: How fast to increase/decrease? details to follow Transport Layer

TCP Congestion Control: details Sender limits rate by limiting number of unACKed bytes “in pipeline”: Cwnd: differs from rwnd (how, why?) Cwnd set by TCP sender (congestion control window) Rwnd set by TCP receiver (used for flow control) Sender limited by min(cwnd,rwnd) Roughly: Cwnd is dynamic, function of perceived network congestion Sending rate = cwnd RTT bytes/sec Transport Layer

TCP Congestion Control: more details Segment loss event: reducing cwnd Timeout: no response from receiver Set cwnd to 1MSS Aggressive response to congestion Why reduce cwnd to 1? 3 duplicate ACKs: at least some segments getting through (recall fast retransmit) Set cwnd in half, not as aggressive as timeout event Why? Transport Layer

TCP Congestion Control: more details ACK received: increase cwnd Slowstart phase: Increase exponentially fast (despite the name) at connection start, or following timeout Doubles cwnd for each successful ACK, until cwnd reaches predetermined threshold Congestion avoidance: Cwnd increase linearly Generally happens after slowstart phase reaches threshold Transport Layer

TCP Congestion Control: MSS MSS: Maximum Segment Size TCP MSS is calculated by Link Layer frame MTU (maximum transmission unit) – IP header – TCP header. Ethernet typical MTU size: 1500 bytes So, TCP typical MSS size over Ethernet: 1500 – 20 – 20 = 1460 bytes Transport Layer

TCP Slow Start When connection begins, cwnd = 1 MSS (maximum segment size) Ex: MSS = 500 bytes & RTT = 200 msec Initial rate = 20 kbps Available bandwidth may be >> MSS/RTT Desirable to quickly ramp up to respectable rate Increase rate exponentially until first loss event or when threshold reached Double cwnd every RTT Done by increasing cwnd for every ACK received Host A Host B one segment RTT two segments four segments time Transport Layer

TCP: congestion avoidance Due to previous loss events, the TCP sender will probe for bandwidth less aggressively ssthresh: cwnd/2 when loss occurs When cwnd > ssthresh grow cwnd linearly Increase cwnd by 1 MSS (1460 bytes) per RTT Approach possible network congestion slower than in slowstart Transport Layer

TCP: congestion avoidance AIMD: Additive Increase Multiplicative Decrease ACKs: Increase cwnd by 1 MSS per RTT: additive increase loss: Set cwnd to half (non-timeout-detected loss ): multiplicative decrease Remember: The TCP sender responds to all timeout events by reducing cwnd to 1. Transport Layer

TCP congestion control FSM: overview slow start congestion avoidance cwnd > ssthresh loss: timeout loss: timeout loss: timeout new ACK loss: 3dupACK fast recovery loss: 3dupACK Transport Layer

TCP: Fast Recovery TCP Tahoe: Earlier version of TCP TCP Reno: Reaction to loss events Timeout: set ssthresh = cwnd/2, then cwnd to 1 and enter slowstart until cwnd >= ssthresh. Then enter congestion avoidance 3 dup ACK’s: set ssthresh = cwnd/2, then cwnd to 1 and enter slowstart until cwnd >= ssthresh. Then enter congestion avoidance TCP Reno: Timeout: Same as TCP Tahoe 3 dup ACK’s: set cwnd = cwnd/2 = ssthresh and enter congestion avoidance

Versions of TCP TCP Reno cwnd window size (in segments) ssthresh TCP Tahoe Transmission round Transport Layer

Summary: TCP Congestion Control When cwnd < ssthresh, the TCP sender is in slow- start phase, window grows exponentially. When cwnd >= ssthresh, the TCP sender is in congestion-avoidance phase, window grows linearly. When triple duplicate ACK occurs, ssthresh set to cwnd/2, cwnd set to ~ ssthresh When timeout occurs, ssthresh set to cwnd/2, cwnd set to 1 MSS. Transport Layer

Transport layer Protocol Fairness Fairness and UDP Multimedia apps often do not use TCP Does not want rate throttled by congestion control No flow control Instead use UDP: Pump audio/video at constant rate Tolerates packet loss Current research interests for developing congestion-control mechanisms for the Internet that prevent UDP traffic from unfairly transmitting data Transport Layer

Transport layer Protocol Fairness Fairness and parallel TCP connections Nothing prevents app from opening parallel connections between 2 hosts. Web browsers do this Example: link of rate R supporting 9 connections; New app asks for 1 TCP connection, gets rate R/10 New app instead asks for 11 TCP connections, gets R/2 ! Transport Layer

Chapter 3: Summary Principles behind transport layer services: Multiplexing, demultiplexing Reliable data transfer Flow control Congestion control Instantiation and implementation in the Internet UDP TCP Next: Leaving the network “edge” (application, transport layers) Into the network “core” Transport Layer