What is Transport Control Protocol (TCP)?by Iwan Price-Evans on Web technology • May 26, 2022
Transport Control Protocol (TCP) is one of the two network protocols that make up almost all of the network traffic on the internet. TCP is the most commonly used internet transport protocol and is one of the three protocols that make up the Internet protocol suite. Transport Control Protocol (TCP), Internet Protocol (IP), and User Datagram Protocol (UDP) are part of this suite, commonly known as TCP/IP.
The Internet protocol suite (TCP/IP) provides end-to-end communication over the internet and defines how data should be formatted, transmitted, and received. TCP is part of the Transport Layer of the TCP/IP suite and also forms part of the Transport Layer of the Open System Interconnection (OSI) model.
What Is The Difference Between TCP And UDP?
TCP is connection-orientated, meaning that it prioritizes connection integrity to ensure reliability. UDP on the other hand is connectionless and prioritizes speed over reliability.
All of the major operating system vendors implement support for TCP and UDP.
How Does TCP Work?
TCP allows data to be transmitted and received by two systems at the same time. TCP software in an operating system will establish a connection, transfer the data, and terminate the connection.
- Before TCP transmits data, it establishes a connection between the source and destination. This is often between a client and server, and TCP will maintain that connection until the communication begins.
- The server must be listening before the connection can be made, known as 'passive open'.
- TCP then chunks large amounts of data into smaller pieces (packets) and sends them to the recipient.
TCP ensures the integrity of data by keeping track of the data packets as they travel over the network. TCP also minimizes unexpected network behavior. If packet data is delivered in the wrong order TCP can reorder it. Similarly, it allows data to be resent if the data packets were lost for some unknown reason. This functionality means TCP is reliable but these checks can reduce the speed of delivery and can generate delays of several seconds.
Common Uses Of TCP
TCP is used in a variety of computing scenarios such as:
- Web browsing over Hypertext Transfer Protocol (HTTP) or Secure Hypertext Transfer Protocol (HTTPS)
- Sending and receiving email via Internet Message Access Protocol (IMAP), Post Office Protocol (POP), or Simple Mail Transfer Protocol (SMTP)
- File transfers using File Transfer Protocol (FTP) or Secure Shell (SSH).
How Secure Is TCP?
TCP does have inherent vulnerabilities. TCP can protect data packets from modification but can't protect the message from modification. TCP doesn't provide encryption and so using it without encryption means the messages can be intercepted. TCP checks the source IP address and port number but an attacker can modify both of these.
TCP can be susceptible to denial of service (DoS) attacks, connection hijacking (including TCP veto), and reset attacks (commonly known as forged TCP resets).