The Transport Layer
Learn about the services that are provided by the transport layer.
The network layer provides node-to-node communication while the transport layer provides the service of application-to-application communication.
The application-to-application communication service is useful because there can be many different applications running in a node that want to communicate with one of the applications running in a different node.
Achieving transport layer service
Application-to-application communication is achieved via the concept of ports, where each node can have many different applications running and listening on different ports for data from the network.
Some of the protocols in the transport layer can also provide more services on top of this fundamental one. We will briefly cover the transmission control protocol (TCP) and the user datagram protocol (UDP), the two most commonly used and well-known protocols of the transport layer.
User datagram protocol
UDP is a simple protocol that applications can use to send messages to each other. These messages are called datagrams.
Similar to the IP protocol, it is a connectionless protocol, which means that an application in a host can send a message to an application on a different host, without setting up a communication channel first. All it needs to do is to specify the IP address of the destination node and the port that the corresponding application is listening to.
Structure of datagram
A datagram is composed of a payload that corresponds to the application message and a header, which contains fields for the source and destination ports, the length of the datagram, and an ...