In computing and telecommunications, the transport layer is layer four of the seven layer OSI model. It responds to service requests from the session layer and issues service requests to the network layer.
Transport Layer is responsible for packet handling, ensures error free delivery, repackages messages, divides messages into smaller packets, and handles error handling.
The purpose of the Transport layer is to provide transparent transfer of data between end users, thus relieving the upper layers from any concern with providing reliable and cost-effective data transfer.
On the Internet there are a variety of Transport services, but the two most common are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).
TCP is the more complicated, providing a connection and byte oriented stream which is almost error free, with flow control, multiple ports, and same order delivery. UDP is a very simple datagram service, which provides limited error reduction and multiple ports.
Transmission Control Protocol (TCP) breaks data up into packets that the network can handle efficiently, verifies that all the packets arrive at their destination, and reassembles the data.
Transmission Control Protocol (TCP) is connection oriented, which means an acknowledgement (ACK) verifies that the host has received each segment of the message, reliable delivery service. Acknowledgements are sent by receiving computer, unacknowledged packets are resent. Sequence number are used with acknowledgements to track successful packet transfer
If the ACK is not received after a given time period, then the data is resent. If segments are not delivered to the destination device correctly, then the Transport layer can initiate retransmission or inform the upper layers. Uses segmentation, flow control, and error checking to insure packet delivery the purpose of name resolution, either to an IP/IPX address or a network protocol name resolution helps upper layer services communicate segment destinations with lower layer services.
User Datagram Protocol (UDP) provides same services as TCP but is connectionless and unacknowledged. UDP lets applications send datagrams without the overhead involved in acknowledging packets and maintaining a virtual circuit. UDP is therefore used to broadcast messages across an internetwork, because acknowledgment is unnecessary and overhead is undesirable.