Transport Layer TCP UDP SCTP 3 Way Handshake
Transport Layer TCP UDP SCTP 3 Way Handshake
Transport Layer TCP UDP SCTP 3 Way Handshake
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
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 IANA ranges
23.7
Figure 23.5 Socket address
23.8
Figure 23.6 Multiplexing and demultiplexing
23.9
Figure 23.7 Error control
23.10
Figure 23.8 Position of UDP, TCP, and SCTP in TCP/IP suite
23.11
23-2 USER DATAGRAM PROTOCOL (UDP)
23.13
Figure 23.9 User datagram format
23.14
Use of UDP
communication with little concern for flow and error control. It is not
UDP is suitable for a process with internal flow and error control
mechanisms.
23.15
capability is embedded in the UDP software but not in the TCP software.
23-3 TCP
23.17
Figure 23.13 Stream delivery
23.18
Figure 23.14 Sending and receiving buffers
23.19
Figure 23.15 TCP segments
23.20
Note
23.21
Example 23.3
23.22
Note
23.23
Note
23.24
Figure 23.16 TCP segment format
23.25
Figure 23.17 Control field
23.26
Connection establishment using three-way handshaking
23.27
Push Flag explanation
Push Flag explanation
•The PSH flag in the TCP header informs the receiving host that the data
should be pushed up to the receiving application immediately.
URGENT Flag
The URG flag is used to inform a receiving station that certain data within
•If the URG flag is set, the receiving station evaluates the urgent pointer, a
16-bit field in the TCP header. This pointer indicates how much of the data
23.31
Connection establishment using three-way handshaking
23.32
Note
23.34
Connection termination using three-way handshaking
23.35
SCTP
Stream Control Transmission Protocol (SCTP) is a new reliable,
message-oriented transport layer protocol. SCTP, however, is mostly
designed for Internet applications that have recently been introduced.
These new applications, such as IUA (ISDN over IP), M2UA and
M3UA (telephony signaling), H.248 (media gateway control), H.323
(IP telephony), and SIP (IP telephony), need a more sophisticated
service than TCP can provide. SCTP provides this enhanced
performance and reliability.
23.36
UDP is a message-oriented protocol. A process delivers a message to UDP, which
is encapsulated in a user datagram and sent over the network. UDP conserves the
message boundaries; each message is independent of any other message. This is a
desirable feature when we are dealing with applications such as IP telephony and
transmission of real-time data, as we will see later in the text. However, UDP is
unreliable; the sender cannot know the destiny of messages sent..
o TCP is a byte-oriented protocol. It receives a message or messages from a
process, stores them as a stream of bytes, and sends them in segments. There is no
preservation of the message boundaries. However, TCP is a reliable protocol. The
duplicate segments are detected, the lost segments are resent, and the bytes are
delivered to the end process in order. TCP also has congestion control and flow
control mechanisms.
o SCTP combines the best features of UDP and TCP. SCTP is a reliable message
oriented protocol. It preserves the message boundaries and at the same time detects
lost data, duplicate data, and out-of-order data. It also has congestion control and
flow control mechanisms.
23.37
SCTP Services
Before we discuss the operation of SCTP, let us explain the services offered by
SCTP to the application layer processes.
Multiple Streams
Each connection between a TCP client and a TCP server involves one single
stream. The problem with this approach is that a loss at any point in the stream
blocks the delivery of the rest of the data. This can be acceptable when we are
transferring text; it is not when we are sending real-time data such as audio or
video. SCTP allows multi-stream service in each connection, which is called
association in SCTP terminology. If one of the streams is blocked, the other
streams can still deliver their data.
23.38
Multihoming
A TCP connection involves one source and one destination IP address. This means that
even if the sender or receiver is a multihomed host (connected to more than one physical
address with multiple IP addresses), only one of these IP addresses per end can be utilized
during the connection. An SCTP association, on the other hand, supports multihoming
service. The sending and receiving host can define multiple IP addresses in each end for an
association. In this fault-tolerant approach, when one path fails, another interface can be
used for data delivery without interruption. This fault-tolerant feature is very helpful when
we are sending and receiving a real-time payload such as Internet telephony
23.39
Full-Duplex Communication
Like TCP, SCTP offers full-duplex service, in which data can flow in both directions at
the same time. Each SCTP then has a sending and receiving buffer, and packets are sent
in both directions.
Connection-Oriented Service
Like TCP, SCTP is a connection-oriented protocol. However, in SCTP, a connection is
called an association. When a process at site A wants to send and receive data from
another process at site B, the following occurs:
1. The two SCTPs establish an association between each other.
2. Data are exchanged in both directions.
3. The association is terminated.
Reliable Service
SCTP, like TCP, is a reliable transport protocol. It uses an acknowledgment mechanism
to check the safe and sound arrival of data.
23.40
SCTP Features
Transmission Sequence Number
Data transfer in SCTP is controlled by numbering the data chunks. SCTP uses a
transmission sequence number (TSN) to number the data chunks. In other words, the
TSN in SCTP plays the analogous role to the sequence number in TCP. TSNs are 32
bits long and randomly initialized between 0 and 232 - 1. Each data chunk must carry
the corresponding TSN in its header
Stream Identifier
In TCP, there is only one stream in each connection. In SCTP, there may be several
streams in each association. Each stream in SCTP needs to be identified by using a
stream identifier (SI). Each data chunk must carry the SI in its header so that when it
arrives at the destination, it can be properly placed in its stream
23.41
23.42
Association Establishment
23.43
1.The client sends the first packet, which contains an INIT chunk.
2. The server sends the second packet, which contains an INIT ACK
chunk.
3. The client sends the third packet, which includes a COOKIE ECHO
chunk. This
is a very simple chunk that echoes, without change, the cookie sent by
the server.
SCTP allows the inclusion of data chunks in this packet.
4. The server sends the fourth packet, which includes the COOKIE ACK
chunk that
acknowledges the receipt of the COOKIE ECHO chunk. SCTP allows
the inclusion
of data chunks with this packet.
23.44
Association Termination
Association termination uses three packets,
Note that although the figure shows the case in which termination
is initiated by the client, it can also be initiated by the server. Note that there can
be several scenarios of association termination.
23.45