- Distinguishes between upper-layer applications.
- Establishes end-to-end connectivity between applications.
- Defines flow control.
- Provides reliable or unreliable services for data transfer.
Another function of the transport layer is to set up and maintain connections for the session layer. The information transferred to devices at the transport layer is called a segment. Because multiple connections may be established from one device to another device or devices, some type of multiplexing function is needed to differentiate between the various connections. This ensures that the transport layer can send data from a particular application to the correct destination and, when receiving data from a destination, get it to the right application.
To accomplish this, the transport layer assigns a unique set of numbers for each connection. These numbers are called port or socket numbers. There is a source [[port number]] and a destination port number for each connection. The destination port numbers assigned by the source device are referred to as well-known port numbers. The source device uses an appropriate port number in the destination port field to indicate to the destination which application it is trying to access. For example, the TCP/IP protocol stack gives each application a unique port number.