Network layer protocols like IP provide best effort services-that is, they deliver packets but don't guarantee that the packets will actually be delivered. Think about the postal service. It delivers letters, but you don't know that it was received unless you arrange to have a delivery confirmation returned to you. Some applications, such as real-time voice and video, do not need TCP's services. In a real-time stream, it does not make sense to recover a lost packet. Speed of delivery is more important, so UDP (a limited services transport protocol) is used.

Transport layer protocols provide delivery guarantees that are essential for file transfers and mission-critical applications. TCP uses IP, but adds the reliability services at the cost of more overhead and slightly reduced performance. These services operate over a "virtual connection" that is established between sender and receiver. When a session begins, the sender uses a handshaking technique to establish a connection with the receiver. During the session, sender and receiver engage in a dialog that manages the flow of data to prevent from overflowing the receiver and confirms the receipt of TCP segments. A communication session goes like this:

The sender must contact the receiver before its starts sending data packets. They engage in a three-way handshake operation to establish the connection, then start transmitting data. A single computer can establish multiple connections with multiple computers at the same time, a feature called multiplexing (since the packets for these different connections are transmitted over the same network connection). See "Connection Establishment" for details.

Flow control mechanisms

While slow start and congestion control are used to avoid network congestion, flow controls help prevent the sender from overflowing the receiver with too much data. These controls are essential because the receiver drops packets when it is overloaded and those packets must be retransmitted, potentially increasing network congestion and reducing system performance. See "Flow-Control Mechanisms."

Slow start and congestion control

Once a connection has been made, the sender starts sending packets, slowly at first so it does not overwhelm the network. If congestion is not bad, it picks up the pace. This is called "slow start." Later, congestion controls help the sender scale back if the network gets busy. See "Congestion Control Mechanisms" for more details.

Reliability services

These services are used to retransmit corrupt, lost, and dropped packets. Positive acknowledgements confirm to the sender that the recipient actually received a packet (failure to transmit this acknowledgement means "resend the packet"). Sequencing is used to number packets so that packets can be put back in order and lost packets can be detected. Error checking detects corrupted packets. Refer to "Reliable Data Delivery Services" and "TCP (Transmission Control Protocol)" for more information.