Networking

What Does TCP Stand For in Networking? Transmission Control Protocol

In networking, TCP stands for Transmission Control Protocol. It is the protocol that gives programs a reliable, in-order stream of bytes across a network, and it is the transport used by most web, email and remote-login traffic.

The name is literal. It is a protocol (a set of rules that two computers follow), and what it controls is the transmission of data between two programs. RFC 793, the original 1981 specification, is titled "Transmission Control Protocol", and so is its 2022 replacement, RFC 9293.

What TCP does in plain terms

The network underneath TCP is unreliable by design. Packets can be lost, duplicated or arrive out of order. TCP sits on top and hides that from the application. RFC 9293 states the service in one sentence: "TCP provides a reliable, in-order, byte-stream service to applications."

Each part of that sentence has a concrete meaning:

  • Reliable: data that does not arrive is sent again, so the application does not have to notice losses.
  • In-order: bytes come out of the receiving end in the same order they went into the sending end.
  • Byte stream: TCP has no idea where your messages start and end. If an application writes 100 bytes and then 200 bytes, the receiver may read them as 300 bytes at once, or in other chunks. The application protocol, such as HTTP, has to mark its own message boundaries.

RFC 793 describes the same idea in the language of 1981: TCP "is intended for use as a highly reliable host-to-host protocol between hosts in packet-switched computer communication networks, and in interconnected systems of such networks." It also calls TCP "a connection-oriented, end-to-end reliable protocol", which is where the other common description, "connection-oriented", comes from.

What is the difference between TCP and IP?

Most people meet the name as "TCP/IP", and the two letters on the right are a separate protocol. IP is the Internet Protocol. It addresses hosts and moves individual packets between them, and it makes no promise that any given packet arrives. TCP is the layer above that adds the promises.

RFC 793 places TCP exactly there: it "fits into a layered protocol architecture just above a basic Internet Protocol." Every TCP segment travels inside an IP packet. The suite is called TCP/IP because those two protocols were the first pair and remain the best known. The full layer model, including where UDP, DNS and HTTP fit, is in the TCP/IP model guide.

AbbreviationExpansionJob
TCPTransmission Control ProtocolReliable, ordered byte stream between two programs
IPInternet ProtocolAddressing and best-effort delivery of packets between hosts
UDPUser Datagram ProtocolUnreliable, message-based delivery with minimal overhead

Key facts about TCP

It identifies programs with ports

An IP address picks the computer. A TCP port picks the program on it. The Source Port and Destination Port fields in the TCP header are each 16 bits wide, so a port is a number from 0 to 65,535. A web server typically listens on port 80 for HTTP or 443 for HTTPS, and your browser is assigned a temporary source port for each connection.

It opens a connection before sending data

TCP is connection-oriented: the two ends exchange control segments first, so that both agree on starting sequence numbers. This is the three-way handshake. The client sends SYN, the server answers SYN and ACK, and the client sends ACK. Only then does application data flow. The cost is one round trip of waiting before the first request. The handshake and how it compares with UDP, which skips it, are covered in TCP vs UDP.

It has a variable-length header

The Data Offset field is 4 bits and gives "the number of 32-bit words in the TCP header". With no options the header is 5 words, which is 5 × 4 = 20 bytes. The largest value, 15, gives 15 × 4 = 60 bytes. That is the range of TCP header sizes: 20 to 60 bytes.

It limits segment size

RFC 9293 requires an implementation to assume a default send maximum segment size (MSS) of 536 bytes for IPv4 (576 minus 40 bytes of headers) or 1220 bytes for IPv6 (1280 minus 60), unless the other side announces something larger. In practice, connections on ordinary Ethernet-sized links negotiate a larger MSS, but 536 is the fallback.

Where TCP is used

Anything that cannot tolerate missing or reordered bytes is a candidate. That covers loading web pages over HTTP/1.1 and HTTP/2, sending mail, logging in remotely with SSH and copying files. If one byte in a downloaded program is wrong, the program is broken, so the retransmission delay is a price worth paying.

The same guarantees are a cost for live voice, video and games, where a late packet is useless. Those applications often use UDP, or QUIC, which is built on UDP. The trade-off is the subject of the TCP vs UDP guide linked above. TCP is the default when correctness matters more than the last few milliseconds.

A short history of the name

The Transmission Control Protocol was first published as a standard in RFC 793 in September 1981. The document says it replaces RFC 761 and mentions "nine earlier editions of the ARPA TCP specification", so the protocol had been revised many times before that date. RFC 793 was the specification that stood for decades. In August 2022, RFC 9293 consolidated it. Its abstract states: "This document obsoletes RFC 793, as well as RFCs 879, 2873, 6093, 6429, 6528, and 6691." The name did not change. When you see "TCP" in a modern document, it means the protocol described in RFC 9293, which is backward compatible with the protocol that machines have used since 1981.

How to see TCP on your own computer

You can list the TCP connections your machine has open. On Windows, in PowerShell or Command Prompt:

netstat -ano -p TCP

On Linux, ss -tan shows the same information. Both print the local and remote address with port, and a state such as LISTENING or ESTABLISHED. Example output, with addresses replaced by documentation addresses:

  Proto  Local Address          Foreign Address        State           PID
  TCP    192.0.2.15:52814       198.51.100.7:443       ESTABLISHED     4120

Reading it left to right: a TCP connection from port 52814 on your machine (the temporary source port) to port 443 (HTTPS) on a remote server, currently in the ESTABLISHED state, owned by the process with ID 4120.

Common mix-ups

  • "Transfer" instead of "Transmission": a frequent slip, probably because of FTP (File Transfer Protocol). The correct word is Transmission.
  • TCP versus the internet: TCP is one protocol that runs over the internet. It is not the internet itself, and it is not the web. HTTP is the web's protocol, and it uses TCP underneath.
  • TCP versus IP address: an IP address belongs to IP. TCP contributes the port number that goes with it.

Frequently asked questions

What does TCP/IP stand for?
TCP/IP is Transmission Control Protocol and Internet Protocol, written together because they are the two best-known protocols of the internet protocol suite. IP carries packets from one host to another without guarantees, and TCP runs on top of it to provide a reliable, in-order byte stream.
Is the 'P' in TCP for protocol or packet?
Protocol. The full name in both RFC 793 and RFC 9293 is Transmission Control Protocol. A packet is the unit of data that IP carries, which is a different thing from the protocol that organizes the conversation.
Which RFC defines TCP today?
RFC 9293, dated August 2022. Its abstract states that it obsoletes RFC 793, the original September 1981 specification, along with several later RFCs that had patched or extended it.
Does TCP stand for something different in other fields?
In other fields the same three letters can mean other things, for example in medicine or in business. In networking, TCP always means Transmission Control Protocol.

Sources