badge icon

This article was automatically translated from the original Turkish version.

Article

TCP (Transmission Control Protocol)

ChatGPT Image 29 Nis 2025 04_15_19.png
TCP (Transmission Control Protocol)
Year of Definition
1981
Layer
Transport Layer (Layer 4)
Protocol Type
Connection-orientedReliable Communication
RFC Document
RFC 793

The Transmission Control Protocol (TCP) is a connection-oriented transport layer protocol designed to ensure reliable and ordered data transmission between two endpoint devices in computer networks. TCP was first developed by the Defense Advanced Research Projects Agency (DARPA), part of the United States Department of Defense, and today forms one of the fundamental pillars of data transmission over the Internet. Reliable data transfer is supported by functions such as error control, flow control, and congestion control. TCP divides data streams into packets (segments), assigns each segment a sequence number, and ensures they are delivered to the receiver in the correct order. Various techniques have been developed to improve TCP's performance in communication channels with high error rates, such as wireless environments.

Key Features of TCP

TCP encompasses three phases: connection establishment, data transfer, and connection termination. Data transfer cannot begin until a session is established between the two devices. The most important functions of TCP are:

  • Dividing data received from upper layers into appropriately sized segments,
  • Assigning a sequence number to each segment,
  • Ensuring that received segments are reassembled in the correct order,
  • Resending lost or corrupted segments,
  • Preventing data overflow using flow control mechanisms,
  • Optimizing network performance through congestion control.

TCP operates fundamentally on a byte-stream basis; each data segment is identified by a byte number, and the receiver responds with an acknowledgment (ACK) message for each received segment.

TCP Header Structure

TCP segments carry a header containing control information in addition to the data payload. The header includes the source port, destination port, sequence number, acknowledgment number, flags (such as SYN, ACK, FIN), window size, and a checksum used for error detection.

TCP connections are established and terminated using a three-way handshake mechanism.

Connection Establishment

The initiating device (client) sends a SYN segment. The target device (server) responds with a SYN-ACK segment. The client then confirms the connection by sending an ACK segment. This process involves the following steps:

  1. SYN transmission: The client sends a connection request.
  2. SYN-ACK response: The server receives and acknowledges the request.
  3. ACK confirmation: The client confirms receipt of the acknowledgment.

Connection Termination

At the end of a connection, both parties send segments with the FIN flag set to ensure the connection is closed in a controlled manner.

Flow and Congestion Control in TCP

TCP aims to ensure efficient utilization of network resources through both flow control and congestion control mechanisms.

Flow Control

The receiver informs the sender of its buffer capacity by advertising a window size. The sender limits its data transmission rate according to this advertised window.

Congestion Control

TCP interprets packet loss as an indicator of network congestion. When a segment is lost, the sender reduces its transmission rate. TCP's congestion control mechanisms include the following:

  • Slow Start: Data transmission begins at a low rate and gradually increases.
  • Congestion Avoidance: When signs of congestion are detected, the transmission rate increases slowly.
  • Fast Retransmit: If three consecutive duplicate ACKs are received, packet loss is assumed and the lost segment is retransmitted immediately.
  • Fast Recovery: After fast retransmit, transmission continues without returning to slow start by adjusting the window size.

In environments with high error rates, such as wireless networks, classical congestion control methods can lead to unnecessary transmission rate reductions. To address this, new techniques have been developed that can distinguish the cause of packet loss.

Packet Reordering in TCP

The arrival of packets in an order different from the order in which they were sent is a significant issue for TCP. Packet reordering can cause the following problems:

  • Incorrect detection of segment loss leading to unnecessary retransmissions,
  • Unnecessary window size reductions and decreased network efficiency,
  • Disruption of the ACK flow and reduced bandwidth utilization,
  • Distorted delay estimates (deviations in RTT and RTO calculations).

To mitigate these issues, new algorithms have been developed; for example, methods such as the Eifel Algorithm attempt to detect spurious retransmissions.

Adaptation of TCP to Wireless Environments

In wireless environments, segment losses are typically caused by data corruption rather than congestion.

Therefore, TCP has been adapted to operate more efficiently in wireless environments by:

  • Accurately distinguishing the cause of packet loss,
  • Preventing unnecessary rate reductions,
  • Optimizing retransmissions.

For example, protocols such as TCP Peach and TCP Westwood are variants developed to improve performance in wireless environments.

Author Information

Avatar
AuthorGülçin ÖzerDecember 9, 2025 at 6:15 AM

Discussions

No Discussion Added Yet

Start discussion for "TCP (Transmission Control Protocol)" article

View Discussions

Contents

  • Key Features of TCP

    • TCP Header Structure

    • Connection Establishment

    • Connection Termination

  • Flow and Congestion Control in TCP

    • Flow Control

    • Congestion Control

  • Packet Reordering in TCP

  • Adaptation of TCP to Wireless Environments

Ask to Küre