Chương 11:
TCP/IP Application and Transport
• As its name implies, the TCP/IP transport layer
does the work of transporting data between
applications on source and destination devices.
A thorough understanding of the operation of the
transport layer is essential to understanding
modern data networking. This module will
describe the functions and services of this
critical layer of the TCP/IP network model.
Computer Network
1
• Many of the network applications that are
found at the TCP/IP application layer are
familiar to even casual network users.
HTTP, FTP and SMTP, for example, are
acronyms that are commonly seen by
users of Web browsers and e-mail clients.
This module also describes the function of
these and other applications from the
TCP/IP networking model.
Computer Network
2
• Students completing this module should
be able to:
– Describe the functions of the TCP/IP
transport layer.
– Describe flow control.
– Describe the processes of establishing a
connection between peer systems.
– Describe windowing.
– Describe acknowledgment.
Computer Network
3
• Identify and describe transport layer
protocols.
• Describe TCP and UDP header formats.
• Describe TCP and UDP port numbers.
• List the major protocols of the TCP/IP
application layer.
• Provide a brief description of the features
and operation of well-known TCP/IP
applications.
Computer Network
4
11.1. TCP/IP Transport Layer
• The primary duties of the transport layer,
Layer 4 of the OSI model, are to transport
and regulate the flow of information from
the source to the destination, reliably and
accurately. End-to-end control and
reliability are provided by sliding windows,
sequencing
numbers,
and
acknowledgments.
Computer Network
5
Computer Network
6
• The transport layer provides transport
services from the source host to the
destination host. It establishes a logical
connection between the endpoints of the
network. Transport services segment and
reassemble
several
upper-layer
applications onto the same transport layer
data stream. This transport layer data
stream provides end-to-end transport
services.
Computer Network
7
• The transport layer data stream is a logical
connection between the endpoints of a
network. Its primary duties are to transport
and regulate the flow of information from
source to destination reliably and
accurately. The primary duty of Layer 4 is
to provide end-to-end control using sliding
windows and to provide reliability in
sequencing
numbers
and
acknowledgments. The transport layer
defines end-to-end connectivity between
host applications.
Computer Network
8
• Transport services include the following
basic services:
– Segmentation of upper-layer application
data
– Establishment of end-to-end operations
– Transport of segments from one end
host to another end host
– Flow control provided by sliding windows
– Reliability
provided
by
sequence
numbers and acknowledgments
Computer Network
9
• TCP/IP is a combination of two individual
protocols. IP operates at Layer 3, and is a
connectionless protocol that provides besteffort delivery across a network. TCP
operates at Layer 4, and is a connectionoriented service that provides flow control
as well as reliability. By pairing these
protocols, a wider range of services is
provided. Together, they are the basis for
an entire suite of protocols called the
TCP/IP protocol suite. The Internet is built
upon this TCP/IP protocol suite.
Computer Network
10
11.2. Flow control
• As the transport layer sends data segments, it
tries to ensure that data is not lost. A receiving
host that is unable to process data as quickly as
it arrives could be a cause of data loss. The
receiving host is then forced to discard it. Flow
control avoids the problem of a transmitting host
overflowing the buffers in the receiving host.
TCP provides the mechanism for flow control by
allowing the sending and receiving host to
communicate. The two hosts then establish a
data-transfer rate that is agreeable to both.
Computer Network
11
Computer Network
12
11.3. Session establishment, maintenance,
and termination overview
• Multiple applications can share the same
transport connection in the OSI reference
model.
Computer Network
13
Computer Network
14
• Transport functionality is accomplished on
a segment-by-segment basis. In other
words, different applications can send data
segments on a first-come, first-served
basis. The segments that arrive first will be
taken care of first. These segments can be
routed to the same or different
destinations. This is referred to as the
multiplexing of upper-layer conversations.
Computer Network
15
• One function of the transport layer is to establish
a connection-oriented session between similar
devices at the application layer. For data transfer
to begin, both the sending and receiving
applications inform the respective operating
systems that a connection will be initiated. One
node initiates a connection that must be
accepted by the other. Protocol software
modules in the two operating systems
communicate with each other by sending
messages across the network to verify that the
transfer is authorized and that both sides are
ready.
Computer Network
16
• The connection is established and the
transfer of data begins after all
synchronization has occurred. During
transfer, the two machines continue to
communicate with their protocol software
to verify that data is received correctly.
Computer Network
17
Computer Network
18
• The figure shows a typical connection
between the sending and receiving
systems. The first handshake requests
synchronization. The second and third
handshakes acknowledge the initial
synchronization request, as well as
synchronizing connection parameters in the
opposite direction. The final handshake
segment is an acknowledgment used to
inform the destination that both sides agree
that a connection has been established.
After the connection has been established,
data transfer begins
Computer Network
19
• Congestion can occur during data transfer for
two reasons. First, a high-speed computer might
be capable of generating traffic faster than a
network can transfer it. Second, if many
computers simultaneously need to send
datagrams to a single destination, that
destination can experience congestion, although
no single source caused the problem.
• When datagrams arrive too quickly for a host or
gateway to process, they are temporarily stored
in memory. If the traffic continues, the host or
gateway eventually exhausts its memory and
must discard additional datagrams that arrive.
Computer Network
20
• Instead of allowing data to be lost, the
transport function can issue a “not ready”
indicator to the sender. Acting like a stop
sign, this indicator signals the sender to
stop sending data. When the receiver can
handle additional data, the receiver sends
a “ready” transport indicator. When this
indicator is received, the sender can
resume the segment transmission.
Computer Network
21
Computer Network
22
• At the end of data transfer, the sending
host sends a signal that indicates the end
of the transmission. The receiving host at
the
end
of
the
data
sequence
acknowledges the end of transmission and
the connection is terminated.
Computer Network
23
11.1.4. Three-way handshake
• TCP is a connection-oriented protocol. TCP
requires connection establishment before
data transfer begins. For a connection to
be established or initialized, the two hosts
must synchronize their Initial Sequence
Numbers (ISNs).
Computer Network
24
• Synchronization is done through an
exchange of connection establishing
segments that carry a control bit called
SYN, for synchronize, and the ISNs.
Segments that carry the SYN bit are also
called “SYNs". This solution requires a
suitable mechanism for picking an initial
sequence number and a slightly involved
handshake to exchange the ISNs.
Computer Network
25