Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP) is a communication standard for establishing and maintaining a two-way delivery stream of octets between two endpoints on a shared network. Learn how TCP works, what the three-way handshake does, and how TCP compares with UDP.
What is Transmission Control Protocol (TCP)?
Transmission Control Protocol (TCP) is one of the core protocols of the internet. It runs at the transport layer, on top of the Internet Protocol (IP), and gives applications a reliable, ordered connection: data sent by one side arrives complete and in the right order at the other side. Web browsing (HTTP and HTTPS), email, file transfer, SSH, and RDP all rely on TCP.
How does TCP work?
- Three-way handshake: the client sends a SYN, the server answers with SYN-ACK, and the client replies with ACK. The connection is now open.
- Segmentation and sequencing: data is split into segments, each with a sequence number so the receiver can put them back in order.
- Acknowledgments and retransmission: the receiver confirms what it got; anything not acknowledged in time is sent again.
- Flow and congestion control: a window size limits how much unacknowledged data can be in flight, so the sender does not overwhelm the receiver or the network.
- Termination: either side closes the connection with FIN messages.
Each connection is identified by the source and destination IP addresses and port numbers, which tell the system which application the data belongs to.
TCP vs. UDP
TCP is connection-oriented and reliable, at the cost of some overhead and delay. UDP is connectionless: it sends datagrams without a handshake, acknowledgments, or retransmission, which makes it faster and lighter but leaves reliability to the application. Streaming, voice, gaming, and DNS lookups often use UDP.
Why does TCP matter?
Understanding TCP helps teams troubleshoot slow or dropped connections, read packet captures, and configure firewalls, which usually allow or block traffic by TCP port. Attackers also abuse TCP behavior, for example with SYN floods that exhaust connection resources and port scans that find open services, so exposed TCP ports should be kept to the minimum needed.
Frequently asked questions
What is TCP?
TCP (Transmission Control Protocol) is a communication standard for establishing and maintaining a two-way delivery stream of octets between two endpoints on a shared network.
What is the TCP three-way handshake?
It is the SYN, SYN-ACK, ACK exchange that opens a TCP connection and synchronizes sequence numbers between the two sides.
What is a TCP port?
A port is a number that identifies a specific service or application on a host, such as 443 for HTTPS or 22 for SSH.
Manage TCP-based remote connections in one place
Centralize RDP, SSH, VNC, web, and cloud console connections in one app.
Related terms
User Datagram Protocol (UDP)
User Datagram Protocol (UDP) is a standardized method for delivering time-sensitive data over a network without establishing a connection between two hosts.
Read now →Transmission Control Protocol/Internet Protocol (TCP/IP)
Transmission Control Protocol/Internet Protocol (TCP/IP) is a set of communication protocols, often built into computers, for transmitting data across the internet and other networks.
Read now →Packet
A packet is a section of data that has been divided into several pieces for easier transfer and is later reassembled with its counterparts to form a whole.
Read now →