The Transport Layer How do we ensure that packets get delivered to the process that needs them?

Slides:



Advertisements
Similar presentations
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Advertisements

24-1 Chapter 24. Congestion Control and Quality of Service (part 1) 23.1 Data Traffic 23.2 Congestion 23.3 Congestion Control 23.4 Two Examples.
CCNA – Network Fundamentals
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
Guide to TCP/IP, Third Edition
CISCO NETWORKING ACADEMY PROGRAM (CNAP)
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 7 – Transport Layer Protocols
TELE202 Lecture 14 TCP/UDP (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »TCP/UDP (1) »Source: chapter 17 ¥This Lecture »TCP/UDP (2) »Source: chapter.
TCP/IP Protocol Suite 1 Chapter 13 Upon completion you will be able to: Stream Control Transmission Protocol Be able to name and understand the services.
TCP/IP Protocol Suite 1 Chapter 13 Upon completion you will be able to: Stream Control Transmission Protocol Be able to name and understand the services.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
UNIT 07 Process – to – Process Delivery: UDP,TCP and SCTP
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
1 CCNA 2 v3.1 Module Intermediate TCP/IP CCNA 2 Module 10.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Chapter 4 OSI Transport Layer
Process-to-Process Delivery:
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
Chapter 16 Stream Control Transmission Protocol (SCTP)
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
1 Transport Layer Computer Networks. 2 Where are we?
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
Jaringan Komputer Dasar OSI Transport Layer Aurelio Rahmadian.
1 7-Oct-15 OSI transport layer CCNA Exploration Semester 1 Chapter 4.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
1 LAN Protocols (Week 3, Wednesday 9/10/2003) © Abdou Illia, Fall 2003.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
University of the Western Cape Chapter 12: The Transport Layer.
Routers and Routing Basics CCNA 2 Chapter 10.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
23.1 Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Networking Basics CCNA 1 Chapter 11.
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Computer Networks23-1 PART 5 Transport Layer. Computer Networks23-2 Position of Transport Layer Responsible for the delivery of a message from one process.
Chapter 9: Transport Layer
NET 221D:COMPUTER NETWORKS FUNDAMENTALS Lecture : Transport Layer: Behrouz A. Forouzan” Data communications and Networking 1.
ECE 4110 – Internetwork Programming
Stream Control Transmission Protocol
1 Version 3.1 Module 10 Intermediate TCP/IP (Layer 4)
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Stream Control Transmission.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
© 2002, Cisco Systems, Inc. All rights reserved..
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
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).
Cisco I Introduction to Networks Semester 1 Chapter 7 JEOPADY.
PROCESS-TO-PROCESS DELIVERY UDP, TCP, AND SCTP Lecture 6 : Transport layer.
Ch23 Ameera Almasoud 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007.
The Transport Layer Implementation Services Functions Protocols
Chapter 9: Transport Layer
Fast Retransmit For sliding windows flow control we waited for a timer to expire before beginning retransmission of a packet TCP uses an additional mechanism.
Instructor Materials Chapter 9: Transport Layer
PART 5 Transport Layer Computer Networks.
Transport Layer Unit 5.
Stream Control Transmission Protocol (SCTP)
Process-to-Process Delivery:
Process-to-Process Delivery: UDP, TCP
Presentation transcript:

The Transport Layer How do we ensure that packets get delivered to the process that needs them?

Summarizing the past The physical layer describes the physical medium that connects two devices and how to encode data to send it across that medium. The data link layer describes how we ensure the integrity of the data being transmitted across a particular link. (node-to-node delivery) The network layer describes how we route data between two devices where that data needs to traverse multiple physical links because the devices are not directly connected. (host-to-host)

The Transport Layer It has almost always been the case that devices connected to a network have had multiple processes trying to simultaneously use that network connection. Multi-user architectures (e.g., UNIX) Multi-tasking architectures (e.g., Windows, MacOS) The transport layer defines how a given packet gets delivered to the appropriate process. (process-to-process delivery)

Process-to-process communication A process is any instance of a program running on a given device at a given time. The same application can generate many processes all communicating with different network hosts. For the purposes of the transport layer, different threads are equivalent to different processes. To allow information to be delivered to the appropriate process, we must have some way of identifying that processes.

Ports The addressing system used to distinguish different processes on the same device and/or attached to the same network interface is the port number. An ephemeral port is one assigned by the operating system to a process when it initiates network communication. The well-known ports are ones that are reserved for particular application-layer protocols to listen for requests on. A socket address is the combination of an IP address and a port.

Client/Server communication Communication at the transport layer follows a client/server model. The client device initiates communication by sending a packet to the server requesting data. This packet contains the socket address of the sender, where the port is assigned by the operating system, and the socket address of the receiver, where the port is the well-known port for the process the client wants to connect to.

UDP Connectionless and unreliable Used primarily for short, simple transmissions: BOOTP DNS NTP No flow or error control

TCP Connection-oriented and reliable. Used for transfers that require numerous packets to be integrated properly and seamlessly HTTP Telnet SMTP FTP

TCP Segments TCP divides a transmission up into segments, which it encapsulates in a header and, most importantly, numbers in sequence. This numbering is by byte. These segments need to be encapsulated in IP packets, which is unreliable. It is up to TCP to reassemble the segments in the proper order and request retransmission of lost segments. The sequence number field in the TCP header contains the number of the first byte of the segment being sent. The acknowledgement number field contains the number of the next expected byte.

TCP Connections Connections are established using a three-way handshake. The server starts listening at a port, usually a well-known port (passive open). The client sends a SYN message to the well-known port on the server asking for a connection to be opened (active open) and for the sequence numbers to be synchronized. The server responds with an ACK message indicating what port the client should use for future communictions and the sequence number for the client to synchronize with. The client responds to the server with an ACK message.

Disconnecting TCP connections must also be terminated. Three-way handshake: Client sends a FIN segment to the server. Server sends a FIN + ACK segment back to the client. Client sends and ACK to the server Half close: If the one end (usually the client) is done sending before the other, it can close its sending connection while still receiving data. Client sends FIN; server returns an ACK. Server then sends data Finally, server sends FIN and client returns ACK

Flow control in TCP Uses a sliding window, similar to the data link layer, with some important differences: Window is byte-oriented rather than frame or segment oriented Window can change size depending on various factors such as network congestion and the business of the receiver.

Error control in TCP A checksum is part of every TCP header to help the receiver identify damaged TCP segments. Acknowledgements of properly received segments are always sent, including control segments (but not ACK segments). Unacknowledged segments are retransmitted - after timeout, or after three identical ACKs received in a row.

SCTP Stream Control Transport Protocol Message oriented (like UDP) Connection oriented and fully reliable (like TCP) Used mainly for streaming applications (VOIP, video, radio, etc.) Multi-streamed, as opposed to TCP which is single-streamed. Supports multihoming

What we mean by “message oriented” In TCP, the unit that we count is a byte; sequence numbers are byte-based. In SCTP, the unit we count is a data chunk; a given chunk can be fragmented into many pieces by the process The transmission sequence number (TSN) is how we label these chunks. Since SCTP is multistreamed, we have to have addresses for each stream - the stream identifier Data chunks on streams need to be sequenced with a stream sequence number (SSN).

TCP made a distinction between data (bytes in the data segment) and control information (flags in the header). SCTP packs control information into control chunks, which can be bundled into an SCTP packet with data chunks. The data chunks in a given packet can all be destined for different streams or different multihomed IP addresses. Acknowledgements are chunk-oriented based on the TSN.

SCTP Associations Because of the multihomed nature of SCTP, connections are referred to as associations. Associations are established with a four-way handshake The client sends an INIT chunk to the server The server responds with an INIT ACK chunk and a cookie. The client responds with a COOKIE ECHO chunk containing the server’s cookie and possibly data. The server responds with a COOKIE ACK chunk and possibly data.

Cookies What are cookies? TCP is vulnerable to SYN flooding attacks (the root of many Denial of Service attacks on web sites). When a SYN segment is received, TCP allocates the resources necessary to create and maintain the connection. Excessive allocation of resources causes the server to fail. Cookies eliminate this problem by allowing the server to not allocate resources until the intact cookie has been returned in the COOKIE ACK chunk.

Data transfer in SCTP

Flow Control in SCTP

Error control in SCTP

Congestion Control The best network design takes into account the network traffic when making decisions about how and where to send data

Congestion at multiple levels Data link: leads to a high rate of collisions or lost frames from overrun buffers Network: leads to many lost packets from overrun buffers, or slow delivery from time-share routing Transport: Also leads to overrun buffers and slow delivery.

Defining congestion All networks have a capacity of how much traffic they can send in a given time frame. Congestion is what happens when the load on a network (the amount of data it needs to handle in a given time frame) exceeds the capacity. For direct-connect or virtual-circuit networks, congestion is less of an issue because the link between two devices is dedicated. If no links are available, none can be created. However, for packet-switched networks without dedicated connects, congestion can cause significant data loss.

Open-loop congestion control Open-loop congestion methods are generally designed to try and prevent congestion by addressing those things that affect congestion. Retransmission policy: Retransmission timers and policies can be adjusted to prevent congestion Window policy: The sliding window the sender uses also will affect congestion. Selective Repeat is better than Go-Back-N, for example. Acknowledgement policy: Acknowledgements provide more network traffic Discarding policy: Routers can have the option of discarding certain types of packets if it will not harm the overall integrity of the transmission

Closed-loop congestion control Closed-loop congestion control schemes try to clear congestion once it has happened by indicating that senders need to slow down their transmission rates. Backpressure: A congested node stops receiving data from its nearest neighbors, causing those neighbors to become congested, etc. Choke packet: A congested node sends a special packet to a source telling it, essentially, to shut up (source quench message in ICMP). Implicit signals: The source guesses about congestion downstream based on clues like lack of acknowledgements, delay in acknowledgements, etc. Explicit signals: Messages can be included in data packets indicating to the source to shut up.

Congestion control in TCP Slow start The first phase of data transmission in TCP starts with a slow rate, where cwnd is the maximum segment size (MSS). Every time an acknowledgement is received, cwnd increases by one MSS. This continues until the slow start threshold (ssthresh) is reached

Congestion Avoidance: Once ssthresh is reached, TCP enters the next phase Instead of increasing the window size for each acknowledge segment, we increase cwnd by 1 MSS for each full window of chunks that gets acknowledged.

Congestion Detection: When congestion occurs, we must decrease cwnd. Whenever a segment needs to be retransmitted due to timeout, TCP presumes congestion and restarts the slow-start phase with ssthresh set to 1/2 the current window size. When a segment is retransmitted due to three consecutive identical ACKs, congestion is less likely. TCP sets ssthresh and cwnd both to 1/2 the current window size and starts the congestion avoidance phase again.