0% found this document useful (0 votes)
14 views

Unit5 Part2

Uploaded by

OutLaw Lucifer
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Unit5 Part2

Uploaded by

OutLaw Lucifer
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 46

Chapter 23

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

23.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
23-1 PROCESS-TO-PROCESS DELIVERY

The transport layer is responsible for process-to-


process delivery—the 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.
Topics discussed in this section:
Client/Server Paradigm
Multiplexing and Demultiplexing
Connectionless Versus Connection-Oriented Service
Reliable Versus Unreliable
Three Protocols
23.2
 Orderly arrangement, flow and error
control
 Service point address of port addresses
 Connectionless and Connection oriented

23.3
Note

The transport layer is responsible for


process-to-process delivery.

Node to Node – datalink layer


Host to host – network layer
Process to process – transport layer

23.4
Figure 23.1 Types of data deliveries

23.5
Client/Server Paradigm
 1. Local host
 2. Local process

 3. Remote host
 4. Remote process

23.6
Addressing
 port numbers are 16-bit integers between

0 and 65,535. The client program defines


itself with a port number, chosen
randomly by the transport layer software
running on the client host
 The server process must also define itself

with a port number. This port number,


however, cannot be chosen randomly

23.7
Figure 23.2 Port numbers

23.8
Figure 23.3 IP addresses versus port numbers

23.9
lANA Ranges
 The lANA (Internet Assigned Number Authority) has
divided the port numbers into three ranges: well known,
registered, and dynamic (or private), as shown in Figure
23.4.
o Well-known ports. The ports ranging from 0 to
1023 are assigned and controlled by lANA. These are
the well-known ports.
o Registered ports. The ports ranging from 1024 to
49,151 are not assigned or controlled by lANA. They
can only be registered with lANA to prevent duplication.
o Dynamic ports. The ports ranging from 49,152 to
65,535 are neither controlled nor registered. They can
be used by any process. These are the ephemeral ports.

23.10
Figure 23.4 IANA ranges

23.11
Socket Addresses
 combination of an IP address and a port
number is called a socket address
 The IP header contains the IP addresses;
the UDP or TCP header contains the port
numbers

23.12
Figure 23.5 Socket address

23.13
Figure 23.6 Multiplexing and demultiplexing

23.14
 Connectionless Versus Connection-Oriented
Service
 Reliable Versus Unreliable
 Because the network layer in the Internet is
unreliable (best-effort delivery), we need to
implement reliability at the transport layer

 UDP is connectionless and unreliable;


 TCP and SCTP are connection oriented and
reliable.

23.15
Figure 23.7 Error control

23.16
Figure 23.8 Position of UDP, TCP, and SCTP in TCP/IP suite

23.17
23-2 USER DATAGRAM PROTOCOL (UDP)

The User Datagram Protocol (UDP) is called a


connectionless, unreliable transport protocol. It does
not add anything to the services of IP except to provide
process-to-process communication instead of host-to-
host communication.
Topics discussed in this section:
Well-Known Ports for UDP
User Datagram
Checksum
UDP Operation
Use of UDP
23.18
 simple protocol using a minimum of
overhead
 If a process wants to send a small
message and does not care much about
reliability, it can use UDP

23.19
Table 23.1 Well-known ports used with UDP

23.20
Figure 23.9 User datagram format

23.21
Note

UDP length
= IP length – IP header’s length

23.22
Figure 23.10 Pseudoheader for checksum calculation

23.23
Figure 23.12 Queues in UDP

23.24
23-3 TCP

TCP is a connection-oriented protocol; it creates a


virtual connection between two TCPs to send data. In
addition, TCP uses flow and error control mechanisms
at the transport level.

Topics discussed in this section:


TCP Services
TCP Features
Segment
A TCP Connection
Flow Control
Error Control
23.25
Table 23.2 Well-known ports used by TCP

23.26
Figure 23.13 Stream delivery

23.27
Figure 23.14 Sending and receiving buffers

23.28
Figure 23.15 TCP segments

23.29
Note

The bytes of data being transferred in


each connection are numbered by TCP.
The numbering starts with a randomly
generated number.

23.30
Example 23.3

The following shows the sequence number for each


segment:

23.31
Note

The value in the sequence number field


of a segment defines the
number of the first data byte
contained in that segment.

23.32
Note

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.

23.33
Figure 23.16 TCP segment format

23.34
HLEN
 Header length. This 4-bit field indicates
the number of 4-byte words in the TCP
header.
 The length of the header can be between
20 and 60 bytes.
 Therefore, the value of this field can be
between 5 (5 x 4 =20) and 15 (15 x 4
=60).

23.35
Figure 23.17 Control field

23.36
Table 23.3 Description of flags in the control field

23.37
Figure 23.18 Connection establishment using three-way handshaking

23.38
Note

A SYN segment cannot carry data, but it


consumes one sequence number.

23.39
Note

A SYN + ACK segment cannot


carry data, but does consume one
sequence number.

23.40
Note

An ACK segment, if carrying no data,


consumes no sequence number.

23.41
Figure 23.19 Data transfer

23.42
Figure 23.20 Connection termination using three-way handshaking

23.43
Note

The FIN segment consumes one


sequence number if it does
not carry data.

23.44
Note

The FIN + ACK segment consumes


one sequence number if it
does not carry data.

23.45
Figure 23.21 Half-close

23.46

You might also like