Chapter 24. Transport-Layer Protocols

Similar documents
TCP/IP Protocol Suite 1

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

UNIT IV TRANSPORT LAYER

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

Stream Control Transmission Protocol

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

Transport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol

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

Unit 2.

TSIN02 - Internetworking

TSIN02 - Internetworking

05 Transmission Control Protocol (TCP)

TSIN02 - Internetworking

TSIN02 - Internetworking

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

Transport Protocols & TCP TCP

ECE697AA Lecture 3. Today s lecture

Lecture 3: The Transport Layer: UDP and TCP

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

Transport Protocols and TCP

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

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

CS321: Computer Networks Error and Flow Control in TCP

ECE 435 Network Engineering Lecture 10

UNIT IV TCP, UNICAST AND MULTICAST ROUTING PROTOCOLS

Transport Protocols and TCP: Review

Outline. CS5984 Mobile Computing

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP 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

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

Computer Networks and Data Systems

Networking Technologies and Applications

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols

User Datagram Protocol (UDP):

COMP/ELEC 429/556 Introduction to Computer Networks

TCP: Flow and Error Control

UNIT IV -- TRANSPORT LAYER

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

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

Transport Layer. -UDP (User Datagram Protocol) -TCP (Transport Control Protocol)

Network Protocols. Transmission Control Protocol (TCP) TDC375 Autumn 2009/10 John Kristoff DePaul University 1

8. TCP Congestion Control

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 5 - Part 2

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

User Datagram Protocol

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Outline. History Introduction Packets Association/ Termination Data Transmission concepts Multihoming Streams

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

Process-to-Process Delivery:

TCP/IP. Chapter 5: Transport Layer TCP/IP Protocols

An SCTP-Protocol Data Unit with several chunks

Outline. Connecting to the access network: DHCP and mobile IP, LTE. Transport layer: UDP and TCP

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

Computer Networking Introduction

UNIT V. Computer Networks [10MCA32] 1

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

Transport Layer: Outline

Fall 2012: FCM 708 Bridge Foundation I

CSC 4900 Computer Networks: TCP

C H A P T E R 15 TRA N SM I SSI O N C O N T RO L P RO T O C O L (T C P ) SUM M A RY

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

Outline. User Datagram Protocol (UDP) Transmission Control Protocol (TCP) Transport layer (cont.) Transport layer. Background UDP.

T Computer Networks II. Transport Issues Contents. TCP and UDP. Congestion Prevention. Motivation for Congestion Control

Internet and Intranet Protocols and Applications

Chapter 5 End-to-End Protocols

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

Reliable Transport I: Concepts and TCP Protocol

Chapter 6 Transport Layer

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

Chapter 3- parte B outline

ECE 435 Network Engineering Lecture 9

TCP Basics : Computer Networking. Overview. What s Different From Link Layers? Introduction to TCP. TCP reliability Assigned reading

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

CS4700/CS5700 Fundamentals of Computer Networks

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

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

Sequence Number. Acknowledgment Number. Data

CSC 401 Data and Computer Communications Networks

Functionality Split Computer Networking. Transport Protocols. Overview. Multiplexing & Demultiplexing

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

Intro to LAN/WAN. Transport Layer

Internet Applications and the Application Layer Material from Kurose and Ross, Chapter 2: The Application Layer

Video Streaming with the Stream Control Transmission Protocol (SCTP)

Computer Networks. Wenzhong Li. Nanjing University

Computer Network Programming

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

Introduction to Networks and the Internet

Transport Layer TCP / UDP

Congestion / Flow Control in TCP

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli)

Transport Layer: outline

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

9th Slide Set Computer Networks

NWEN 243. Networked Applications. Layer 4 TCP and UDP

CMPE 150 Winter 2009

Computer Communication Networks Midterm Review

Q23-5 In a network, the size of the receive window is 1 packet. Which of the follow-ing protocols is being used by the network?

Computer Networks. Homework #4: No Grading

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

Transcription:

Chapter 24. Transport-Layer Protocols 23.1 Introduction 23.2 User Datagram Protocol 23.3 Transmission Control Protocol 23.4 SCTP Computer Networks 24-1

Position of Transport-Layer Protocols UDP is an unreliable connectionless transport-layer protocol TCP is a reliable connection-oriented transport-layer protocol SCTP is a new protocol that combines the features of UDP and TCP Computer Networks 24-2

User Datagram Protocol (UDP) The User Datagram Protocol (UDP) is a connectionless, unreliable transport protocol. UDP is a very simple protocol using a minimum of overhead The calculation of checksum and its inclusion in the user datagram are optional Computer Networks 24-3

UDP: Checksum Checksum includes three section: a pseudoheader, the UDP header, and the data from the application layer Computer Networks 24-4

UDP Operation Connectionless services Flow and error control: no control without checksum Encapsulation and decapsulation Queuing Computer Networks 24-5

UDP Applications Features: Connectionless service, Lack of error control and congestion control Typical Applications: Suitable for a process that requires simple request-response communication with little concern for flow and error control Suitable for a process with internal flow and error control mechanisms such as TFTP Suitable for multicasting Used for management processes such as SNMP Used for some route updating protocols such as RIP Computer Networks 24-6

Transmission Control Protocol (TCP) Transmission Control Protocol (TCP) is a connection-oriented, reliable protocol. TCP explicitly defines connection establishment, data transfer, and connection teardown phases to provide a connection-oriented service. TCP uses a combination of GBN and SR protocols to provide reliability. TCP Services: Process-to-process communication Stream delivery service Full-duplex communication Multiplexing and demultiplexing Connection-oriented service Reliable service Computer Networks 24-7

Stream Delivery Service: TCP Unlike UDP, TCP is a stream-oriented protocol Buffering handles the disparity between the speed of the producing and consuming processes One example: to use a circular array of 1-byte locations Computer Networks 24-8

Segments: TCP IP layer needs to send data in packets not as a stream of byte Computer Networks 24-9

TCP Features Numbering system: sequence number and acknowledgment number Byte number: The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number The value in the sequence number field of a segment defines the number of the first data byte contained in that segment The value of the acknowledgment field in a segment defines the number of the next byte a party expects to receive. The acknowledgment number is cumulative Computer Networks 24-10

TCP Segment Format Computer Networks 24-11

TCP Control Field Computer Networks 24-12

Checksum: TCP The use of the checksum in TCP is mandatory Computer Networks 24-13

A TCP Connection: Establishment Connection establishment: Three-way handshaking A SYN segment cannot carry data, but it consumes one sequence number A SYN + ACK segment cannot carry data, but does consume one sequence number An ACK segment, if carrying no data, consumes no sequence number Simultaneous open and SYN flooding attack (denial-of service attack, cookie) Computer Networks 24-14

A TCP Connection: Data Transfer After connection is established, bidirectional data transfer can take place Pushing data and urgent data Computer Networks 24-15

A TCP Connection: Connection Termination Three-way handshaking The FIN segment consumes one sequence number if it does not carry data The FIN + ACK segment consumes one sequence number if it does not carry data Computer Networks 24-16

A TCP Connection: Connection Termination Half-Close Computer Networks 24-17

State Transition Diagram Computer Networks 24-18

States for TCP The state marked ESTABLISHED in the FSM is in fact two different sets of states that the client and server undergo to transfer data Computer Networks 24-19

FSM: Half-Close Scenario Computer Networks 24-20

Time-line Diagram for Common Scenario Computer Networks 24-21

Send Window in TCP Computer Networks 24-22

Receive Window in TCP rwnd = buffer size # of waiting bytes to be pulled Computer Networks 24-23

Flow Control Flow control balances the rate a producer creates data with the rate a consumer can use the data. TCP separates flow control from error control. We discuss flow control, ignoring error control. We assume that the logical channel between the sending and receiving TCP is error-free. Computer Networks 24-24

Opening and Closing Windows Computer Networks 24-25

Shrinking of Windows The receive window cannot shrink. The send window, on the other, can shrink if the receiver defines a value for rwnd that results in shrinking the window The receiver needs to keep the following relationship between the last and new ACK and the last and new rwnd values to prevent shrinking of the send window new ackno + new rwnd last ackno + last rwnd Window shutdown probing to prevent a deadlock Computer Networks 24-26

TCP Sliding Window The size of the window is the lesser of rwnd and cwnd. The source does not have to send a full window s worth of data. The window can be opened or closed by the receiver, but should not be shrunk. The destination can send an acknowledgment at any time as long as it does not result in a shrinking window. The receiver can temporarily shut down the window; the sender, however, can always send a segment of 1 byte after the window is shut down. Silly Window Syndrome Nagle s algorithm for syndrome created by the sender Clark s solution for syndrome created by the receiver (1) zero window announcement, (2) delayed ACK Computer Networks 24-27

Error Control Error detection and correction in TCP is achieved through the use of three simple tools: checksum, acknowledgment, and time-out Checksum: If corrupted, it is discarded and considered as lost Acknowledgment: ACK segments do not consume sequence numbers and are not acknowledged Two types of ACKs for TCP: Cumulative ACK (ACK) and Selective ACK (SACK) Retransmission: In modern implementations, a retransmission occurs if the retransmission timer expires or three duplicate ACK segments have arrived No retransmission timer is set for an ACK segment Retransmission after RTO (Retransmission Time-Out): RTO is updated based on the RTT (Round Trip Time) Retransmission after three duplicate ACK segments Out-of-order segments Data may arrive out of order and be temporarily stored by the receiving TCP, but TCP guarantees that no out-of-order segment is delivered to the process Computer Networks 24-28

Simplified FSM for TCP Sender Side Computer Networks 24-29

Simplified FSM for TCP Receiver Side Computer Networks 24-30

Normal Operation Scenarios Computer Networks 24-31

Lost Segment Scenarios Computer Networks 24-32

Fast Retransmission Scenarios Computer Networks 24-33

Lost ACK Scenarios Deadlock created by lost ACK: persistent timer needed Computer Networks 24-34

TCP Congestion Control Receive window, rwnd, is the size of the send window which is controlled by the receiver Congestion window, cwnd, whose size is controlled by the congestion situation in network Actual window size = minimum (rwnd, cwnd) Congestion Detection TCP sender uses the occurrence of two events as a sign of congestion in the network Time-out and three duplicate ACKs Taho TCP (earlier version) treated both events similarly Reno TCP treats these two signs differently Computer Networks 24-35

Slow Start: Exponential Increase In the slow-start algorithm, the size of the congestion window increases exponentially until it reaches a threshold Computer Networks 24-36

Slow Start: Exponential Increase If an ACK arrives, cwnd = cwnd + 1 Start cwnd = 1 2 0 After 1 RTT cwnd = cwnd + 1 = 1 + 1 = 2 2 1 After 2 RTT cwnd = cwnd + 2 = 2 + 2 = 4 2 2 After 3 RTT cwnd = cwnd + 4 = 4 + 4 = 8 2 3 Computer Networks 24-37

Congestion Avoidance: Additive Increase In the congestion-avoidance algorithm, the size of the congestion window increases additively until congestion is detected If an ACK arrives, cwnd = cwnd + (1/cwnd) Start cwnd = i After 1 RTT cwnd = i + 1 After 2 RTT cwnd = i + 2 After 3 RTT cwnd = i + 3 Computer Networks 24-38

Fast Recovery Three duplicated ACKs are interpreted as light congestion Use additive increase like congestion avoidance If a duplicated ACK arrives, cwnd = cwnd + (1/cwnd) Policy Transition When each of these congestion policies is used and when TCP moves from one policy to another? Three versions of TCP: Taho TCP, Reno TCP, and New Reno TCP Computer Networks 24-39

FSM for Taho TCP Computer Networks 24-40

Example 24.9: Taho TCP Computer Networks 24-41

FSM for Reno TCP Computer Networks 24-42

Example 24.10: Reno TCP Computer Networks 24-43

AIMD Additive Increase, Multiplicative Decrease Computer Networks 24-44

TCP Throughput If the cwnd is a constant (flat line) function of RTT, Throughput = cwnd/rtt (unrealistic) If each tooth were exactly the same, Throughput = [(maximum + minimum)/2]/rtt The max is twice the value of the min because in each congestion detection the value of cwnd is set to half of its previous value. Throughput = (0.75) W max /RTT Computer Networks 24-45

TCP Timers Computer Networks 24-46

Example 24.12: Retransmission Timer Computer Networks 24-47

Example 24.13: Karn s Algorithm TCP does not consider the RTT of a retransmitted segment in its calculation of a new RTO Use an exponential backoff strategy if a retransmission occurs Computer Networks 24-48

TCP Timers Persistence Timer: To deal with a zero-window-size advertisement ACK segment announcing nonzero window size is lost: deadlock Set to the value of the retransmission timer up to 60 seconds Keepalive Timer: To prevent a long idle connection between two TCPs Usually after 2 hours, send 10 probes, each of which is 75 seconds apart No response after 10 probes, terminate the connection TIME-WAIT Timer: 2MSL(maximum segment lifetime) during connection termination Common value of MSL is 30 seconds, 1 or 2 minutes Allow TCP to resend the final ACK in case of the ACK is lost Computer Networks 24-49

SCTP Stream Control Transmission Protocol (SCTP) is a new reliable, message-oriented transport layer protocol that combines the best features of UDP and TCP SCTP Services: Process-to-process communication: use all well-known ports in TCP Multiple streams Multihoming Full-duplex communication Connection-oriented service Reliable service Computer Networks 24-50

SCTP Services Multiple streams: An association in SCTP can involve multiple streams Multihoming: SCTP association allows multiple IP addresses for each end Computer Networks 24-51

SCTP Features Transmission sequence number is used to number a data chunk Stream identifier (SI) to distinguish between different streams Stream sequence number to distinguish between different data chunks belong to the same stream Packets: TCP has segments; SCTP has packets In SCTP, control information and data information are carried in separate chunks Computer Networks 24-52

Differences between SCTP and TCP 1. The control information in TCP is part of the header; the control information in SCTP is included in the control chunks 2. The data in a TCP segment treated as one entity; an SCTP packet can carry several data chunks 3. The option section, which can be part of a TCP segment, does not exist in an SCTP packet 4. The mandatory part of the TCP header is 20 bytes, while the general header in SCTP is only 12 bytes 5. The checksum in TCP is 16 bits; in SCTP, it is 32 bits 6. The verification tag in SCTP is an association identifier, which does not exist in TCP 7. TCP includes one sequence number in the header, which defines the number of the first byte in the data section. AN SCTP packet can include several different data chunks 8. Some segments in TCP that carry control information (such as SYN and FIN) need to consume one sequence number; control chunks in SCTP never use a TSN, SI, or SSN Computer Networks 24-53

Packet, Data Chunks, and Stream Data chunks are identified by three items: TSN, SI, and SSN. TSN is a cumulative number identifying the association; SI defines the stream; SSN defines the chunk in a stream Acknowledgment Number In SCTP, acknowledgment numbers are used to acknowledge only data chunks; control chunks are acknowledged by other control chunks if necessary Computer Networks 24-54

SCTP Packet Format In an SCTP packet, control chunks come before data chunks General Header Computer Networks 24-55

SCTP Chunks Computer Networks 24-56

SCTP Association SCTP, like TCP, is a connection-oriented protocol A connection in SCTP is called an association to emphasize multihoming Association establishment requires a four-way handshake No other chunk is allowed in a packet carrying an INIT or INIT ACK chunk. A COOKIE ECHO or a COOKIE ACK chunk can carry data chunks Computer Networks 24-57

SCTP Association: Data Transfer Bidirectional data transfer Like TCP, SCTP supports piggybacking In SCTP, only DATA chunks consume TSNs; DATA chunks are the only chunks that are acknowledged The acknowledgment defines the cumulative TSN, the TSN of the last data chunk received in order Computer Networks 24-58

Association Termination Computer Networks 24-59

SCTP Flow Control Flow control in SCTP is similar to that in TCP. But, SCTP use two units of data, the byte and the chunk. The value of rwnd and cwnd are expressed in byte; the value of TSN and acknowledgment are in chunks Computer Networks 24-60

Flow Control Scenario Computer Networks 24-61

SCTP Error Control SCTP, like TCP, is a reliable transport layer. It uses a SACK chunk to report the state of the receiver buffer to the sender Computer Networks 24-62

SCTP Error Control Sender site Computer Networks 24-63

Error Control Sending Data Chunks: Whenever there are data chunks in the sending queue with a TSN greater than or equal curtsn or if there are data chunks in the retransmission queue Retransmission: Using retransmission timers and receiving three SACKs with the same missing chunks Generating SACK Chunks: Similar rule used for ACK with the TCP ACK flag Congestion Control : The same strategies in TCP. SCTP has slow start (exponential increase), congestion avoidance (additive increase), and congestion detection (multiplicative decrease). SCTP also use fast retransmission and fast recovery Computer Networks 24-64