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

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

CNT 6885 Network Review on Transport Layer

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

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

Transport Layer: outline

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

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

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

CSE 4213: Computer Networks II

Chapter 3- parte B outline

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

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

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

Transport Layer: Outline

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

Application. Transport. Network. Link. Physical

Lecture 8. TCP/IP Transport Layer (2)

Chapter 6 Transport Layer

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

Fall 2012: FCM 708 Bridge Foundation I

Computer Communication Networks Midterm Review

RSC Part III: Transport Layer 3. TCP

CC451 Computer Networks

Computer Networking Introduction

Internet and Intranet Protocols and Applications

Lecture 5. Transport Layer. Transport Layer 1-1

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

10 minutes survey (anonymous)

CS Lecture 1 Review of Basic Protocols

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

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

The Transport Layer: TCP & Reliable Data Transfer

Chapter 3 Transport Layer

Chapter 3 Transport Layer

Transport protocols. Transport Layer 3-1

Chapter III: Transport Layer

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

Chapter 3 Transport Layer

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

CS 4390 Computer Networks. Pointers to Corresponding Section of Textbook

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

Different Layers Lecture 20

Chapter III: Transport Layer

CSC 401 Data and Computer Communications Networks

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

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

Computer Networking: A Top Down Approach

CSCD 330 Network Programming

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

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

CSC 8560 Computer Networks: TCP

CSCE 463/612 Networks and Distributed Processing Spring 2017

TCP : Fundamentals of Computer Networks Bill Nace

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Chapter 3 Transport Layer

CSC 4900 Computer Networks: TCP

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

Master Course Computer Networks IN2097

Chapter 3 Transport Layer

UNIT IV -- TRANSPORT LAYER

Computer Communication Networks Midterm Review

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

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

TCP Review. Carey Williamson Department of Computer Science University of Calgary Winter 2018

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

Computer Networks & Security 2016/2017

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

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

CSCD 330 Network Programming Winter 2015

Foundations of Telematics

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

Transport Protocols and TCP

Lecture 3: The Transport Layer: UDP and TCP

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

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

Different Layers Lecture 21

Transport Protocols. Raj Jain. Washington University in St. Louis

LECTURE 3 - TRANSPORT LAYER

Transmission Control Protocol

Chapter 3 Transport Layer

CE693 Advanced Computer Networks

Computer Networking Introduction

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

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

CSCI Topics: Internet Programming Fall 2008

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

Chapter 3: Transport Layer

Chapter 3 Transport Layer

Chapter 3: Transport Layer

TSIN02 - Internetworking

Transport Layer. <protocol, local-addr,local-port,foreign-addr,foreign-port> ϒ Client uses ephemeral ports /10 Joseph Cordina 2005

Protocoles et Interconnexions

Detecting half-open connections. Observed TCP problems

Distributed Systems. 5. Transport Protocols

NT1210 Introduction to Networking. Unit 10

Distributed Systems. 5. Transport Protocols. Werner Nutt

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

TSIN02 - Internetworking

Announcements Computer Networking. What was hard. Midterm. Lecture 16 Transport Protocols. Avg: 62 Med: 67 STD: 13.

Transcription:

Transport layer Review principles: Reliable data transfer Flow control Congestion control Instantiation in the Internet UDP TCP 1 UDP: User Datagram Protocol [RFC 768] No frills, bare bones Internet transport protocol Best effort service, UDP segments may be: Lost Delivered out of order to application Connectionless: No handshaking between UDP sender, receiver Each UDP segment handled independently of others Why is there a UDP? No connection establishment (which can add delay) Simple: no connection state at sender, receiver Small segment header No congestion control: UDP can blast away as fast as desired 2 1

UDP: More Often used for streaming multimedia apps Length, in Loss tolerant bytes of UDP segment, Rate sensitive including Other UDP uses (why?): header DNS SNMP Reliable transfer over UDP: add reliability at application layer Application-specific error recover! 32 bits source port # dest port # length Application data (message) checksum UDP segment format 3 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 Point-to-point: One sender, one receiver Reliable, in-order byte stream: No message boundaries Pipelined: TCP congestion and flow control set window size 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 4 2

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 UA P len used R S F rcvr window size checksum ptr urgent data Options (variable length) application data (variable length) counting by bytes of data (not segments!) # bytes rcvr willing to accept 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 Host A Host B Seq=42, ACK=79, data = C Seq=79, ACK=43, data = C Seq=43, ACK=80 simple telnet scenario host ACKs receipt of C, echoes back C time 6 3

TCP: Retransmission scenarios Host A Host B Host A Host B Seq=92, 8 bytes data Seq=92, 8 bytes data timeout X loss ACK=100 Seq=92, 8 bytes data Seq=92 timeout Seq=100 timeout Seq=100, 20 bytes data ACK=100 ACK=120 Seq=92, 8 bytes data ACK=100 ACK=120 time lost ACK scenario time premature timeout, cumulative ACKs 7 TCP Flow Control flow control sender won t overrun receiver s buffers by transmitting too much, too fast Receiver: explicitly informs sender of (dynamically changing) amount of free buffer space rcvr window size field in TCP segment receiver buffering Sender: amount of transmitted, unacked data less than most recently-receiver rcvr window size 8 4

TCP Round-trip Time (RTT) and Timeout estimation Wait at least one RTT before retransmitting Importance of accurate RTT estimators: Low RTT unneeded retransmissions High RTT poor throughput RTT estimator must adapt to change in RTT But not too fast, or too slow! Spurious timeouts Conservation of packets principle more than a window worth of packets in flight 9 TCP connection management Recall: TCP sender, receiver establish connection before exchanging data segments Initialize TCP variables: Seq. #s Buffers, flow control info (e.g. RcvWindow) Client: connection initiator Server: contacted by client 10 5

TCP connection management (2) Three way handshake: Step 1: Client end system sends TCP SYN control segment to server Specifies initial seq # Specifies initial window # Step 2: Server end system receives SYN, replies with SYNACK control segment ACKs received SYN Allocates buffers Specifies server receiver initial seq. # Specifies initial window # Step 3: Client system receives SYNACK 11 TCP connection management (3) Closing a connection: Client closes socket: clientsocket.close(); close client FIN server Step 1: Client end system sends TCP FIN control segment to server Step 2: Server receives FIN, replies with ACK. Closes connection, sends FIN. ACK FIN close 12 6

TCP connection management (4) Step 3: Client receives FIN, replies with ACK. Enters timed wait will respond with ACK to received FINs Step 4: Server, receives ACK. Connection closed. closing client FIN ACK FIN server closing Note: With small modification, this can handle simultaneous FINs. timed wait ACK closed closed 13 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) 14 7

Congestion 10 Mbps 1.5 Mbps 100 Mbps Different sources compete for resources inside network Why is it a problem? Sources are unaware of current state of resource Sources are unaware of each other In many situations will result in < 1.5 Mbps of throughput (congestion collapse) 15 Congestion collapse Definition: Increase in network load results in decrease of useful work done Many possible causes Spurious retransmissions of packets still in flight Classical congestion collapse How can this happen with packet conservation Solution: better timers and TCP congestion control Undelivered packets Packets consume resources and are dropped elsewhere in network Solution: congestion control for ALL traffic 16 8

TCP congestion control probing for usable bandwidth: Ideally: transmit as fast as possible (Congwin as large as possible) without loss Increase Congwin until loss (congestion) Loss: decrease Congwin, then begin probing (increasing) again Two phases Slow start Congestion avoidance Important variables: Congwin threshold: defines threshold between two slow start phase, congestion control phase 17 TCP slowstart Exponential increase (per RTT) in window size (not so slow!) Loss event: timeout (Tahoe TCP) and/or or three duplicate ACKs (Reno TCP) RTT Host A Host B one segment two segments Slowstart algorithm initialize: Congwin = 1 for (each segment ACKed) Congwin++ until (loss event OR CongWin > threshold) four segments time 18 9

TCP congestion avoidance Congestion avoidance /* slowstart is over */ /* Congwin > threshold */ Until (loss event) { every w segments ACKed: Congwin++ } threshold = Congwin/2 Congwin = 1 1 perform slowstart 1: TCP Reno skips slowstart (fast recovery) after three duplicate ACKs 19 Return to slow start If packet is lost we lose self clocking Need to implement slow-start and congestion avoidance together When timeout occurs set ssthresh to 0.5w If cwnd < ssthresh, use slow start Else use congestion avoidance 20 10

Summary Reviewed principles of transport layer: Reliable data transfer Flow control Congestion control (Multiplexing) Instantiation in the Internet UDP TCP 21 11