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

Similar documents
32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length)

Transport Layer: outline

Lecture 8. TCP/IP Transport Layer (2)

Chapter 3- parte B outline

CC451 Computer Networks

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa

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

Transport Layer: Outline

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

CNT 6885 Network Review on Transport Layer

RSC Part III: Transport Layer 3. TCP

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

10 minutes survey (anonymous)

CSE 4213: Computer Networks II

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

CS 4390 Computer Networks. Pointers to Corresponding Section of Textbook

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

Computer Networking Introduction

Chapter III: Transport Layer

Chapter 3 Transport Layer

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

TCP. TCP: Overview. TCP Segment Structure. Maximum Segment Size (MSS) Computer Networks 10/19/2009. CSC 257/457 - Fall

Fall 2012: FCM 708 Bridge Foundation I

Chapter 3 Transport Layer

CS Lecture 1 Review of Basic Protocols

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

Chapter III: Transport Layer

CSC 4900 Computer Networks: TCP

COMP 431 Internet Services & Protocols. Transport Layer Protocols & Services Outline. The Transport Layer Reliable data delivery & flow control in TCP

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

CS450 Introduc0on to Networking Lecture 14 TCP. Phu Phung Feb 13, 2015

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

CSC 401 Data and Computer Communications Networks

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

Chapter 3 Transport Layer

Lecture 5. Transport Layer. Transport Layer 1-1

Chapter 6 Transport Layer

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

Computer Communication Networks Midterm Review

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

CSC 8560 Computer Networks: TCP

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

The Transport Layer: TCP & Reliable Data Transfer

The Transport Layer Reliable data delivery & flow control in TCP. Transport Layer Protocols & Services Outline

The Transport Layer Reliable data delivery & flow control in TCP. Transport Layer Protocols & Services Outline

Chapter 3 Transport Layer

Master Course Computer Networks IN2097

Chapter 3 Transport Layer

CSCD 330 Network Programming

Chapter 3 outline. TDTS06 Computer networks. Principles of Reliable data transfer. Reliable data transfer: getting started

CSCE 463/612 Networks and Distributed Processing Spring 2017

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

Chapter 3 Transport Layer

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

Chapter 3 Transport Layer

TCP : Fundamentals of Computer Networks Bill Nace

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

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

Chapter 3 Transport Layer

Transport Protocols and TCP

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

Flow and Congestion Control (Hosts)

Foundations of Telematics

Application. Transport. Network. Link. Physical

Computer Communication Networks Midterm Review

Distributed Systems. 5. Transport Protocols

Chapter 3 Transport Layer

Distributed Systems. 5. Transport Protocols. Werner Nutt

Lecture 12: Transport Layer TCP again

Transmission Control Protocol

Computer Networking: A Top Down Approach

CS 43: Computer Networks. 18: Transmission Control Protocol October 12-29, 2018

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

LECTURE 3 - TRANSPORT LAYER

Chapter 3 Transport Layer

Chapter 3 Transport Layer

Chapter 3: Transport Layer

Pipelined protocols: overview

Master Course Computer Networks IN2097

CSCD 330 Network Programming Winter 2015

Lecture 3 The Transport Control Protocol (TCP) Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

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

TCP. 1 Administrivia. Tom Kelliher, CS 325. Apr. 2, Announcements. Assignment. Read From Last Time

Computer Networking Introduction

Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

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

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

Mid Term Exam Results

internet technologies and standards

Chapter 3 Transport Layer

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

Chapter 3 Transport Layer

internet technologies and standards

Our goals: understand d principles. behind transport layer protocols in the. Internet: layer services:

Chapter 3 Transport Layer

CSCI Topics: Internet Programming Fall 2008

rdt3.0: channels with errors and loss

The Transport Layer: TCP & Congestion Control

Transcription:

Correcting mistakes Go-back-N: big picture: sender can have up to N unacked packets in pipeline rcvr only sends cumulative acks doesn t ack packet if there s a gap sender has r for oldest unacked packet if r expires, retransmit all unack ed packets Selective Repeat: big pic sender can have up to N unack ed packets in pipeline rcvr sends individual ack for each packet sender maintains r for each unacked packet when r expires, retransmit only unack ed packet GBN in action Transport Layer 3-1 Transport Layer 3-2 Selective repeat in action TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 socket door point-to-point: one sender, one receiver reliable, in-order byte steam: no message boundaries pipelined: TCP congestion and flow control set window size send & receive buffers writes data TCP send buffer segment reads data TCP receive buffer full duplex data: bi-directional data flow in same connection MSS: maximum segment size connection-oriented: handshaking (exchange of control msgs) inits sender, receiver state before data exchange flow controlled: sender will not overwhelm receiver socket door Transport Layer 3-3 Transport Layer 3-4 TCP segment structure URG: urgent data (generally not used) ACK: ACK # valid PSH: push data now (generally not used) RST, SYN, FIN: connection estab (setup, teardown commands) Internet checksum (as in UDP) 32 bits source port # dest port # sequence number acknowledgement number head not U A P R S len used F Receive window checksum Urg data pnter Options (variable length) data (variable length) counting by bytes of data (not segments!) # bytes rcvr willing to accept Transport Layer 3-5 TCP seq. # s and ACKs Seq. # s: byte stream number of first byte in segment s data ACKs: seq # of next byte expected from other side cumulative ACK Q: how receiver handles out-of-order segments A: TCP spec doesn t say, - up to implementor User types C host ACKs receipt of echoed C simple telnet scenario host ACKs receipt of C, echoes back C Transport Layer 3-6 1

RTT (milliseconds) Q: how to set TCP out value? longer than RTT but RTT varies too short: premature out unnecessary retransmissions too long: slow reaction to segment Q: how to estimate RTT? SampleRTT: measured from segment transmission until ACK receipt SampleRTT will vary, want estimated RTT smoother average several recent measurements EstimatedRTT = (1- )*EstimatedRTT + *SampleRTT Exponential weighted moving average influence of past sample decreases exponentially fast typical value: = 0.125 Transport Layer 3-7 Transport Layer 3-8 Example RTT estimation: 350 300 250 200 RTT: gaia.cs.umass.edu to fantasia.eurecom.fr Setting the out EstimatedRTT plus safety margin large variation in EstimatedRTT -> larger safety margin first estimate of how much SampleRTT deviates from EstimatedRTT: DevRTT = (1- )*DevRTT + * SampleRTT-EstimatedRTT 150 100 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 (seconnds) (typically, = 0.25) Then set out interval: TimeoutInterval = EstimatedRTT + 4*DevRTT SampleRTT Estimated RTT Transport Layer 3-9 Transport Layer 3-10 TCP reliable data transfer TCP creates reliable service on top of IP s unreliable service pipelined segments cumulative acks TCP uses single retransmission r retransmissions are triggered by: out events duplicate acks TCP sender events: data rcvd from app: Create segment with seq # seq # is byte-stream number of first data byte in segment start r if not already running (think of r as for oldest unacked segment) out: retransmit segment that caused out restart r Ack rcvd: If acknowledges previously unacked segments update what is known to be acked start r if there are outstanding segments Transport Layer 3-11 Transport Layer 3-12 2

Seq=92 out out Seq=92 out out TCP: retransmission scenarios TCP retransmission scenarios (more) = 100 = 100 lost ACK scenario premature out Transport Layer 3-13 Cumulative ACK scenario Transport Layer 3-14 TCP ACK generation [RFC 1122, RFC 2581] Fast Retransmit Event at Receiver Arrival of in-order segment with expected seq #. All data up to expected seq # already ACKed Arrival of in-order segment with expected seq #. One other segment has ACK pending Arrival of out-of-order segment higher-than-expect seq. #. Gap detected Arrival of segment that partially or completely fills gap TCP Receiver action Delayed ACK. Wait up to 500ms for next segment. If no next segment, send ACK Immediately send single cumulative ACK, ACKing both in-order segments Immediately send duplicate ACK, indicating seq. # of next expected byte Immediate send ACK, provided that segment starts at lower end of gap -out period often relatively long: long delay before resending lost packet detect lost segments via duplicate ACKs. sender often sends many segments back-toback if segment is lost, there will likely be many duplicate ACKs. if sender receives 3 ACKs for the same data, it supposes that segment after ACKed data was lost: fast retransmit: resend segment before r expires Transport Layer 3-15 Transport Layer 3-16 TCP Flow Control receive side of TCP connection has a receive buffer: flow control sender won t overflow receiver s buffer by transmitting too much, too fast app process may be slow at reading from buffer speed-matching service: matching the send rate to the receiving app s drain rate Resending a segment after triple duplicate ACK Transport Layer 3-17 Transport Layer 3-18 3

cwnd: congestion window size d wait d wait TCP Connection Management Three way handshake: TCP Connection Management (cont.) Step 1: client host sends TCP SYN segment to server specifies initial seq # no data Step 2: server host receives SYN, replies with SYNACK segment server allocates buffers specifies server initial seq. # Step 3: client receives SYNACK, replies with ACK segment, which may contain data Closing a connection: client closes socket: clientsocket.close(); Step 1: client end system sends TCP FIN control segment to server Step 2: server receives FIN, replies with ACK. Closes connection, sends FIN. close client server close Transport Layer 3-19 Transport Layer 3-20 TCP Connection Management (cont.) Principles of Congestion Control Step 3: client receives FIN, replies with ACK. Enters d wait - will respond with ACK to received FINs Step 4: server, receives ACK. Connection.. closing client server closing 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) Transport Layer 3-21 Transport Layer 3-22 Approaches towards congestion control Two broad approaches towards congestion control: end-end congestion control: network-assisted congestion control: no explicit feedback from network routers provide feedback to end systems congestion inferred from end-system observed, delay approach taken by TCP TCP congestion control: additive increase, multiplicative decrease approach: increase transmission rate (window size), probing for usable bandwidth, until occurs additive increase: increase cwnd by 1 MSS every RTT until detected multiplicative decrease: cut cwnd in half after saw tooth behavior: probing for bandwidth 24 Kbytes 16 Kbytes 8 Kbytes congestion window Transport Layer 3-23 Transport Layer 3-24 4

RTT TCP Congestion Control: details TCP Slow Start sender limits transmission: LastByteSent-LastByteAcked cwnd roughly, rate = cwnd RTT Bytes/sec cwnd is dynamic, function of perceived network congestion How does sender discover congestion? event = out or 3 duplicate acks TCP sender reduces rate (cwnd) after event when connection begins, increase rate exponentially until first event: initially cwnd = 1 MSS double cwnd every RTT done by incrementing cwnd for every ACK received Transport Layer 3-25 Transport Layer 3-26 Refinement: inferring after 3 dup ACKs: cwnd is cut in half window then grows linearly but after out event: cwnd 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 out indicates a more alarming congestion scenario Transport Layer 3-27 5