Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
The Transmission Control Protocol (TCP) is one of the core protocols of the Internet protocol suite. Using TCP, applications on networked hosts can create connections to one another, over which they can exchange data in packets. The protocol guarantees reliable and in-order delivery of data from sender to receiver. TCP also distinguishes data for multiple connections by concurrent applications (e.g. Web server and e-mail server) running on the same host.
TCP supports many of the Internet’s most popular application protocols and resulting applications, including the World Wide Web and e-mail.
In the Internet protocol suite, TCP is the intermediate layer between the Internet Protocol (IP) below it, and an application above it. Applications often need reliable pipe-like connections to each other, whereas the Internet Protocol does not provide such streams, but rather only unreliable packets. TCP does the task of the transport layer in the simplified OSI reference model of computer networks.
Protocol operation
Unlike TCP’s traditional counterpart - User Datagram Protocol - that can immediately start sending packets, TCP provides connections that need to be established before sending data. TCP connections have three phases:
- Connection establishment
- Data transfer
- Connection termination
Connection establishment
To establish a connection, TCP uses a 3-way handshake. Before a client attempts to connect with a server, the server must first bind to a port to open it up for connections: this is called a passive open. Once the passive open is established, a client may initiate an active open. To establish a connection, the 3-way (or 3-step) handshake occurs:
- The active open is performed by sending a SYN to the server
- In response, the server replies with a SYN-ACK.
- Finally the client sends an ACK back to the server.
At this point, both the client and server have received an acknowledgement of the connection.
Data transfer
There are a few key features that set TCP apart from User Datagram Protocol:
- Error-free data transfer
- Ordered-data transfer
- Retransmission of lost packets
- Discarding duplicate packets
- Congestion throttling

