The transport layer is the interface between the application layer and the complex hardware of the network. It is designed to allow peer entities on the source and destination hosts to carry on conversations.
Data may be user data or control data. Two modes are available, full-duplex and half duplex. In full-duplex operation, both sides can transmit and receive data simultaneously, whereas in half duplex, a side can only send or receive at one time.
Interaction between the transport layer and the layers immediately above and
below are shown in figure 2.2. Any program running in
the application layer has the ability to send a message using TCP or UDP, which
are the two protocols defined for the transport layer. The application can communicate
with the TCP
or the UDP service, whichever it requires. Both the TCP and UDP communicate
with the Internet Protocol in the internet layer. In all cases communication
is a two way process. The applications can read and write to the transport layer.
The diagram only shows two protocols in the transport layer. T/TCP will also
reside in this layer between the other two protocols and function in the same
manner.
Figure 2.2: Interaction with Application, Transport and Internet
Layers
A message to be sent originates in the application layer. This is then passed down onto the appropriate protocol in the transport layer. These protocols add a header to the message for the corresponding transport layer in the destination machine for purposes of reassembling the message. The segment is then passed onto the internet layer where the Internet Protocol adds a further header. Finally the segment is passed onto the physical layer, a header and a trailer are added at this stage. Figure 2.3 shows the structure of the final segment being sent.
Figure 2.3: Transmitted Segment from TCP/IP Network