DEV Community

Cover image for TCP Handshake in Computer Network
M. Oly Mahmud
M. Oly Mahmud

Posted on

1

TCP Handshake in Computer Network

The Transmission Control Protocol (TCP) is crucial to the Internet's operation. It ensures that data sent between applications over a network is delivered reliably, in the right order, and without errors. One important aspect of TCP is its three-way handshake, which sets up a connection between a client and a server before any data is actually sent.

Today we will explore how the TCP Handshake is performed.

What is the TCP Handshake?

The TCP handshake is a simple three-step process that helps set up a reliable connection between two devices on a network. It ensures that both the client and the server are ready to chat and agree on key details, like the sequence numbers for sending data.

The Process

The three-way handshake is performed in the following way.

  1. To begin the communication, the client node sends a SYN packet containing a connection request to the server.

  2. If the receiving node (server) is listening on the port, The receiving node responds with a SYN-ACK, confirming that it has heard the requesting node.

  3. The client node returns an ACK packet to the server, to let them know that, the nodes are good to send each other information.

Now, the connection is established and the data can be transmitted through the network.

Visual Representation

Consider the following figure to understand the three-way handshake.

Three-way TCP Handshake

Conclusion

The TCP three-way handshake is a key part of making sure communication is reliable in today's networks. This concept is very important for DevOps and Network Engineers to design or troubleshoot a network system. Learning his process is also important for Software Engineers.

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay