Transport Layer Notes. Performs a critical role in providing communication services directly to application processes running on different hosts.

Similar documents
Transport Layer Protocols

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

Computer Networks. Chapter 5 Transport Protocols

q Connection establishment (if connection-oriented) q Data transfer q Connection release (if conn-oriented) q Addressing the transport user

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

Ethernet. Ethernet. Network Devices

Chapter 11. User Datagram Protocol (UDP)

Computer Networks UDP and TCP

How do I get to

Transport Layer. Chapter 3.4. Think about

IP address format: Dotted decimal notation:

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Networking Test 4 Study Guide

[Prof. Rupesh G Vaishnav] Page 1

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

IP - The Internet Protocol

Protocols and Architecture. Protocol Architecture.

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

Lecture 28: Internet Protocols

Final for ECE374 05/06/13 Solution!!

EITF25 Internet Techniques and Applications L5: Wide Area Networks (WAN) Stefan Höst

CS155 - Firewalls. Simon Cooper <sc@sgi.com> CS155 Firewalls 22 May 2003

Chapter 5. Transport layer protocols

First Midterm for ECE374 03/09/12 Solution!!

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

TCP/IP and the Internet

CPS221 Lecture: Layered Network Architecture

Network Programming TDC 561

Internet Control Protocols Reading: Chapter 3

Objectives of Lecture. Network Architecture. Protocols. Contents

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Transport and Network Layer

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Lecture 2-ter. 2. A communication example Managing a HTTP v1.0 connection. G.Bianchi, G.Neglia, V.Mancuso

LESSON Networking Fundamentals. Understand TCP/IP

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

Basic Networking Concepts. 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet

Overview of TCP/IP. TCP/IP and Internet

Internet Concepts. What is a Network?

Chapter 3. TCP/IP Networks. 3.1 Internet Protocol version 4 (IPv4)

Solution of Exercise Sheet 5

PART OF THE PICTURE: The TCP/IP Communications Architecture

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

EXPLORER. TFT Filter CONFIGURATION

Network Layer: Network Layer and IP Protocol

How To Understand The Internet Of S (Netware)

Understanding TCP/IP. Introduction. What is an Architectural Model? APPENDIX

Architecture and Performance of the Internet

Firewalls. Basic Firewall Concept. Why firewalls? Firewall goals. Two Separable Topics. Firewall Design & Architecture Issues

Access Control: Firewalls (1)

Networking Overview. (as usual, thanks to Dave Wagner and Vern Paxson)

Question: 3 When using Application Intelligence, Server Time may be defined as.

Network Security TCP/IP Refresher

Improved Digital Media Delivery with Telestream HyperLaunch

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

How To Design A Layered Network In A Computer Network

Understanding Layer 2, 3, and 4 Protocols

Overview of Computer Networks

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

DO NOT REPLICATE. Analyze IP. Given a Windows Server 2003 computer, you will use Network Monitor to view and analyze all the fields of IP.

Technical Support Information Belkin internal use only

Introduction to TCP/IP

Protocols. Packets. What's in an IP packet

Linux MDS Firewall Supplement

This sequence diagram was generated with EventStudio System Designer (

Network Models and Protocols

Internet Architecture and Philosophy

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

Data Communication Networks and Converged Networks

Linux MPS Firewall Supplement

8-bit Microcontroller. Application Note. AVR460: Embedded Web Server. Introduction. System Description

Computer Networks/DV2 Lab

8.2 The Internet Protocol

TCP Performance Management for Dummies

CSE331: Introduction to Networks and Security. Lecture 12 Fall 2006

Internetworking. Problem: There is more than one network (heterogeneity & scale)

The OSI Model and the TCP/IP Protocol Suite

The Transport Layer. Antonio Carzaniga. October 24, Faculty of Informatics University of Lugano Antonio Carzaniga

Encapsulating Voice in IP Packets

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

What is a DoS attack?

TCP/IP Networking for Wireless Systems. Integrated Communication Systems Group Ilmenau University of Technology

Chapter 3. Internet Applications and Network Programming

A host-based firewall can be used in addition to a network-based firewall to provide multiple layers of protection.

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

The OSI model has seven layers. The principles that were applied to arrive at the seven layers can be briefly summarized as follows:

Kap. 2. Transport - Schicht

ACHILLES CERTIFICATION. SIS Module SLS 1508

Networks: IP and TCP. Internet Protocol

Internet Protocols. Background CHAPTER

Firewall Implementation

Hands-on Network Traffic Analysis Cyber Defense Boot Camp

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

Introduction to Computer Networks

Internet Protocol: IP packet headers. vendredi 18 octobre 13

User Datagram Protocol - Wikipedia, the free encyclopedia

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

Transcription:

Transport Layer Notes Performs a critical role in providing communication services directly to application processes running on different hosts. Critical function: Extending the network layer's delivery service between two end systems to a delivery service between two application layer processes running on end systems. Deals with the two most fundamental problems in computer networking: 1. How can two entities communicate reliability over a medium that is unreliable. 2. How can the transmission rate of the transport layer entities be controlled in order to avoid, or recover from, congestion within the network. A transport layer protocol provides for logical communication between application processes running on different hosts. Appears like a direct connection between them, so they can exchange messages, freeing them from the details of the physical infrastructure underneath. Transport layer protocols only exist in end systems, never in routers. Multiplexing and Demultiplexing Required for extending host-to-host delivery to process-to-process delivery by directing data from the network layer to a specific process. Uses a concept called a socket for delivery. So the delivery is not directly to an application process but to an intermediate socket. 1. Each transport layer segment has a set of header fields for this purpose. 2. At the receiving end, the transport layer examines these fields to identify the receiving socket and then directs the segment to that socket. (Demultiplexing) At the sending end, the transport layer gathers data chunks of the source host from different sockets, encapsulating each data chunk with header information to create segments and passes them to the network layer. (Multiplexing) Multiplexing requires: 1. that sockets have unique identifiers and 2. that each segment have special fields that indicate the socket to which the segment is to be delivered. The fields are a) source port number and b) destination port number Each port number is a 16 bit number ranging from 0 to 65,535. 0 1023 are reserved and called well-known port numbers. (RFC 1700) maintained on Unix systems at /etc/services Identify commonly used TCP and UDP default ports SMTP 25 RDP - 3389 HTTP 80 SSH - 22 HTTPS 443 DNS - 53 FTP - 20, 21 DHCP - 67, 68 TELNET - 23 IMAP - 143

User Datagram Protocol (UDP) (RFC 768) At the very least, the transport layer has to provide multiplexing/demultiplexing service in order to pass data between the network layer and the correct application layer process. UDP does this along with some minimal error checking. It basically adds nothing more to the network layer function. Activities: 1. accepts a message from an application process 2. attaches source and destination port numbers fields 3. adds checksum results 4. passes the resulting segment to the network layer 5. at the destination (if it arrives), UDP consults the destination port number for delivering the segment's data to the correct application process. Completely connectionless. Example: Domain Name Service (DNS) Why would a programmer choose UDP? (it is unreliable) Some applications are better suited for UDP for the following reasons: 1. No connection establishment does not introduce any delay to establish a connection. Application protocols that require speed may choose UDP, e.g., DNS 2. No connection state in contrast TCP maintains connection state which includes: a. receive and send buffers b. congestion control parameters c. sequence and acknowledgment number parameters UDP does not track any of this, thus a server using UDP can typically support many more active clients than a server using TCP. 3. Small packet header overhead. TCP has 20 bytes of header, UDP as 8 bytes. 4. Finer application level control over what data is sent and when. UDP will package data from the application process and immediately pass the segment to the network layer. TCP has a congestion control mechanism that throttles the transport layer TCP sender when one or more links between the source and destination hosts become excessively congested. Also will continue to send a segment of data until receipt of the segment has been acknowledged by the destination host. Real time applications require: minimum sending rate little delay in segment transmission can tolerate some data loss Applications can implement additional functionality needed beyond UDP's no-frills process-toprocess segment delivery service. UDP Segment Structure (RFC 768) Contains only four fields, each consisting of two bytes. Source port number Destination port number

Length length of the UDP segment including the header, in bytes Checksum used by receiving host to check whether errors have been introduced into the segment during transmission. Why does UDP offer a checksum function (since other layers also do this)? There is no guarantee that all the links between source and destination provide error checking. Note: UDP does nothing to recover from an error; it can discard or pass the data upwards with a warning. Transmission Control Protocol connection oriented because before one application process can begin to send data to another, the two processes must first, hand shake, i.e., they must send some preliminary segments to each other to establish the parameters of the ensuing data transfer. Both sides must initialize many TCP state variables associated with the TCP connection. This is not an end-to-end circuit, as in circuit switching, nor a virtual circuit. The connection state resides entirely in the two end system's memory buffers. No TCP state exists in the intermediate network elements since they do not contain a transport layer. TCP connections provide full duplex data transfer, i.e., application data can flow from A > B at the same time application data flows from B > A. TCP connections are also point-to-point, i.e., between a single sender and a single receiver. Multicasting (one-to-many) is not possible with TCP. How a TCP connection is established: 1. Client application process must inform the transport layer that it wants to establish a connection. Must provide both an IP address and a port number to identify the destination host and application process. 2. The Transport Layer establishes a TCP connection with the server/host: a) send a special TCP segment (no payload) b) server responds with a special TCP segment (no payload) c) client responds with a third special TCP segment (may contain a payload) Process is called three way handshake 3. Connection is established both hosts can now exchange data. a) Client > Server via socket Application data is sent to the connection's send buffer (created during the initial three way handshake). From time-to-time, TCP will grab chunks of data from this send buffer at its own convenience. The maximum amount of data that can be grabbed and placed in a segment is limited by the maximum segment size (MSS) which depends on the TCP implementation in a particular operating system; can often be configured by the administrator. Common values are 1500 bytes, 536 bytes, and 512 bytes. Note: MSS is the maximum amount of application layer data in the segment, NOT the maximum size of the TCP segment including headers. TCP pairs each chunk of data with a TCP header, thereby forming TCP segments. b) Server side Segments are placed in a receive buffer. The application process reads the stream

of data from this buffer. Conclusion: Each host allocates memory buffers, initializes variables and creates a socket. The TCP socket is identified by a four tuple (source IP and port, destination IP and port). Thus when a TCP segment arrives, the host uses all four values to direct (demultiplex) the segment to the appropriate socket. In contrast to UDP, two arriving TCP segments with different source IP addresses or port numbers will be directed to two different sockets. TCP server starts and listens to a welcoming socket TCP client generates a connection-establishment segment 1) a TCP segment with the destination port # the same as the welcoming socket 2) a special connection-establishment bit set in the TCP header (SYN) 3) a source port # generated by the client OS TCP server receives the incoming connection request and creates a connection socket TCP server notes four values 1) source port # 2) IP address of source host 3) destination port # 4) own IP address TCP client and server exchange data. TCP Segment Structure Composed of header fields and data (application layer message) limited by MSS size. Large files are broken down into multiple MSS sized chunks with the last chunk being less than MSS. Some application layer protocol never fill a MSS chunk, e.g., telnet. Since the TCP header must be at least 20 bytes, the smallest segment size is 21 bytes. Fields: 32 bit Sequence Number Since TCP views data as an unstructured, but ordered stream of bytes, this number represents the break points of each segment with the number beginning with the first byte in the segment. Use to arrange bytes back into order when all are collected on the end system. 32 bit Acknowledgment Number the receiving system removes the incoming segment sequence number and increments it by one to represent the sequence number of the next expected byte from the sender. 16 bit Receive Window used for flow control since it indicates the number of bytes that the receiver is willing to accept. 4 bit Header Length Field specifies the length of the TCP header in 32 bit words. The TCP header can be of variable length due to the TCP options field (which is typically empty so the length is usually 20 bytes.) Options Field used when the sender and receiver negotiate the MSS or as a window scaling factor for use in high speed networks. Time stamp option is also available. Flag Field contains six bits: 1. ACK bit used to indicate the value carried in the Acknowledgment field is valid 2. RST, SYN, FIN used for connection setup and tear down 3. PSH when set, an indication that the receiver should pass the data to the upper layer immediately 4. URG indicates that there is data in this segment that the sending side upper layer entity has marked as urgent. The location of the last byte of this urgent data by the 16 bit Urgent Data Pointer Field. TCP must inform the receiving side upper layer

exists and pass it a pointer to the end of the UDPF. (Typically never used!)