A.Y.
1441-1442
Faculty of Sciences/Northern Borders University
2020-2021
Chapter V
Transport Layer
Salem.Belhaj@nbu.edu.sa
Computer Science Department
1
Transport Layer: purpose
• The Transport layer provides for the segmentation of
data and the control necessary to reassemble these
pieces into the various communication streams
• Its primary responsibilities to accomplish this are:
– Tracking the individual communication between applications on
the source and destination hosts
– Segmenting data and managing each piece
– Reassembling the segments into streams of application data
– Identifying the different applications
Computer Networks 2
Transport Layer Services
Computer Networks 3
TCP and UDP
• The two most common Transport layer protocols of TCP/IP
protocol suite are
– Transmission Control Protocol (TCP) and
– User Datagram Protocol (UDP)
Computer Networks 4
User Datagram Protocol (UDP)
• UDP is a simple, connectionless protocol
• It has the advantage of providing for low overhead data
delivery
• The pieces of communication in UDP are called datagrams
• These datagrams are sent as "best effort" by this Transport
layer protocol.
• Applications that use UDP include:
– Domain Name System (DNS)
– Video Streaming
– Voice over IP (VoIP)
– Online games
Computer Networks 5
Transmission Control Protocol (TCP)
• TCP is a connection-oriented protocol
• 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, whereas each UDP
segment only has 8 bytes of overhead
• Applications that use TCP are:
– Web Browsers
– E-mail
– File Transfers
Computer Networks 6
Port Addressing
• The TCP and UDP based services keep track of the various
applications that are communicating
• To differentiate the segments and datagrams for each
application, both TCP and UDP have header fields that can
uniquely identify these applications
• These unique identifiers are the port numbers
Computer Networks 7
Port Addressing
• The Internet Assigned Numbers Authority (IANA) assigns port
numbers. IANA is a standards body that is responsible for assigning
various addressing standards
• There are different types of port numbers:
– Well Known Ports (Numbers 0 to 1023): These numbers are reserved for
services and applications. They are commonly used for applications such
as HTTP (web server) POP3/SMTP (e-mail server), etc.
– Registered, Dynamic or Private Ports (Numbers 1024 to 65535): These
port numbers are assigned to user processes or applications
Computer Networks 8
Example of ports
15 Netstat
23 telnet
53 Domain Name Service (DNS)
69 TFTP
25 Simple Mail Transport Protocol (SMTP)
21 FTP
80 HyperText Transfer Protocol (HTTP)
161 SNMP
9
TCP: communicating with reliability
• The key distinction between TCP and UDP is reliability
• The reliability of TCP communication is performed using
connection-oriented sessions
• Before a host using TCP sends data to another host, the
Transport layer initiates a process to create a connection with
the destination
• This connection enables the tracking of a session, or
communication stream between the hosts
• This process ensures that each host is aware of and prepared
for the communication
• A complete TCP conversation requires the establishment of a
session between the hosts in both directions
Computer Networks 10
TCP connection Establishment
• When two hosts communicate using TCP, a connection is
established before data can be exchanged
• Three-way handshake process is necessary for a TCP
connection establishment
SYN=1 + ACK = 0 connection_request
SYN=1 + ACK = 1 connection_accepted
Computer Networks 11
TCP connection Termination
• After the communication is completed, the sessions are
closed and the connection is terminated
• Using a four-step process, flags are exchanged to terminate
a TCP connection
FIN=1 + ACK = 0 disconnection_request
FIN=1 + ACK = 1 disconnection_accepted
Computer Networks 12