RSC Part III: Transport Layer 3. TCP

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

Chapter 3 Transport Layer

Transport Layer: outline

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

Chapter 3 Transport Layer

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

Chapter 3 Transport Layer

CSE 4213: Computer Networks II

CS 4390 Computer Networks. Pointers to Corresponding Section of Textbook

Chapter 3 Transport Layer

Transport Layer: Outline

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

10 minutes survey (anonymous)

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

CSCI Topics: Internet Programming Fall 2008

Chapter III: Transport Layer

Chapter 3 Transport Layer

Computer Networking Introduction

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

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

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

The Transport Layer: TCP & Reliable Data Transfer

TCP : Fundamentals of Computer Networks Bill Nace

CSCE 463/612 Networks and Distributed Processing Spring 2017

CSC 401 Data and Computer Communications Networks

Chapter 3 Transport Layer

CC451 Computer Networks

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

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

Lecture 5. Transport Layer. Transport Layer 1-1

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

Chapter 3 Transport Layer

Lecture 8. TCP/IP Transport Layer (2)

CSC 4900 Computer Networks: TCP

CNT 6885 Network Review on Transport Layer

CSCD 330 Network Programming

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

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 6 Transport Layer

Chapter 3- parte B outline

CS Lecture 1 Review of Basic Protocols

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

Chapter III: Transport Layer

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

Chapter 3 Transport Layer

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

Lecture 11: Transport Layer Reliable Data Transfer and TCP

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

Chapter 3 Transport Layer

Computer Networks & Security 2016/2017

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

Application. Transport. Network. Link. Physical

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

Lecture 12: Transport Layer TCP again

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

Master Course Computer Networks IN2097

Computer Communication Networks Midterm Review

Transmission Control Protocol

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

Distributed Systems. 5. Transport Protocols

Distributed Systems. 5. Transport Protocols. Werner Nutt

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

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

Chapter 3 Transport Layer

Chapter 3 Transport Layer

Foundations of Telematics

Chapter 3 Transport Layer

Chapter 3: Transport Layer

NWEN 243. Networked Applications. Layer 4 TCP and UDP

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

CSC 8560 Computer Networks: TCP

Linux Networking: tcp. TCP context and interfaces

Fall 2012: FCM 708 Bridge Foundation I

Transmission Control Protocol (TCP)

Computer Networking: A Top Down Approach

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

CS 3516: Advanced Computer Networks

Chapter 3 outline. Chapter 3: Transport Layer. Transport vs. network layer. Transport services and protocols. Internet transport-layer protocols

Chapter 3 Transport Layer

Reliable Transport : Fundamentals of Computer Networks Bill Nace

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

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

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Transport layer. Position of transport layer. Transport layer.

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

Protocoles et Interconnexions

internet technologies and standards

Master Course Computer Networks IN2097

Sliding Window Protocols, Connection Management, and TCP Reliability

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

CC451 Computer Networks

Chapter 3 Transport Layer

Chapter 3 Transport Layer

Computer Communication Networks Midterm Review

Different Layers Lecture 20

rdt3.0: channels with errors and loss

CSC 401 Data and Computer Communications Networks

Transcription:

RSC Part III: Transport Layer 3. TCP Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are, mainly, part of the companion slides to the book Computer Networking: A Top Down Approach generously made available by their authors (see copyright below). The slides have been adapted, where required, to the teaching needs of the subject above. All material copyright 1996-2009 J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009. Network Layer II-1 RSC Part III: Transport Layer III. 1 Basic Transport layer concepts Transport layer Principles Transport layer Services Multiplexing and Demultiplexing III.2 UDP UDP Segment format UDP cheksum III.3 TCP TCP connection TCP Segment, sequence and ack numbers RTT Estimation and Timeout Reliable Data Transfer Flow Control TCP connection Management TCP Congestion Control Network Layer II-2 1

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 application writes data TCP send buffer segment application reads data TCP receive buffer socket door full duplex data: bi-directional data flow in same connection MSS: maximum segment size connection-oriented: handshaking (exchange of control msgs) init s sender, receiver state before data exchange flow controlled: sender will not overwhelm receiver Transport Layer 3-3 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 # head len sequence number acknowledgement number not used U A P R checksum S F Receive window Urg data pnter Options (variable length) application data (variable length) counting by bytes of data (not segments!) # bytes rcvr willing to accept Transport Layer 3-4 2

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-5 TCP reliable data transfer TCP creates rdt 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 Initially consider simplified TCP sender: ignore duplicate acks ignore flow control, congestion control Transport Layer 3-6 3

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) expiration interval: TimeOutInterval 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-7 NextSeqNum = InitialSeqNum = InitialSeqNum loop (forever) { switch(event) event: data received from application above create TCP segment with sequence number NextSeqNum if (r currently not running) start r pass segment to IP NextSeqNum = NextSeqNum + length(data) event: r out retransmit not-yet-acknowledged segment with smallest sequence number start r event: ACK received, with ACK field value of y if (y > ) { = y if (there are currently not-yet-acknowledged segments) start r } } /* end of loop forever */ TCP sender (simplified) Comment: -1: last cumulatively ack ed byte Example: -1 = 71; y= 73, so the rcvr wants 73+ ; y >, so that new data is acked Transport Layer 3-8 4

out Seq=92 out out Seq=92 out TCP: retransmission scenarios X loss Sendbase = 100 = 120 = 100 lost ACK scenario = 120 premature out Transport Layer 3-9 TCP retransmission scenarios (more) X loss = 120 Cumulative ACK scenario Transport Layer 3-10 5

TCP ACK generation [RFC 1122, RFC 2581] 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 Transport Layer 3-11 Fast Retransmit Time-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-12 6

out X Figure 3.37 Resending a segment after triple duplicate ACK Transport Layer 3-13 Fast retransmit algorithm: event: ACK received, with ACK field value of y if (y > ) { = y if (there are currently not-yet-acknowledged segments) start r } else { increment count of dup ACKs received for y if (count of dup ACKs received for y = 3) { resend segment with sequence number y } a duplicate ACK for already ACKed segment fast retransmit Transport Layer 3-14 7