0% found this document useful (0 votes)
39 views21 pages

5-Chapter Five - Transport Layer

The document discusses the transport layer, which provides end-to-end delivery of data between applications. It describes the two main transport layer protocols, TCP and UDP. TCP provides reliable, ordered delivery of data through mechanisms like acknowledgments and retransmissions. UDP is simpler and provides unreliable datagram delivery. The transport layer segments data, identifies applications using port numbers, and ensures proper reassembly and delivery to the correct application.

Uploaded by

WONDYE DESTA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views21 pages

5-Chapter Five - Transport Layer

The document discusses the transport layer, which provides end-to-end delivery of data between applications. It describes the two main transport layer protocols, TCP and UDP. TCP provides reliable, ordered delivery of data through mechanisms like acknowledgments and retransmissions. UDP is simpler and provides unreliable datagram delivery. The transport layer segments data, identifies applications using port numbers, and ensures proper reassembly and delivery to the correct application.

Uploaded by

WONDYE DESTA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 21

CHAPTER 5:

THE TRANSPORT LAYER

Data communication and Computer Network

1
Objectives
In this chapter, we will examine the role of the
Transport layer.
– Explain the need for the Transport layer.
– Identify the role of the Transport layer as it
provides the end-to-end transfer of data
between applications.
– Describe the role of two TCP/IP Transport layer
protocols: TCP and UDP.
– Explain the key functions of the Transport
layer, including reliability, port addressing, and
segmentation.
Purpose of the Transport Layer
The Transport layer provides for the segmentation of data necessary to
reassemble these pieces into the various communication streams.
Its primary responsibilities to accomplish this are:
A. Segmenting data and managing each piece
•The Transport layer protocols describe services that segment
this data from the Application layer.
B. Reassembling the segments into application data
– At the receiving host, these individual pieces of data must also
be reconstructed into a complete data stream that is useful to
the Application layer.
C. Identifying the different applications
•In order to pass data streams to the proper applications, the
Transport layer must identify the target application.
•To accomplish this, the Transport layer assigns an application
identifier. The TCP/IP protocols call this identifier a port number.
•Each software process that needs to access the network is assigned
a port number unique in that host.
Purpose of the Transport Layer: link between the layers

The Transport layer is the link


between the Application layer
and the lower layer that are
responsible for network
transmission.
–This layer accepts data
from different conversations
and passes it down to the
lower layers as manageable
pieces that can be eventually
multiplexed over the media.
–Their responsibility is to
deliver data to the
appropriate device. The
Transport layer then sorts
these pieces before
delivering them to the
appropriate application.
Transport Layer: Dividing data into small parts
Sending some types of data - a video for example - across a
network as one complete communication stream could
prevent other communications from occurring at the same
time. It also makes error recovery and retransmission of
damaged data difficult.
Segmentation of the data, in accordance with Transport layer
protocols, provides the means to both send and receive data
when running multiple applications concurrently on a
computer.
At the Transport layer, each particular set of pieces flowing
between a source application and a destination application is
known as a conversation.
–To identify each segment of data, the Transport layer adds to the
piece a header containing binary data.
–It is the values in these fields that enable different Transport layer
protocols to perform different functions.
Transport Layer: Controlling the Conversations
The primary functions specified by all Transport layer protocols include:
–Segmentation and Reassembly
•The Transport layer divides application data into blocks of data that are an
appropriate size.
•At the destination, the Transport layer reassembles the data before sending
it to the destination application or service.
–Conversation Multiplexing
•There may be many applications or services running on each host in the
network.
•Each of these applications is assigned an address known as a port so that
the Transport layer can determine with which application or service the data
is identified.
In addition to the basic functions of data segmentation and reassembly, some
protocols at the Transport layer provide:
–Connection-oriented conversations
–Reliable delivery
–Ordered data reconstruction
–Flow control
Controlling the Conversations
Establishing a Session
–The Transport layer can provide this connection orientation by creating a sessions between the
applications.
–These connections prepare the applications to communicate with each other before any data is
transmitted.
Reliable Delivery
–For many reasons, it is possible for a piece of data to become corrupted, or lost completely, as it
is transmitted over the network.
–The Transport layer ensure that all pieces reach their destination by having the source device to
retransmit any data that is lost.
Same Order Delivery
–Because networks may provide multiple routes that can have different transmission times, data
can arrive in the wrong order.
–By numbering the segments, the Transport layer can ensure that these segments are
reassembled into the proper order.
Flow Control
–Network hosts have limited resources, such as bandwidth.
–When Transport layer is aware the resources are overtaxed, it can request the sending application
reduce the rate of data flow.
–Flow control can prevent the loss of segments on the network and avoid the need for
retransmission.
Supporting Reliable Communication
However, different applications have different requirements for their data,
and therefore different Transport protocols have been developed to
meet these requirements.
A Transport layer protocol can implement a method to ensure reliable
delivery of the data. At the Transport layer the three basic operations of
reliability are:
–tracking transmitted data
–acknowledging received data
–retransmitting any unacknowledged data
These reliability processes place additional overhead on the network
resources due to the acknowledgement, tracking, and retransmission.
To support these reliability operations, more data is exchanged between
the sending and receiving hosts.
–The Transport layer of the receiving host must also track the data as it is
received and acknowledge the receipt of the data.
Transport Layer Protocols: TCP and UDP
The 2 most common Transport layer protocols:
–User Datagram Protocol (UDP)
•UDP is a connectionless protocol, described in RFC 768.
•It providing for low overhead data delivery.
•The pieces of communication in UDP are called datagrams.
•each UDP segment only has 8 bytes of overhead.
•These datagrams are sent as "best effort".
•Applications that use UDP include:
–Domain Name System (DNS)
–Video Streaming
–Voice over IP (VoIP)
–Transmission Control Protocol (TCP)
•TCP is a connection-oriented protocol, described in RFC 793.
•TCP incurs additional overhead to gain functions.
•Additional functions specified by TCP are the same order delivery, reliable
delivery, and flow control.
•Each TCP segment has 20 bytes of overhead in the header encapsulating the
Application layer data,
•Applications that use TCP are:
–Web Browsers
–E-mail
–File Transfers
Port Addressing: Identifying the Conversations
The TCP and UDP based services keep track of the various
applications that are communicating. Both TCP and UDP have
header fields that can uniquely identify these applications.
–These unique identifiers are the port numbers.
In the header of each segment or datagram, there is a source and
destination port.
–The source port number is the number for this communication
associated with the originating application on the local host.
–The destination port number is the number for this communication
associated with the destination application on the remote host.
Port numbers are assigned in various ways, depending on whether the
message is a request or a response.
–While server processes have static port numbers assigned to them,
clients dynamically choose a port number for each conversation.
The IANA assigns port numbers
Well Known Ports (Numbers 0 to 1023) - These numbers are reserved for services and
applications.
–HTTP (web server) POP3/SMTP (e-mail server) and Telnet.
Registered Ports (Numbers 1024 to 49151) - These port numbers are assigned to user
processes or applications.
–These processes are primarily individual applications that a user has chosen to install.
–When not used for a server resource, these ports may also be used dynamically selected by a
client as its source port.
Dynamic or Private Ports (Numbers 49152 to 65535) - Also known as Ephemeral Ports,
these are usually assigned dynamically to client applications when initiating a
connection.
–It is not very common for a client to connect to a service using a Dynamic or Private Port.
Using both TCP and UDP
–Some applications may use both TCP and UDP.
•For example, the low overhead of UDP enables DNS to serve many client requests very quickly.
•Sometimes, however, sending the requested information may require the reliability of TCP.
Reserved TCP and UDP port numbers
Transmission Control Protocol (TCP
TCP is a connection-oriented transport layer protocol that
provides reliable full-duplex data transmission.
The following application layer protocols use TCP:
–FTP
–HTTP
–SMTP
–Telnet
User Datagram Protocol (UDP)

UDP is a simple protocol that exchanges datagram's


without guaranteed delivery.
It relies on higher-layer protocols to handle errors and
retransmit data
The following application layer protocols use UDP:
–TFTP
–SNMP
–DHCP
–DNS
TCP-Making Conversations Reliable
The key distinction between TCP and UDP is reliability.
The reliability of TCP communication is performed using connection-
oriented sessions. (3 way handshake)
–Before a host using TCP sends data to another host, the Transport layer
initiates a process to create a connection with the destination.
–This process ensures that each host is aware of and prepared for the
communication.
After a session has been established (3 way handshake), the
destination sends acknowledgements to the source for the segments
that it receives.
–As the source receives an acknowledgement, it knows that the data has
been successfully delivered and can quit tracking that data.
If the source does not receive an acknowledgement within a
predetermined amount of time, it retransmits that data to the
destination.
–There is also additional overhead on the individual hosts created by the
necessity to keep track of which segments are awaiting acknowledgement
and by the retransmission process.
TCP Connection Establishment and Termination
When two hosts communicate using TCP:
–a connection is established before data can be exchanged.
–The host tracks each data segment within a session and exchanges
information about what data is received.
–After the communication is completed, the sessions are closed and
the connection is terminated.

To establish the connection, the hosts perform a three-way


handshake.
–Establishes that the destination device is present on the network
–Verifies that the destination device has an active service and is
accepting requests on the destination port number that the initiating
client intends to use for the session
–Informs the destination device that the source client intends to
establish a communication session on that port number
TCP Connection Establishment: Three-way Handshake
The three steps in TCP connection establishment are:
–1. The initiating client sends a segment containing an initial
sequence value, which serves as a request to the server to begin a
communications session.
–2. The server responds with a segment containing an
acknowledgement value equal to the received sequence value plus
1, plus its own synchronizing sequence value.
•The value is one greater than the sequence number because the
ACK is always the next expected Byte or Octet.
•This acknowledgement value enables the client to tie the
response back to the original segment that it sent to the server.
–3. Initiating client responds with an acknowledgement value equal
to the sequence value it received plus one. This completes the
process of establishing the connection.
Connection Establishment – The Three-way handshake

TCP is a
connection-
oriented protocol.
A connection has
to be established
before data
transfer begins
TCP uses a
mechanism
called The
Three-way
handshake to
establish
connections.
Connection Establishment – The Three-way handshake
Summary of chapter 5

The two primary duties of the transport layer are to


provide
–Flow Control
–reliability
Some basic transport services are as follows:
–Segmentation of upper-layer application data
–Establishment of end-to-end operations
–Transportation of segments from one end host to another
–Flow control provided by sliding windows
–Reliability provided by sequence numbers and
acknowledgments
Transport layer protocols

The only Transport layer protocols are TCP and UDP.


–Transmission Control Protocol (TCP)
•Connection-oriented protocol
•End-to-end operation
•Flow control – sliding windows
•Reliability – sequence numbers and acknowledgments
–User Datagram Protocol (UDP)
•Connectionless
•Unreliable (no acknowledgments or error checking)

You might also like