Chapter 3 Transport Layer

Similar documents
Chapter 3 Transport Layer

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

CSC 4900 Computer Networks: TCP

Chapter 3 Transport Layer

Chapter III: Transport Layer

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 10

Mid Term Exam Results

Chapter 3 Transport Layer

Computer Networking Introduction

CSC 8560 Computer Networks: TCP

CSCI Topics: Internet Programming Fall 2008

TCP reliable data transfer. Chapter 3 outline. TCP sender events: TCP sender (simplified) TCP: retransmission scenarios. TCP: retransmission scenarios

CNT 6885 Network Review on Transport Layer

Principles of congestion control

TCP: Overview RFCs: 793,1122,1323, 2018, 2581

Lecture 15: Transport Layer Congestion Control

Chapter 3 Transport Layer

CC451 Computer Networks

Detecting half-open connections. Observed TCP problems

Chapter 3- parte B outline

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

CSCI Topics: Internet Programming Fall 2008

Lecture 11. Transport Layer (cont d) Transport Layer 1

Congestion Control. Principles of Congestion Control. Network-assisted Congestion Control: ATM. Congestion Control. Computer Networks 10/21/2009

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

Lecture 8. TCP/IP Transport Layer (2)

Chapter III: Transport Layer

Congestion Control. Principles of Congestion Control. Network assisted congestion. Asynchronous Transfer Mode. Computer Networks 10/23/2013

rdt3.0: channels with errors and loss

CSC 401 Data and Computer Communications Networks

TCP congestion control:

Application. Transport. Network. Link. Physical

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, Development of reliable protocol Sliding window protocols

Congestion Control. Daniel Zappala. CS 460 Computer Networking Brigham Young University

CSCD 330 Network Programming Winter 2015

CS 43: Computer Networks. 19: TCP Flow and Congestion Control October 31, Nov 2, 2018

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Data Communications & Networks. Session 9 Main Theme Network Congestion Causes, Effects, Controls, and TCP Applications. Dr. Jean-Claude Franchitti

Go-Back-N. Pipelining: increased utilization. Pipelined protocols. GBN: sender extended FSM

Flow and Congestion Control (Hosts)

LECTURE 3 - TRANSPORT LAYER

The Transport Layer Congestion control in TCP

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, steam: r Development of reliable protocol r Sliding window protocols

CS321: Computer Networks Congestion Control in TCP

Computer Networking: A Top Down Approach

Transport Layer Congestion Control

Master Course Computer Networks IN2097

Correcting mistakes. TCP: Overview RFCs: 793, 1122, 1323, 2018, TCP seq. # s and ACKs. GBN in action. TCP segment structure

TCP conges+on control

By Ossi Mokryn, Based also on slides from: the Computer Networking: A Top Down Approach Featuring the Internet by Kurose and Ross

Master Course Computer Networks IN2097

CSCD 330 Network Programming Spring 2018 Lecture 11a Transport Layer

Fall 2012: FCM 708 Bridge Foundation I

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

What is Congestion? Congestion: Moral of the Story. TCP Approach. Transport Layer: TCP Congestion Control & Buffer Management

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

Master Course Computer Networks IN2097

internet technologies and standards

internet technologies and standards

Chapter 3 Transport Layer

Course on Computer Communication and Networks. Lecture 5 Chapter 3; Transport Layer, Part B

Part1: Lecture 2! TCP congestion control!

CSC358 Week 5. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

User Datagram Protocol (UDP) Transmission Control Protocol (TCP)

Good Ideas So Far Computer Networking. Outline. Sequence Numbers (reminder) TCP flow control. Congestion sources and collapse

Flow and Congestion Control Marcos Vieira

The Transport Layer: TCP & Congestion Control

CS3600 SYSTEMS AND NETWORKS

ECE 610: Homework 4 Problems are taken from Kurose and Ross.

Congestion Control in TCP

CS4700/CS5700 Fundamentals of Computer Networks

Congestion Control in TCP

CS 268: Lecture 7 (Beyond TCP Congestion Control)

image 3.8 KB Figure 1.6: Example Web Page

15-744: Computer Networking TCP

T Computer Networks

Department of Computer and IT Engineering University of Kurdistan. Transport Layer. By: Dr. Alireza Abdollahpouri

Chapter 3 Transport Layer

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

CSCE 463/612 Networks and Distributed Processing Spring 2017

3.7 TCP congestion. reliable data transfer. sliding window. Lecture 4: Transport layer III: flow control and congestion control & Network layer I: IP

Chapter 3 Transport Layer

Chapter 3 Transport Layer

TCP Congestion Control

Chapter 3 Transport Layer

Bandwidth Allocation & TCP

Outline Computer Networking. TCP slow start. TCP modeling. TCP details AIMD. Congestion Avoidance. Lecture 18 TCP Performance Peter Steenkiste

Chapter 6 Transport Layer

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

Chapter 3: Transport Layer

CSCI-1680 Transport Layer II Data over TCP Rodrigo Fonseca

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 30, 2018

CS Transport. Outline. Window Flow Control. Window Flow Control

Chapter 3 Transport Layer

Overview. TCP congestion control Computer Networking. TCP modern loss recovery. TCP modeling. TCP Congestion Control AIMD

Transport Protocols and TCP

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Chapter 3 outline. Transport services and protocols

Transport protocols. Transport Layer 3-1

Transcription:

Chapter 3 Transport Layer Part c Congestion Control Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley 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 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 3-2

Principles of congestion control congestion: informally: too many sources sending too much data too fast for network to handle different from flow control! manifestations: lost packets (buffer overflow at routers) long delays (queueing in router buffers) a top-10 problem! Transport Layer 3-3

Causes/costs of congestion: scenario 1 two senders, two receivers one router, infinite buffers output link capacity: R no retransmission original data: λ in Host A unlimited shared output link buffers throughput: λ out Host B R/2 λ out delay λ in R/2 λ in R/2 maximum per-connection throughput: R/2 large delays as arrival rate, λ in, approaches capacity Transport Layer 3-4

Causes/costs of congestion: scenario 2 one router, finite buffers sender retransmission of timed-out packet application-layer input = application-layer output: λ in = λ out transport-layer input includes retransmissions : λ in λ in λ in : original data λ' in : original data, plus retransmitted data λ out Host A Host B finite shared output link buffers Transport Layer 3-5

Causes/costs of congestion: scenario 2 idealization: perfect knowledge sender sends only when router buffers available R/2 λ out λ in R/2 copy λ in : original data λ' in : original data, plus retransmitted data λ out A free buffer space! Host B finite shared output link buffers Transport Layer 3-6

Causes/costs of congestion: scenario 2 Idealization: known loss packets can be lost, dropped at router due to full buffers sender only resends if packet known to be lost copy λ in : original data λ' in : original data, plus retransmitted data λ out A no buffer space! Host B Transport Layer 3-7

Causes/costs of congestion: scenario 2 Idealization: known loss packets can be lost, dropped at router due to full buffers sender only resends if packet known to be lost R/2 λ out λ in R/2 when sending at R/2, some packets are retransmissions but asymptotic goodput is still R/2 (why?) λ in : original data λ' in : original data, plus retransmitted data λ out A free buffer space! Host B Transport Layer 3-8

Causes/costs of congestion: scenario 2 Realistic: duplicates packets can be lost, dropped at router due to full buffers sender times out prematurely, sending two copies, both of which are delivered R/2 λ out λ in R/2 when sending at R/2, some packets are retransmissions including duplicated that are delivered! copy timeout λ in λ' in λ out A free buffer space! Host B Transport Layer 3-9

Causes/costs of congestion: scenario 2 Realistic: duplicates packets can be lost, dropped at router due to full buffers sender times out prematurely, sending two copies, both of which are delivered λ out R/2 λ in R/2 when sending at R/2, some packets are retransmissions including duplicated that are delivered! costs of congestion: more work (retrans) for given goodput unneeded retransmissions: link carries multiple copies of pkt decreasing goodput Transport Layer 3-10

Causes/costs of congestion: scenario 3 four senders multihop paths timeout/retransmit Host A Q: what happens as λ in and λ in increase? A: as red λ in increases, all arriving blue pkts at upper queue are dropped, blue throughput 0 λ in : original data λ' in : original data, plus retransmitted data finite shared output link buffers λ out Host B Host D Host C Transport Layer 3-11

Causes/costs of congestion: scenario 3 C/2 λ out λ in C/2 another cost of congestion: when packet dropped, any upstream transmission capacity used for that packet was wasted! Transport Layer 3-12

Approaches towards congestion control two broad approaches towards congestion control: end-end congestion control: no explicit feedback from network congestion inferred from end-system observed loss, delay approach taken by TCP network-assisted congestion control: routers provide feedback to end systems single bit indicating congestion (SNA, DECbit, TCP/IP ECN, ATM) explicit rate for sender to send at Transport Layer 3-13

Case study: ATM ABR congestion control ABR: available bit rate: elastic service if sender s path underloaded : sender should use available bandwidth if sender s path congested: sender throttled to minimum guaranteed rate RM (resource management) cells: sent by sender, interspersed with data cells bits in RM cell set by switches ( network-assisted ) NI bit: no increase in rate (mild congestion) CI bit: congestion indication RM cells returned to sender by receiver, with bits intact Transport Layer 3-14

Case study: ATM ABR congestion control RM cell data cell two-byte ER (explicit rate) field in RM cell congested switch may lower ER value in cell senders send rate thus max supportable rate on path EFCI bit in data cells: set to 1 in congested switch if data cell preceding RM cell has EFCI set, receiver sets CI bit in returned RM cell Transport Layer 3-15

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 3-16

TCP end-to-end congestion control: goal: TCP sender should transmit as fast as possible, but without congesting network Q: how to find rate just below congestion level? Decentralized, end-to-end: each TCP sender sets its own rate, based on implicit feedback (probing/διερεύνηση): ACK: segment received (a good thing!), network not congested, so increase sending rate lost segment: assume loss due to congested network, so decrease sending rate Transport Layer 3-17

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) [dynamically adapts to network state] sending rate ACKs being received, so increase rate X X X X X loss, so decrease rate TCP s sawtooth behavior time Q: how fast to increase/decrease? What is the (average/useful throughput)? details to follow Transport Layer 3-18

TCP congestion control: additive increase, multiplicative decrease Approach: increase transmission rate (window size), probing for usable bandwidth, until loss occurs additive increase: increase CongWin by 1 MSS every RTT until loss detected multiplicative decrease: cut CongWin in half after loss (or even down to 1) Saw tooth behavior: probing for bandwidth congestion window size 24 Kbytes 16 Kbytes 8 Kbytes congestion window time time Transport Layer 3-19

TCP Congestion Control: details sender limits transmission: LastByteSent-LastByteAcked CongWin Roughly, rate = CongWin RTT Bytes/sec CongWin is dynamic, function of perceived network congestion state cwnd bytes RTT ACK(s) How does sender perceive congestion? loss event = timeout or 3 duplicate acks TCP sender reduces rate (CongWin) after loss event three mechanisms: AIMD slow start (ramp-up fast) Congestion avoidance: conservative after timeout events Transport Layer 3-20

TCP Congestion Control: details sender sequence number space cwnd last byte ACKed last byte sent sender limits transmission: sent, notyet ACKed ( inflight ) LastByteSent- LastByteAcked < cwnd TCP sending rate: roughly: send cwnd bytes, wait RTT for ACKS, then send more bytes rate ~ cwnd RTT bytes/sec cwnd is dynamic, function of perceived network congestion Transport Layer 3-21

TCP Slow Start when connection begins, increase rate exponentially until first loss event: initially cwnd = 1 MSS double cwnd every RTT done by incrementing cwnd for every ACK received summary: initial rate is slow but ramps up exponentially fast Host A RTT Host B time Transport Layer 3-22

TCP: detecting, reacting to loss loss indicated by timeout: cwnd set to 1 MSS; window then grows exponentially (as in slow start) to threshold, then grows linearly loss indicated by 3 duplicate ACKs: TCP RENO dup ACKs indicate network capable of delivering some segments cwnd is cut in half window then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3 duplicate acks) Transport Layer 3-23

TCP: switching from slow start to CA Q: when should the exponential increase switch to linear? A: when cwnd gets to 1/2 of its value before timeout. Implementation: variable ssthresh on loss event, ssthresh is set to 1/2 of cwnd just before loss event Transport Layer 3-24

Refinement: inferring loss After 3 dup ACKs: CongWin is cut in half window then grows linearly But after timeout event: CongWin instead set to 1 MSS; window then grows exponentially to a threshold, then grows linearly Philosophy: 3 dup ACKs indicates network capable of delivering some segments timeout indicates a more alarming congestion scenario Transport Layer 3-25

Refinement (more) Q: When should the exponential increase switch to linear? A: When CongWin gets to 1/2 of its initial value before timeout = threshold CongWin Implementation: Variable Threshold At loss event, Threshold is set to 1/2 of CongWin just before loss event Initial value set, e.g. to a large value, or a portion of RcvWndw value, or RTT http://media.pearsoncmg.com/aw/aw_kurose_ network_4/applets/fairness/index.html Transport Layer 3-26

Popular flavors of TCP cwnd window size (in segments) ssthresh TCP Tahoe TCP Reno ssthresh Transmission round (RTT) Transport Layer 3-27

Summary: TCP Congestion Control When CongWin is below Threshold, sender in slow-start phase, window grows exponentially. When CongWin is above Threshold, sender is in congestionavoidance phase, window grows linearly. When timeout occurs, Threshold set to CongWin/2 and CongWin is set to 1 MSS. When a triple duplicate ACK occurs, Threshold set to CongWin/2 and CongWin set to Threshold. This is commonly referred to as Fast Recovery. Also a Fast Retransmit is executed (retransmits lost packet(s)) without waiting for a timeout event. Transport Layer 3-28

What happens here? Window stopped growing or shrinking!!! No loss or dup-ack event?!!! Anything to do with flow control? Transport Layer 3-29

Transport Layer 3-30

Transport Layer 3-31

TCP sender congestion control Event State TCP Sender Action Commentary ACK receipt for previously unacked data ACK receipt for previously unacked data Loss event detected by triple duplicate ACK Slow Start (SS) Congestion Avoidance (CA) SS or CA CongWin = CongWin + MSS, If (CongWin > Threshold) set state to Congestion Avoidance CongWin = CongWin+MSS * (MSS/CongWin) Threshold = CongWin/2, CongWin = Threshold, Set state to Congestion Avoidance Timeout SS or CA Threshold = CongWin/2, CongWin = 1 MSS, Set state to Slow Start Duplicate ACK SS or CA Increment duplicate ACK count for segment being acked Resulting in a doubling of CongWin every RTT Additive increase, resulting in increase of CongWin by 1 MSS every RTT Fast recovery, implementing multiplicative decrease. CongWin will not drop below 1 MSS. Enter slow start CongWin and Threshold not changed Transport Layer 3-32

Summary: TCP Congestion Control Λ cwnd = 1 MSS ssthresh = 64 KB dupackcount = 0 timeout ssthresh = cwnd/2 cwnd = 1 MSS dupackcount = 0 retransmit missing segment dupackcount == 3 ssthresh= cwnd/2 cwnd = ssthresh + 3 retransmit missing segment duplicate ACK dupackcount++ slow start New ACK! new ACK cwnd = cwnd+mss dupackcount = 0 transmit new segment(s), as allowed cwnd > ssthresh Λ timeout ssthresh = cwnd/2 cwnd = 1 MSS dupackcount = 0 retransmit missing segment timeout ssthresh = cwnd/2 cwnd = 1 dupackcount = 0 retransmit missing segment fast recovery duplicate ACK new ACK cwnd = cwnd + MSS (MSS/cwnd) dupackcount = 0 transmit new segment(s), as allowed cwnd = ssthresh dupackcount = 0 congestion avoidance New ACK! New ACK cwnd = cwnd + MSS transmit new segment(s), as allowed. New ACK! duplicate ACK dupackcount++ dupackcount == 3 ssthresh= cwnd/2 cwnd = ssthresh + 3 retransmit missing segment Transport Layer 3-33

TCP throughput avg. TCP thruput as function of window size, RTT? ignore slow start, assume always data to send W: window size (measured in bytes) where loss occurs avg. window size (# in-flight bytes) is ¾ W avg. thruput is 3/4W per RTT avg TCP thruput = 3 4 W RTT bytes/sec W W/2 Transport Layer 3-34

TCP Futures: TCP over long, fat pipes example: 1500 byte segments, 100ms RTT, want 10 Gbps throughput requires W = 83,333 in-flight segments throughput in terms of segment loss probability, L [Mathis 1997]: TCP throughput = 1.22. MSS RTT L to achieve 10 Gbps throughput, need a loss rate of L = 2 10-10 a very small loss rate! new versions of TCP for high-speed Transport Layer 3-35

TCP Fairness fairness goal: if K TCP sessions share same bottleneck link of bandwidth R, each should have average rate of R/K TCP connection 1 TCP connection 2 bottleneck router capacity R Transport Layer 3-36

Why is TCP fair? two competing sessions: additive increase gives slope of 1, as throughout increases multiplicative decrease decreases throughput proportionally R equal bandwidth share loss: decrease window by factor of 2 congestion avoidance: additive increase loss: decrease window by factor of 2 congestion avoidance: additive increase Connection 1 throughput R Transport Layer 3-37

Fairness (more) Fairness and UDP multimedia apps often do not use TCP do not want rate throttled by congestion control instead use UDP: send audio/video at constant rate, tolerate packet loss Fairness, parallel TCP connections application can open multiple parallel connections between two hosts web browsers do this e.g., link of rate R with 9 existing connections: new app asks for 1 TCP, gets rate R/10 new app asks for 11 TCPs, gets R/2 Transport Layer 3-38

TCP Synchronization If losses are synchronized TCP flows sharing bottleneck receive loss indications at around the same time decrease rates at around the same time periods where link bandwidth significantly underutilized Transport Layer 3-39

Stopping Synchronization Observation: if rate synchronization can be prevented, then bandwidth will be used more efficiently Q: how can the network prevent rate synchronization? Transport Layer 3-40

Chapter 3: summary principles behind transport layer services: multiplexing, demultiplexing reliable data transfer flow control congestion control instantiation, implementation in the Internet UDP TCP next: leaving the network edge (application, transport layers) into the network core Transport Layer 3-41