CH23 - Process-To-Process Delivery
CH23 - Process-To-Process Delivery
CH23 - Process-To-Process Delivery
The transport layer is responsible for processto-process deliverythe delivery of a packet, part of a message, from one process to another. Two processes communicate in a client/server relationship, as we will see later.
Process-to-Process Delivery
Client/Server Paradigm Multiplexing and Demultiplexing Connectionless Versus ConnectionOriented Service Reliable Versus Unreliable Protocols
UDP TCP
Computer Networks 2010 Dept. of Electronics Eng. 3
Client/Server Paradigm
The most common process-to-process communication is through the client/server paradigm. A process on the local host, called a client, needs services from a process usually on the remote host, called a server. Operating systems today support multi-user multiprograming environment. Several programs running on both servers and clients at the same time! For communication, we need the following addresses:
local host local process remote host remote process
Port numbers
Socket address
Process-to-process delivery needs two identifiers Socket address = combination of IP address and port number
Connection-oriented service
A connection is first established between sender and receiver before data transfer. TCP(Transmission Control Protocol)
Computer Networks 2010 Dept. of Electronics Eng. 9 Computer Networks 2010 Dept. of Electronics Eng. 10
A reliable transport?
flow and error control
11
12
Connectionless, unreliable Minimum overhead Simply adds port address to IP Checksum is optional
Dept. of Electronics Eng. 13 Computer Networks 2010 Dept. of Electronics Eng. 14
Use of UDP
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. e.g., Trivial File Transport Protocol (TFTP) Used for some route updating protocols such as RIP. Used in conjunction with RTP to provide a transport-layer mechanism for real-time data (Real-time applications).
Computer Networks 2010 Dept. of Electronics Eng. 15
16
TCP sees a sequence of data transmitted as a stream. TCP creates an environment in which two processes seem to be connected by an imaginary tube that carries their data across the Internet
Computer Networks 2010 Dept. of Electronics Eng. 17 Computer Networks 2010 Dept. of Electronics Eng. 18
TCP segments
19
20
Numbering
The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number. The value of the sequence number field in 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 2010 Dept. of Electronics Eng. 21 Computer Networks 2010 Dept. of Electronics Eng. 22
Control field
23
24
If SYN is set, this field is the initial seq. # (ISN) and the first data octet is ISN+1. Contains the seq. # of the next data octet that the TCP entity expects to receive.
Header length (4bits) : # of 32 bit words in the header (= Data offset) Reserved (6bits) : Reserved for future use.
Computer Networks 2010 Dept. of Electronics Eng.
Window (16bits): Flow control credit allocation (in octets) Checksum (16bits): Error detection code Urgent pointer (16bits): Points to the last octet in a seq. of urgent data. Options (variable): Optional features
25
26
TCP Connection
TCP is a connection-oriented. In TCP, a data transmission requires
Connection establishment Data transmission Connection termination
27
28
Data transfer
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.
29
30
The FIN + ACK segment consumes one sequence number if it does not carry data.
31
32
Half-close
33