Unit5 Part2
Unit5 Part2
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
23.3
Note
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
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
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)
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
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
23.30
Example 23.3
23.31
Note
23.32
Note
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
23.39
Note
23.40
Note
23.41
Figure 23.19 Data transfer
23.42
Figure 23.20 Connection termination using three-way handshaking
23.43
Note
23.44
Note
23.45
Figure 23.21 Half-close
23.46