KIM COMPUTER


TCP (Transmission Control Protocol) Basics

TCP (Transmission Control Protocol) operates on top of the Internet Protocol (IP) and is a connection-oriented protocol that guarantees reliable data communication between two hosts (devices).

It is used when the accuracy and order of data are critical on the internet (e.g., web browsing, file transfers, email).


1. Core Principle: Ensuring Reliability

TCP's most crucial role is to ensure that data is transmitted accurately without loss or misordering. It employs the following mechanisms:

① 3-Way Handshake (Connection Establishment)

A three-step process where the client and server verify they are both ready to communicate before any data transfer begins.

  1. SYN (Synchronize): Client requests a connection to the server.
  2. SYN-ACK (Acknowledge): Server accepts the request and sends its own connection request.
  3. ACK: Client accepts the server's request.
    • Result: A Virtual Circuit is established, ready for reliable data transfer.

② Data Transfer and Acknowledgement (ACK)

After data is sent, the receiver sends an Acknowledgement (ACK) confirming receipt. If the ACK is not received within a timeout period, the data is retransmitted to prevent loss.

③ Sequence Numbers

Data packets are assigned sequence numbers. This allows the receiver to correctly reassemble the packets into the original message, even if they arrive out of order.


2. Key Features of TCP

Feature Description
Connection-Oriented A logical connection must be established via the 3-Way Handshake before any data exchange.
Reliable Guarantees that data is delivered without loss, corruption, duplication, or misordering.
Flow Control Regulates the sending speed to prevent the sender from overwhelming the receiver's buffer capacity.
Congestion Control Adjusts the transmission rate based on observed network congestion to prevent network collapse.
Full-Duplex Data can be sent and received simultaneously in both directions.

3. Limitation of TCP

Due to the overhead required for reliability (handshakes, ACKs, retransmissions, etc.), TCP is generally slower and heavier than the connectionless UDP protocol.