- Reliable Stream Transport Service

Slides:



Advertisements
Similar presentations
School of Information Technologies Transmission Control Protocol (TCP) NETS3303/3603 Week 8.
Advertisements

Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 20 – Transport Protocols.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain Chapter 2 TCP/IP Fundamentals.
EE 4272Spring, 2003 Chapter 17 Transport Protocols Connection-Oriented Transport Protocol  Under Reliable Network Service  Design Issues  Under Unreliable.
CSCI 4550/8556 Computer Networks
Transmission Control Protocol (TCP)
NET0183 Networks and Communications Lecture 28 TCP: a transport layer protocol... the story continues... Sagan halda áfram 8/25/20091 NET0183 Networks.
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
Transport Layer3-1 TCP. Transport Layer3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection.
TCP 與 UDP 協定分析 第 22 組 b 陳贊羽 b 馬家驤 b 林怡賢 b 王奕棠.
Winter 2008CS244a Handout #61 CS244a: An Introduction to Computer Networks Handout 6: The Transport Layer, Transmission Control Protocol (TCP), and User.
TCP: Transmission Control Protocol Overview Connection set-up and termination Interactive Bulk transfer Timers Improvements.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
TCP: Reliable Stream Transport
TDC365 Spring 2001John Kristoff - DePaul University1 Internetworking Technologies Transmission Control Protocol (TCP)
COS 420 Day 10. Agenda Assignment 3 Posted Covers chapters Due March Days till Daytona Beach Bike Week Midterm Exam on Feb 27 due Mar 2 Chap.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Autumn 2000John Kristoff1 Transport Layer Computer Networks.
TDC375 Winter 03/04 John Kristoff - DePaul University 1 Network Protocols Transmission Control Protocol (TCP)
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
EE 4272Spring, 2003 Chapter 17 Transport Protocols Connection-Oriented Transport Protocol  Reliable Network Service: Design Issues  Unreliable Network.
Gursharan Singh Tatla Transport Layer 16-May
CSCI 6433 Internet Protocols Class 5 Dave Roberts 1.
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
CS 4396 Computer Networks Lab
3: Transport Layer3b-1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection m MSS: maximum.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
TCP Transport Control Protocol Information management 2 Groep T Leuven – Information department 2/35 Introduction UDP provides the connection.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
University of the Western Cape Chapter 12: The Transport Layer.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Networked & Distributed Systems TCP/IP Transport Layer Protocols UDP and TCP University of Glamorgan.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
1 Introduction to Computer Networks University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
Transport Control Protocol (TCP) Features of TCP, packet loss and retransmission, adaptive retransmission, flow control, three way handshake, congestion.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
1 TCP III - Error Control TCP Error Control. 2 ARQ Error Control Two types of errors: –Lost packets –Damaged packets Most Error Control techniques are.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
ECE 4110 – Internetwork Programming
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
TCP as a Reliable Transport. How things can go wrong… Lost packets Corrupted packets Reordered packets …Malicious packets…
Transport Layer3-1 Transport Layer If you are going through Hell Keep going.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
3. END-TO-END PROTOCOLS (PART 2) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Chapter 3 outline 3.1 Transport-layer services
TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 full duplex data:
Introduction to Networks
Module 1 UDP & TCP.
Transport Layer Unit 5.
COMPUTER NETWORKS CS610 Lecture-36 Hammad Khalid Khan.
5. End-to-end protocols (part 2)
Chapter 17. Transport Protocols
The Transmission Control Protocol (TCP)
TCP III - Error Control TCP Error Control.
Chapter 3 Transport Layer
Presentation transcript:

- Reliable Stream Transport Service TCP (Part 1) - Reliable Stream Transport Service D.E. Comer “Internetworking with TCP/IP: Principles, Protocols and Architectures”, Ch. 13, Prentice Hall, 2000 Presented by Ming Su msu1@sfu.ca

Content TCP Introduction Issue in TCP --- Flow Control Summary Sliding window protocol TCP acknowledgement scheme TCP segment TCP timeout Summary

TCP Introduction

Introduction - TCP TCP Purpose Transmission Control Protocol TCP is not a software Purpose Providing reliable stream delivery Isolating application programs from the details of networking

TCP Conceptual Layering Application Reliable Stream (TCP) User Datagram (UDP) Internet (IP), ICMP Network Interface

Properties of the reliable delivery service Stream Orientation data as a stream of bits, divided into 8-bit octets Virtual Circuit Connection Buffered Transfer transfer more efficiently & minimize network traffic Unstructured Stream Full Duplex Connection Two-way connection Unstructured stream: application must understand stream content and agree on stream format before they initiate a connection.

Issues in TCP

Two issues in TCP Flow Control Virtual Circuit Connection End-to-end flow control problem Congestion control problem Virtual Circuit Connection Congestion: router overload. There is trouble to route.

Flow Control - Sliding window protocol

End-to-end flow control Problem Sender can send more traffic that receiver can handle. (Too fast) Solution variable sliding window protocol each acknowledgement, which specifies how many octets have been received, contains a window advertisement that specifies how many additional octets receiver are prepared to accept. Solution: sliding window protocol. TCP: variable sliding window protocol

Transmitter Window Size Free space in buffer to fill Variable Window Size … … Window Advertisement Receiver Transmitter Transmitter Window Size Value of Window Advertisement Free space in buffer to fill increase bigger decrease smaller Stop transmissions full

Sliding window protocol in TCP TCP allows the window size to vary over time. Window size changes at the time it slides forward. Advantage: it provides flow control as well as reliable transfer.

Flow Control - TCP acknowledgement scheme

Acknowledgements and Retransmission Cumulative acknowledgement scheme is used in TCP. A TCP ACK specifies “the sequence number of the next octet that the receiver expects to receive”. The scheme is called cumulative 渐增的;累加的 because it reports how much of the stream has accumulated. Go-Back-N protocols which retransmit all packets that follow a single erred packet. Selective Retransmission protocols which only retransmit erred packets using ACKs and NAKs (TCP).

Acknowledgements and Retransmission Adv. Easy to generate and unambiguous. The lost ACKs don’t force retransmission. Disadv. No information about all successful transmissions for the sender, but only a single position in the stream. ACK for p position loses, but the sender receive ACK for p+1 position, then sender doesn’t resend p. Disadv.: sends 5 segments, only first one loses. ACK only for 1st . Sender doesn’t know about 2nd to 5th segments successful.

Flow Control - TCP segment

TCP segment format Source Port Destination Port Sequence Number 4 16 24 31 Source Port Destination Port Sequence Number Acknowledge Number HLEN Reserved Code Bits Window Standard MSS = 536 IP datagram standard = 576 This allows 20 bytes for the IP header and the TCP header. HLEN: length of the segment header. The Options field varies in length. Sequence numbers go up to at least 2^{32} Code bits to determine the purpose and contents of the segment. Window: window advertisement. Checksum Urgent Pointer Options (if any) Padding Data …

Flow Control - TCP timeout

Timeout and Retransmission Question How to determine timeout? Is the timeout always a constant? A plot of internet round trip times as measured for 100 successive IP datagrams.

Timeout and Retransmission An adaptive retransmission algorithm is used in TCP. TCP monitors the performance of each connection and adjust its timeout parameter accordingly Timeout value may change. Timeout is adjusted when a new round trip sample ( RTT ) is obtained.

Timeout and Retransmission RTT = (α * Old_RTT) + ((1 – α) * new_RTT_sample ) 0 < α < 1 α close to 1 => no change in a short time α close to 0 => RTT changes too quickly Timeout = β * RTT β >1 Recommended setting, β= 2 Immune:免疫. α , βare constant weighting factor. If β=1, any small delay cause an unnecessary retransmission.

Accurate Measurement of Round Trip Samples TCP acknowledgements are ambiguous. It is caused by the cumulative acknowledgement scheme. It happens when retransmission. It causes the question that the first received ACK does correspond the original datagram or the retransmitted datagram. RTT couldn’t be measured accurately if the above question cannot be answered. How to do? Cumulative ack. Refers to data received, and not to the instance of a specific datagram that carried the data. When time out, after resend, the first received ack corresponds the original or retransmitted datagram?

Accurate Measurement of Round Trip Samples --- Karn’s Algorithm and Timer Backoff Karn’s algorithm: when computing the round trip estimate, ignore samples that correspond to retransmitted segments, but use a back-off strategy, and retain the timeout value from a retransmitted packet for subsequent packets until a valid sample is obtained. Timer back-off strategy: New_timeout = γ * timeout ( typically, γ =2 ) Each time timer expires (retransmit happens), TCP increases timeout value.

Karn’s Algorithm Use RTT to compute Timeout When retransmission happens, Timeout increases in γtimes continuously, until transfer successfully. [Backoff strategy] Use the timeout in the final turn of the last step to send next segment. [Backoff strategy] When an acknowledgement arrives corresponding to a segment that did not require retransmission, then TCP re-computes the RTT and reset the timeout accordingly

Responding to High Variance in Delay Queuing theory: variation in round trip delay is proportional to 1/(1-L), where L is the current network load, 0<L<1 ( Timeout = β * RTT ) & (β=2 ) => L < 30% Not efficient 1989 TCP specification requires to use estimated variance in place of β E ∞ 1/(1-L) E=10 => L=80%; E=4 => L=50%;

New RTT and Timeout Algorithm DIFF = sample – old_RTT Smoothed_RTT = old_RTT + d * DIFF DEV = old_DEV + p (|DIFF| - old_DEV) Timeout = Smoothed_RTT + g * DEV DEV estimated mean deviation d, a fraction between 0 and 1 to control how quickly the new sample affects the weighted average p, a fraction between 0 and 1 to control how quickly the new sample affects mean deviation g, a factor controls how much deviation affects round trip timeout Research suggests: d=1/8, p=1/4 and g=4

Summary Purpose of TCP End-end Flow Control issue Variable Sliding window protocol in TCP TCP acknowledgement scheme TCP segment TCP timeout RTT-Timeout Calculation and Karn’s Algorithm New RTT and Timeout Algorithm

Thanks