Computer Networks Essentials / Transport Layer

TCP Features

πŸ€” What is TCP? (Quick Recall)

TCP (Transmission Control Protocol) is a connection-oriented, reliable transport layer protocol.

πŸ“Œ In simple words:

TCP makes sure that data reaches the destination correctly, completely, and in the right order.


🧠 Why TCP is Special?

TCP is designed for applications where:

  • Data loss is not acceptable

  • Order of data must be preserved

  • Communication must be reliable

πŸ“Œ That’s why TCP has many built-in features.


🧩 Major Features of TCP

TCP provides the following important features:

1️⃣ Connection-Oriented Communication

2️⃣ Reliable Data Transfer

3️⃣ Sequencing & Ordered Delivery

4️⃣ Error Control

5️⃣ Flow Control

6️⃣ Congestion Control

7️⃣ Full-Duplex Communication

8️⃣ Multiplexing & Demultiplexing

We’ll explain each feature clearly πŸ‘‡


πŸ”— 1. Connection-Oriented Communication

Before data transfer:

  • TCP establishes a logical connection

  • Uses 3-way handshake

1️⃣ SYN

2️⃣ SYN-ACK

3️⃣ ACK

πŸ‘‰ Only after this, data transfer begins.

  • Both sender & receiver are ready

  • Reduces data loss

πŸ“Œ Like making a phone call before talking πŸ“ž.


βœ”οΈ 2. Reliable Data Transfer

TCP guarantees:

  • No data loss

  • No duplication

  • Correct delivery

  • Acknowledgments (ACK)

  • Retransmissions

  • Sequence numbers

If segment 3 is lost:

  • Receiver does not ACK

  • Sender retransmits segment 3

πŸ‘‰ Data reliability ensured βœ”οΈ


πŸ”’ 3. Sequencing & Ordered Delivery

Each TCP segment is assigned a sequence number.

πŸ“Œ This helps:

  • Identify missing segments

  • Arrange segments in correct order

Internet paths may differ:

  • Segment 5 may arrive before segment 4

πŸ‘‰ TCP reorders them correctly.


❌ 4. Error Control

TCP uses:

  • Checksum to detect errors

  • ACKs to confirm receipt

  • Retransmission if error occurs

πŸ“Œ Corrupted segments are discarded, not used.

  • Checksum mismatch β†’ error detected

  • Segment retransmitted


🚦 5. Flow Control

Flow control ensures:

  • Sender does not overwhelm receiver

πŸ“Œ TCP uses Sliding Window Protocol.

  • Receiver advertises window size

  • Sender sends only that much data

  • Window slides as ACKs arrive

πŸ‘‰ Prevents buffer overflow βœ”οΈ


🚧 6. Congestion Control

Congestion occurs when:

  • Network is overloaded

  • Too many packets β†’ packet loss

  • Slow Start

  • Congestion Avoidance

  • Fast Retransmit

  • Fast Recovery

πŸ“Œ TCP adjusts sending rate automatically.


πŸ”„ 7. Full-Duplex Communication

TCP allows:

  • Data transfer in both directions

  • At the same time

πŸ“Œ Sender ↔ Receiver simultaneously.

  • Uploading and downloading at the same time.


πŸ”€ 8. Multiplexing & Demultiplexing

🧠 What is Multiplexing?

  • Multiple applications send data

  • TCP uses port numbers to identify them

🧠 What is Demultiplexing?

  • Receiver delivers data to correct application

  • Based on port numbers

πŸ“Œ Enables:

  • Browser

  • Email

  • File transfer

    all at once βœ”οΈ


🧠 TCP Features Summary Table

Feature

Explanation

Connection-Oriented

Uses handshake

Reliable

ACK + Retransmission

Sequencing

Correct order delivery

Error Control

Checksum

Flow Control

Sliding window

Congestion Control

Rate adjustment

Full Duplex

Two-way communication

Multiplexing

Uses port numbers


🧠 Why TCP is Heavier than UDP

Because TCP includes:

  • Connection setup

  • Reliability checks

  • Flow & congestion control

πŸ“Œ That’s why:

  • TCP β†’ Slower but safe

  • UDP β†’ Faster but risky


🧠 Memory Trick

TCP = SAFE protocol

  • Sequence

  • Acknowledgment

  • Flow control

  • Error control


⭐ One-Line Summary

πŸ”Ή TCP provides reliable, ordered, and congestion-controlled communication through connection-oriented data transfer.