TCP Handshakes and 3-Way Handshakes

Demystifying TCP: Its Prominence, a Visual Guide to TCP Handshakes, and Connection Establishment

TCP Handshakes and 3-Way Handshakes

Imagine trying to have a conversation where you’re never quite sure if the other person heard you—or if they’re even listening. Communication like that would be chaotic, right? On the internet, devices need a way to ensure they’re on the same page before exchanging data.

That’s where TCP (Transmission Control Protocol) comes in.

TCP is like a handshake before a conversation—it sets the ground rules, makes sure both sides are ready, and establishes trust. At its core is the 3-way handshake, a process that might sound technical but is essential for reliable communication.

In this article, we’ll explore what makes TCP so important, how the 3-way handshake works, and why it’s crucial for the seamless internet experiences we often take for granted.

What is Transmission Control Protocol?

TCP (Transmission Control Protocol) is one of the core protocols of the Internet Protocol Suite, commonly known as TCP/IP. It is responsible for ensuring reliable, ordered, and error-free communication between devices over a network. It operates at the Transport Layer (Layer 4) of the OSI model and is widely used for most types of data transmission, such as web browsing, file transfers, and email.

To get a better idea of this I have create an analogy for you think of it like this way

TCP is like a traffic manager for the internet, ensuring every piece of data arrives where it should.

How the Internet Says “Hello“ : A Visual Guide To TCP Handshakes

How it Works »

TCP establishes a connection through a 3-way handshake or acknowledgment. Unlike the connectionless protocol UDP (User Datagram Protocol), TCP ensures the connection first, making it reliable. Let’s say you order products online. The company provides basic details on your package to ensure its proper and seamless delivery, such as:

  • They send you an email (e.g., “Your order has been dispatched”).

  • They include your address, pin code, and order number.

  • They indicate how many packages are included in one order (e.g., package 1 of 2, package 2 of 2).

  • Finally, they ask for your feedback.

This process flows as follows.

This is a real-life example I have walked through now you have seen this terminology, grasp how TCP works

Reliable Connection In TCP

  • Ordered - Data is transmitted in packets(information jargon), and TCP ensures that packets arrive in the correct order.

  • Reliable - TCP ensures that each data packets are delivered accurately

  • Three-Way Handshake:
    Before any data is transmitted, TCP establishes a connection between the sender and the receiver using the following steps:

    • SYN (Synchronize): The sender sends a request to the receiver to initiate the connection.

    • SYN-ACK (Synchronize-Acknowledge): The receiver responds, acknowledging the sender's request and indicating readiness.

    • ACK (Acknowledge): The sender acknowledges the receiver’s response, and the connection is established.

In example of ordering products online


Conclusion →

In conclusion, the 3-way handshake of TCP is an essential process that ensures reliable communication on the internet. Just like ordering a product online, where a confirmation and acknowledgment process ensures that everything is in order, TCP ensures that data packets are delivered accurately, in the correct order, and without errors. The reliability and orderliness provided by TCP are crucial for the seamless online experiences we rely on every day, whether we're browsing the web, sending emails, or transferring files. Understanding how TCP works gives us a deeper appreciation for the invisible infrastructure that makes the internet function smoothly.

💡
More Articles - Demystifying the Web