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

Process To Process Delivery, UDP, TCP, SCTP

The document discusses process-to-process delivery at the transport layer. It covers three main protocols: UDP, which is connectionless and unreliable; TCP, which is connection-oriented and provides reliability; and SCTP. UDP uses ports and IP addresses to multiplex connections but does not ensure delivery. TCP establishes connections using three-way handshakes, provides flow and error control with sequence numbers and acknowledgments, and ensures reliable in-order delivery using acknowledgments and retransmissions. It discusses concepts like sliding windows, buffers, and connection establishment and termination procedures.

Uploaded by

ARYAMAN DWIVEDI
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

Process To Process Delivery, UDP, TCP, SCTP

The document discusses process-to-process delivery at the transport layer. It covers three main protocols: UDP, which is connectionless and unreliable; TCP, which is connection-oriented and provides reliability; and SCTP. UDP uses ports and IP addresses to multiplex connections but does not ensure delivery. TCP establishes connections using three-way handshakes, provides flow and error control with sequence numbers and acknowledgments, and ensures reliable in-order delivery using acknowledgments and retransmissions. It discusses concepts like sliding windows, buffers, and connection establishment and termination procedures.

Uploaded by

ARYAMAN DWIVEDI
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Chapter 23

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

23.1
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
Note

The transport layer is responsible for


process-to-process delivery.

23.3
Figure 23.1 Types of data deliveries

23.4
Figure 23.2 Port numbers

23.5
Figure 23.3 IP addresses versus port numbers

23.6
Figure 23.4 Internet Assigned Number Authority (IANA) ranges

• use universal port numbers for servers are called well-known


port numbers.
• Registered ports. The ports ranging from 1024 to 49,151 are
not assigned or controlled by IANA. They can only be
registered with IANA to prevent duplication.
• 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.7
Figure 23.5 Socket address

Socket address:- The combination of an IP address and a port number

The IP header contains the IP addresses;


The UDP or TCP header contains the port numbers.

23.8
Figure 23.6 Multiplexing and demultiplexing

23.9
Figure 23.7 Error control

23.10
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:
User Datagram
Checksum
UDP Operation
Use of UDP

23.11
Figure 23.9 User datagram format

23.12
Note

UDP length
= IP length – IP header’s length

23.13
Figure 23.10 Pseudoheader for checksum calculation

23.14
Example 23.2

Figure 23.11 shows the checksum calculation for a very


small user datagram with only 7 bytes of data. Because
the number of bytes of data is odd, padding is added for
checksum calculation. The pseudoheader as well as the
padding will be dropped when the user datagram is
delivered to IP.

Solution:-
Step1:- Take 16 bit at a time and add two 16 bit number at a time
and if carry occurs, put it to the LSB position and simply add them.
Step2: Take the 1’s complement of the sum, we get the check sum.
Step3:- put the checksum at the place where we previously put 16
zeros for checksum calculation.

23.15
Figure 23.11 Checksum calculation of a simple UDP user datagram

At the receiver the same process follows and again calculate the
checksum and if we found all 1’s then there is no error in
transmission.

23.16
Figure 23.12 Queues in UDP

23.17
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.18
Table 23.2 Well-known ports used by TCP

23.19
Figure 23.13 Stream delivery

23.20
Figure 23.14 Sending and receiving buffers

23.21
Figure 23.15 TCP segments

23.22
Note

The bytes of data being transferred in


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

23.23
Example 23.3

The following shows the sequence number for each


segment:

23.24
Note

The value in the sequence number field


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

23.25
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.26
Figure 23.16 TCP segment format

23.27
Figure 23.17 Control field

23.28
Table 23.3 Description of flags in the control field

23.29
Figure 23.18 Connection establishment using three-way handshaking

23.30
Note

A SYN segment cannot carry data, but it


consumes one sequence number.

23.31
Note

A SYN + ACK segment cannot


carry data, but does consume one
sequence number.

23.32
Note

An ACK segment, if carrying no data,


consumes no sequence number.

23.33
Figure 23.19 Data transfer

23.34
Figure 23.20 Connection termination using three-way handshaking

23.35
Note

The FIN segment consumes one


sequence number if it does
not carry data.

23.36
Note

The FIN + ACK segment consumes


one sequence number if it
does not carry data.

23.37
Figure 23.21 Half-close

23.38
Figure 23.22 Sliding window

23.39
Note

A sliding window is used to make


transmission more efficient as well as
to control the flow of data so that the
destination does not become
overwhelmed with data.
TCP sliding windows are byte-oriented.

23.40

You might also like