Back to course

TCP (Transmission Control Protocol) Overview

Networking Fundamentals: The 0 to Hero Guide

Lesson 23: TCP (Transmission Control Protocol) Overview

TCP is the dominant protocol at the Transport Layer (L4) for applications that require guaranteed data delivery, reliability, and ordered sequencing. It is considered a connection-oriented protocol.

Key Characteristics of TCP

1. Connection Establishment (The Three-Way Handshake)

TCP requires a formal setup phase before data transfer begins. This ensures both parties are ready to communicate.

  1. SYN (Synchronize): The client sends a SYN packet to the server, requesting a connection.
  2. SYN-ACK (Synchronize-Acknowledge): The server responds, acknowledging the request and offering its own sequence number.
  3. ACK (Acknowledge): The client sends a final ACK, confirming the connection is established.

2. Guaranteed Delivery (Reliability)

TCP ensures reliability through:

  • Sequencing: It assigns a sequence number to every segment, allowing the receiver to reassemble them in the correct order.
  • Acknowledgement (ACK): The receiver must send an ACK back to the sender for every segment received. If the sender doesn't receive an ACK within a certain time, it retransmits the data.

3. Flow Control and Windowing

TCP uses a window size to control how much unacknowledged data can be sent at one time. This prevents a fast sender from overwhelming a slow receiver.

Applications Using TCP

  • Web Browsing (HTTP/HTTPS)
  • File Transfer (FTP)
  • Email (SMTP, POP3, IMAP)

Motto: TCP prioritizes quality and reliability over speed.