Introduction
The Internet Protocol (IPv4) gave us unreliable, connectionless packet delivery between hosts. This means that although a client can send a packet to a server, it has no way of knowing that the packet got there.
However, hosts run multiple processes and services and nothing within IP gives us the ability to connect between a requesting application on a client and the service it needs to consume on a server. This is addressed using ports with UDP.
Unreliable packet delivery has implications. Packets can be dropped or lost, delivered out of order, or after a delay. Duplicate packets may arrive. Sustainable transfer rates may be difficult to determine and may vary dynamically over time. These problems are best dealt with as close as possible to the layer at which they occur. It would be incredibly inefficient to deal with them at the application layer. Would we require every application programmer to write code for every transport mechanism? Instead, we can have a single reliable stream delivery protocol to provide a uniform service to the upper layers. We are essentially creating a virtual circuit across a packet network. This is addressed using TCP.
Last updated