Transport Protocols and TCP: Review

Similar documents
Transport Protocols & TCP TCP

Transmission Control Protocol (TCP) TCP Services EECS 3214

Transport Protocols and TCP

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols

Chapter 24. Transport-Layer Protocols

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24

UNIT IV -- TRANSPORT LAYER

Lecture 3: The Transport Layer: UDP and TCP

Transport Protocols. ISO Defined Types of Network Service: rate and acceptable rate of signaled failures.

Mobile Transport Layer Lesson 10 Timeout Freezing, Selective Retransmission, Transaction Oriented TCP and Explicit Notification Methods

Outline. CS5984 Mobile Computing

Transport Layer Protocols TCP

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

Computer Networks. Wenzhong Li. Nanjing University

ICS 451: Today's plan. Sliding Window Reliable Transmission Acknowledgements Windows and Bandwidth-Delay Product Retransmission Timers Connections

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

User Datagram Protocol (UDP):

ECE 435 Network Engineering Lecture 10

image 3.8 KB Figure 1.6: Example Web Page

ECE697AA Lecture 3. Today s lecture

User Datagram Protocol

TCP and Congestion Control (Day 1) Yoshifumi Nishida Sony Computer Science Labs, Inc. Today's Lecture

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

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

CS321: Computer Networks Congestion Control in TCP

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

Fall 2012: FCM 708 Bridge Foundation I

05 Transmission Control Protocol (TCP)

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

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

CSCD 330 Network Programming Winter 2015

Sequence Number. Acknowledgment Number. Data

Stream Control Transmission Protocol

Data Link Control Protocols

The Transport Layer: TCP & Reliable Data Transfer

CS 716: Introduction to communication networks th class; 7 th Oct Instructor: Sridhar Iyer IIT Bombay

TCP/IP Protocol Suite 1

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

COMP/ELEC 429/556 Introduction to Computer Networks

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

Fast Retransmit. Problem: coarsegrain. timeouts lead to idle periods Fast retransmit: use duplicate ACKs to trigger retransmission

Problem 7. Problem 8. Problem 9

Networked Systems and Services, Fall 2017 Reliability with TCP

Transport Layer: outline

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

Chapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control

TCP over Wireless PROF. MICHAEL TSAI 2016/6/3

Computer Communication Networks Midterm Review

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

Transmission Control Protocol (TCP)

Introduction to Networks and the Internet

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

TCP Service Model. Today s Lecture. TCP Support for Reliable Delivery. EE 122:TCP, Connection Setup, Reliability

Internet and Intranet Protocols and Applications

What is TCP? Transport Layer Protocol

Intro to LAN/WAN. Transport Layer

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

8. TCP Congestion Control

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

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

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

TCP : Fundamentals of Computer Networks Bill Nace

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 25, 2018

Networked Systems and Services, Fall 2018 Chapter 3

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

Question 1 (6 points) Compare circuit-switching and packet-switching networks based on the following criteria:

IS370 Data Communications and Computer Networks. Chapter 5 : Transport Layer

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

CSCI Topics: Internet Programming Fall 2008

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

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

II. Principles of Computer Communications Network and Transport Layer

cs/ee 143 Communication Networks

TCP/IP Networking. Part 4: Network and Transport Layer Protocols

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

9th Slide Set Computer Networks

TCP: Flow and Error Control

Basic Reliable Transport Protocols

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

CSCE 463/612 Networks and Distributed Processing Spring 2017

Congestion / Flow Control in TCP

Congestion Control in Communication Networks

Chapter 3 Review Questions

Internet Networking recitation #10 TCP New Reno Vs. Reno

Mobile Transport Layer Lesson 02 TCP Data Stream and Data Delivery

TCP/IP Performance ITL

TCP Congestion Control 65KB W

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

ECE 435 Network Engineering Lecture 9

CSE 4213: Computer Networks II

Flow and Congestion Control Marcos Vieira

CSCD 330 Network Programming

Chapter 3 Transport Layer

The aim of this unit is to review the main concepts related to TCP and UDP transport protocols, as well as application protocols. These concepts are

CS 356: Introduction to Computer Networks. Lecture 16: Transmission Control Protocol (TCP) Chap. 5.2, 6.3. Xiaowei Yang

Transport Layer: Outline

Lecture 4: Congestion Control

Transcription:

Transport Protocols and TCP: Review CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 1 19 September 2010 1 Connection Establishment and Termination 2 2 1

Connection Establishment and Termination required by connection-oriented transport protocols like TCP need connection establishment and termination procedures to allow: each end to know the other exists negotiation of optional parameters triggers allocation of transport entity resources 3 3 Connection State Diagram Assume a reliable network (no loss seen at the transport layer). 4 4 2

Connection Establishment Diagram 5 Assume a reliable network (no loss seen at the transport layer). What if either SYN is lost? (discussed later) 5 Connection Termination either or both sides by mutual agreement graceful or abrupt termination ti if graceful, initiator must: send FIN to other end, requesting termination place connection in FIN WAIT state when FIN received, inform user and close connection other end must: when receives FIN must inform TS user and place connection in CLOSE WAIT state when TS user issues CLOSE primitive, send FIN & close connection 6 6 3

Connection Establishment two way handshake A send SYN, B replies with SYN lost SYN handled by re-transmission ignore duplicate SYNs once connected lost or delayed data segments can cause connection problems eg. segment from old connection 7 7 Two Way Handshake: Obsolete Data Segment Solution: starting ti SN is far away from the last SN of the previous connection. Use request of the form SYNi where i +1 is the SN of the first data segment to be sent. 8 8 4

Two Way Handshake: Obsolete SYN Segment 9 9 TCP Three Way Handshake: State Diagram 10 10 5

TCP Three Way Handshake: Examples 11 11 TCP Connection Establishment: Summary three way handshake SYN, SYN-ACK, ACK connection determined by source and destination sockets (host, port) can only have a single connection between any unique pairs of ports but one port can connect to multiple ports 12 6

Connection Termination (2) also need 3-way handshake misordered segments could cause: entity in CLOSE WAIT state sends last data segment, followed by FIN FIN arrives before last data segment receiver accepts FIN, closes connection, loses data need to associate sequence number with FIN receiver waits for all segments before FIN sequence number 13 13 Connection Termination: Graceful Close also have problems with loss of segments and obsolete segments need graceful close which will: send FIN i and receive AN i+1 receive FIN j and send AN j+1 wait twice maximum expected segment lifetime 14 14 7

TCP Flow Control 15 15 Flow Control Fixed sliding window approach works well on reliable networks does not work well on unreliable networks such as IP internet Credit scheme more flexible works for IP used in TCP 16 16 8

Credit Scheme decouples flow control from ACK each octet has sequence number each transport segment has seq number (SN), ack number (AN) and window size (W) in header sends seq number of first octet in segment ACK includes (AN=i, W=j) which means all octets through SN=i-1 acknowledged, want i next permission to send additional window of W=j octets 17 17 Credit Allocation 18 18 9

Sending and Receiving Perspectives 19 19 Retransmission Strategy retransmission of segment needed because segment damaged in transit segment fails to arrive transmitter does not know of failure receiver must acknowledge successful receipt can use cumulative acknowledgement for efficiency sender times out waiting for ACK triggers re-transmission 20 20 10

Retransmit Policy TCP has a queue of segments transmitted but not acknowledged will retransmit if not ACKed in given time first only - single timer, send the front segment when timer expires, efficient, considerable delays batch - single timer, send all segments when timer expires, has unnecessary retransmissions individual - timer for each segment, lower delay, more efficient, but complex effectiveness depends in part on receiver s accept policy 21 Accept Policy segments may arrive out of order in order only accept segments in order discard out of order segments simple implementation, but burdens network in windows accept all segments within receive window reduce transmissions more complex implementation with buffering 22 11

Acknowledgement Policy immediate send empty pyack for each accepted segment simple at cost of extra transmissions cumulative piggyback ACK on suitable outbound data segments unless persist timer expires when send empty ACK more complex but efficient i 23 Duplication Detection if ACK lost, segment duplicated & re-transmitted receiver must recognize duplicates if duplicate received prior to closing connection receiver assumes ACK lost and ACKs duplicate sender must not get confused with multiple ACKs need a sequence number space large enough to not cycle within maximum life of segment 24 24 12

Incorrect Duplicate Detection 25 25 TCP Congestion Control 26 26 13

TCP Congestion Control flow control also used for congestion control recognize increased transit times & dropped packets react by reducing flow of data RFC s 1122 and 2581 detail extensions Tahoe, Reno and New Reno implementations two categories of extensions: retransmission timer management window management 27 27 Retransmission Timer Management static timer likely too long or too short estimate round trip delay by observing pattern of delay for recent segments set time to value a bit greater than estimated RTT simple average over a number of segments exponential average using time series (RFC793) 28 14

Computing RTT Simple average r( K 1) 1 K 1 K 1 i 1 RTT ( i) K 1 r( K 1) r( K) RTT ( K 1) K 1 K 1 Exponential average r( K 1) a r( K) (1 a) RTT ( K 1) 0 a 1 29 29 Use of Exponential Averaging 30 15

Exponential RTO Backoff timeout probably due to congestion dropped packet or long round trip time hence maintaining same RTO is not good idea better to increase RTO each time a segment is re-transmitted RTO = q*rto commonly q = 2 (binary exponential backoff) as in Ethernet CSMA/CD 31 Window Management slow start larger windows cause problem on connection created at start limit TCP to 1 segment increase when data ACK, exponential growth dynamic windows sizing on congestion when a timeout occurs perhaps due to congestion set slow start threshold to half current congestion window set window to 1 and slow start until threshold beyond threshold, increase window by 1 for each RTT 32 16

Summary 33 Assigns a congestion window C w : Initial value of C w = 1 (packet) If trx successful, congestion window doubled. Continues until C max is reached After C w C max, C w = C w + 1 If timeout before ACK, TCP assumes congestion TCP response to congestion is drastic: A random backoff timer disables all transmissions for duration of timer C w is set to 1 C max is set to C max / 2 Congestion window can become quite small for successive packet losses. 33 Window Management 34 17

35 Fast Retransmit, Fast Recovery retransmit timer rather longer than RTT if segment lost TCP slow to retransmit fast retransmit if receive a segment out of order, issue an ACK for the last in-order segment correctly received. Repeat this until the missing segment arrives. if receive 4 ACKs for the same segment then immediately retransmit (without waiting for timer) since it is likely to have been lost. fast recovery lost segment means some congestion halve window then increase linearly avoids slow-start Window Management Examples 36 36 18

Reading Data and Computer Communications by William Stallings, Chapter 20. 37 37 19