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

Similar documents
Chapter III: Transport Layer

Chapter 3 Transport Layer

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

Chapter 3 Transport Layer

CSC 4900 Computer Networks: TCP

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

Chapter 3 Transport Layer

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

Chapter 3- parte B outline

Computer Networking Introduction

Mid Term Exam Results

Chapter III: Transport Layer

CSC 8560 Computer Networks: TCP

CSC 401 Data and Computer Communications Networks

Chapter 3 Transport Layer

CNT 6885 Network Review on Transport Layer

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

Lecture 15: Transport Layer Congestion Control

rdt3.0: channels with errors and loss

CSCI Topics: Internet Programming Fall 2008

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

CC451 Computer Networks

Chapter 3 Transport Layer

Lecture 8. TCP/IP Transport Layer (2)

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

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

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

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

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

LECTURE 3 - TRANSPORT LAYER

Principles of congestion control

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

Computer Networking: A Top Down Approach

Chapter 3 Transport Layer

Chapter 3 Transport Layer

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

Detecting half-open connections. Observed TCP problems

CSCI Topics: Internet Programming Fall 2008

Application. Transport. Network. Link. Physical

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

CSC 401 Data and Computer Communications Networks

Chapter 3 Transport Layer

Transport Layer. CMPS 4750/6750: Computer Networks

Lecture 12: Transport Layer TCP again

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

Chapter 3 Transport Layer

TCP congestion control:

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

10 minutes survey (anonymous)

Computer Networking Introduction

Chapter 3 Transport Layer

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

internet technologies and standards

internet technologies and standards

CSCD 330 Network Programming Winter 2015

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

Chapter 3: Transport Layer

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

Chapter 3: Transport Layer

CS321: Computer Networks Congestion Control in TCP

Pipelined protocols: overview

The Transport Layer Congestion control in TCP

Chapter 3 outline. 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management

Chapter III: Transport Layer

NT1210 Introduction to Networking. Unit 10

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Chapter 3: Transport Layer

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

Transport Layer. Chapter 3. Computer Networking: A Top Down Approach

Chapter 3 Transport Layer

Chapter 3 Transport Layer

Master Course Computer Networks IN2097

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Chapter 3 Transport Layer

Chapter 3: Transport Layer

Chapter 3 Transport Layer

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

TCP conges+on control

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

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

TCP (Part 2) Session 10 INST 346 Technologies, Infrastructure and Architecture

Chapter 3 Transport Layer

Chapter 3 Transport Layer

Chapter 3 Transport Layer

EC441 Fall 2018 Introduction to Computer Networking Chapter 3: Transport Layer

CSE 4/589 Midterm Review. Hengtong Zhang SUNY Buffalo 10/30/2018

CS 4390 Computer Networks. Pointers to Corresponding Section of Textbook

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

Transport Layer Congestion Control

CS3600 SYSTEMS AND NETWORKS

Chapter 3 Transport Layer

T Computer Networks

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

CS4700/CS5700 Fundamentals of Computer Networks

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

Chapter 3 Transport Layer

Part1: Lecture 2! TCP congestion control!

Chapter 3 Transport Layer

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

Transcription:

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

Midterm exam Midterm next Thursday Close book but one-side 8.5"x11" note is allowed (must use hand-writing!) Let me know by next Monday if you have any problem Sample midterm and sample question of Chapter 2&3 2

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 3

Agreeing to establish a connection 2-way handshake: Let s talk ESTAB OK choose x req_conn(x) ESTAB acc_conn(x) ESTAB ESTAB Q: will 2-way handshake always work in network? variable delays retransmitted messages (e.g. req_conn(x)) due to message loss message reordering can t see other side Transport Layer 3-4

Agreeing to establish a connection 2-way handshake failure scenarios: choose x retransmit req_conn(x) req_conn(x) acc_conn(x) ESTAB choose x retransmit req_conn(x) req_conn(x) acc_conn(x) ESTAB ESTAB client terminates req_conn(x) connection x completes server forgets x ESTAB retransmit data(x+1) client terminates data(x+1) connection x completes req_conn(x) accept data(x+1) server forgets x half open connection! (no client!) ESTAB data(x+1) ESTAB accept data(x+1) Transport Layer 3-5

TCP 3-way handshake client state LISTEN SYNSENT ESTAB choose init seq num, x send TCP SYN msg received SYNACK(x) indicates server is live; send ACK for SYNACK; this segment may contain client-to-server data SYNbit=1, Seq=x SYNbit=1, Seq=y ACKbit=1; ACKnum=x+1 ACKbit=1, ACKnum=y+1 choose init seq num, y send TCP SYNACK msg, acking SYN received ACK(y) indicates client is live server state LISTEN SYN RCVD ESTAB Transport Layer 6

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 7

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 8

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 9

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 10

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 11

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 12

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 13

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 14

Throughput: Data rate at the receiver Goodput: Rate at the receiver for data without duplicate! Transport Layer 15

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 16

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 17

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 18

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 19

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 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 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 22

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

After cwnd reaching the threshold Congestion avoidance algorithm: Additive increase multiplicative decrease (AIMD) Transport Layer 3-24

TCP congestion control: AIMD approach: sender increases transmission rate (window size), probing for usable bandwidth, until loss occurs additive increase: increase cwnd by 1 MSS every RTT until loss detected multiplicative decrease: cut cwnd in half after loss AIMD saw tooth behavior: probing for bandwidth cwnd: TCP sender congestion window size additively increase window size. until loss occurs (then cut window in half) time Transport Layer 25

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 26

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 27

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 28

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 29

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 30

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 31

Van Jacobson One of the key designers of TCP congestion control https://www.youtube.com/watch?v=qp4a6l7ceqa 1:40-9:20 32

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 33

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 34

Next class Midterm covers every slide until here. Please read Chapter 4.1-4.2 of your textbook BEFORE Class 35