What is the Transmission Control Protocol (TCP)?

Introduction

The Transmission Control Protocol (TCP) is one of the most common ways to transmit data on the Internet. TCP is a communication protocol with its own set of rules about how data should be transmitted over the internet. There are many other types of communication protocols with their own sets of rules for transmitting different kinds of data over the internet, such as the file transfer protocol (FTP) and hypertext transfer protocol (HTTP).

How TCP works

Different protocols for transmitting data over the Internet operate at different layers of the open systems interconnection (OSI) seven-layer model. TCP operates at the transport layer (layer 4). Another commonly used alternative protocol for data transmission on the transport layer is the user datagram protocol (UDP).

Regardless of the protocol, data transmission on the Internet is generally similar at the conceptual level: data is divided into small, individual, units called the protocol data unit (PDU) before the units are transmitted over the Internet through the process of routing.

The PDU for TCP is called packets. Data transmitted using TCP, such as a video stream, is divided into packets, which are routed over the Internet and received by the end user.

The three-way handshake

TCP is a connection-oriented protocol. In simple terms, a connection-oriented protocol requires a connection between the sender and the receiver to be properly established before packets can be routed. For the entire period of data routing, the connection must be maintained and released only when all routed packets have arrived at the destination.

What Is the Transmission Control Protocol (TCP)

A TCP connection is established by a three-way handshake. TCP transmits three messages known as SYN, SYN-ACK, and ACK (SYNchronize, SYNchronize-ACKnowledgement, and ACKnowledge) to initiate a TCP session.

When your computer wants to get information from a web server through TCP, it follows these steps:

  1. Your computer sends a TCP SYN packet to the server.
  2. After receiving your machine’s SYN packet, the server responds with a SYN-ACK packet back to your machine.
  3. Your machine responds with the ACK packet back, after receiving the SYN-ACK packet.
  4. When the server receives the ACK packet from your machine, the TCP connection is established.

Your computer and the server complete this process every time your computer requests information through TCP.

Glossary

Layer 4 (Transport Layer)

The layer of the OSI model that handles traffic between hosts and clients (TCP/UDP).

TCP

Transmission Control Protocol.

OSI Model

Open Systems Interconnection Model. A seven-layer model that describes how different parts of networks function.