Defines a set of rules to enable computers to communicate over a network, specifying how data should be packaged, addressed, shipped, routed, and delivered to the right destination. The specification defines protocols for different types of communication between computers and provides a framework for more detailed standards.
The transport layer's responsibilities include end-to-end message transfer capabilities independent of the underlying network, along with error control, fragmentation and flow control. End to end message transmission or connecting applications at the transport layer can be categorized as either:
connection-oriented e.g. TCP
connectionless e.g UDP
The transport layer can be thought of literally as a transport mechanism, for example, a vehicle whose responsibility is to make sure that its contents (passengers/goods) reach its destination safely and soundly, unless a higher or lower layer is responsible for safe delivery.
The transport layer provides this service of connecting applications together through the use of ports. Since IP provides only a best effort delivery, the transport layer is the first layer of the TCP/IP stack to offer reliability. Note that IP can run over a reliable data link protocol such as the High-Level Data Link Control (HDLC). Protocols above transport, such as RPC, also can provide reliability.
For example, TCP is a connection-oriented protocol that addresses numerous reliability issues to provide a reliable byte stream:
data arrives in-order
data has minimal error (i.e correctness)
duplicate data is discarded
lost/discarded packets are resent
( includes traffic congestion control  --Nmamgain 03:45, 9 April 2008 (EDT)k