10. Task of the transport layer

The transport layer is a very important part of the communication process. The most important tasks of this layer include:

·         establish and maintain connections (sessions) between hosts,

·         track connections between hosts,

·         divide the data into smaller pieces,

·         identify individual applications,

·         control the  data flow,

·         provide  retransmission in case of data loss.

Call tracking, which are conversations between hosts, allows multiple applications to send and receive data simultaneously. On one computer we can check our mail, use electronic banking or communicate with friends. This is possible thanks to the transport layer.

The ability to use multiple services at the same time also includes splitting data, i.e. breaking it into smaller pieces. This allows for more efficient communication, as large amounts of data are not transmitted simultaneously. Web page segments, email segments, instant messenger segments, etc. are sent alternately. The whole process of alternating the transmission of multiple application segments is called multiplexing.

Another important task or function of the transport layer is to pass data to the relevant application. Each application has its own identifier to uniquely define it. This identifier is the port number of the application.

It is assigned to a segment or datagram during encapsulation at the transport layer level and guarantees the delivery of data to a specific application.

As with IP addresses, port numbers are assigned by the IANA (Internet Assigned Numbers Authority), which divides port numbers into 3 groups:

Port group name

Numbering range

Application

Well known

0 - 1023

Server services and applications

Registered

1024 - 49151

User services and applications

Dynamic

49152 - 65535

Randomly selected for customer applications


Well-known ports, i.e. ports 0 to 1023, are registered for services and specific server applications, e.g. web servers default to port 80 and POP3 servers default to port 110. Applications with known ports, including transport layer protocols, are shown below:

Application layer protocol

Port number

Transport layer protocol

HTTP

80

TCP

HTTPS

443

TCP

POP3

110 (encrypted 995)

TCP

IMAP

143 (encrypted 993)

TCP

SMTP

25 (encrypted 465 or 587)

TCP

FTP

21 (commands) and 20 (files)

TCP

FTPS

990

TCP

TELNET

23

TCP

SSH

22

TCP

DNS

53

TCP or UDP

DHCP

67 and 68 (IPv6 - 546 and 547)

UDP

LDAP

389 (coded 639)

TCP or UDP

SNMP

161

UDP


The second group, registered ports, is used by applications installed on the user's computer. For example, if we install the MySQL database management system application on our computer, it will run on port 3306.

The third and last group, the dynamic port number, is randomly assigned to the client application.

Multiple applications cannot run on the same port number. Once an application is running on port 53 (DNS), it is impossible for another application to be able to run on that port.

Another concept is a socket. A socket is a combination of an IP address and a port number:

192.186.26.12:80

A socket uniquely identifies a particular process running on a device.