Learn what a three-way handshake is and why it’s important in network communications.
![[Featured image] An IT support professional wearing glasses works on their laptop in a server room.](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://images.ctfassets.net/wp1lcwdav1p1/1wg3MjkIt5BcMrIcdJ72BE/150551feb787afc2b0c7b6b60bb1d657/GettyImages-1347879996.jpg?w=1500&h=680&q=60&fit=fill&f=faces&fm=jpg&fl=progressive&auto=format%2Ccompress&dpr=1&w=1000)
A three-way handshake is a three-step process in networking that establishes a transmission control protocol (TCP) connection on an internet network.
A three-way handshake involves the following three steps: synchronize (SYN), synchronize-acknowledge (SYN-ACK), and acknowledge (ACK).
A three-way handshake creates a connection between two computers for the passing of information, but a four-way handshake terminates that connection with a pair of finish (FIN) and ACK messages.
You can view a three-way handshake as important because it’s a key mechanism for creating a secure connection over a TCP/IP network.
Explore the intricacies of the three-way handshake, how it’s performed, and why it’s essential in establishing a reliable connection for network communications. If you’re ready to begin developing your skill set in this field, enroll in the Google IT Support Professional Certificate. In as little as three months, you can learn about computer networking, IT infrastructure, version control, systems administration, and more.
In networking, a three-way handshake is a process that's used to initiate a connection in a transmission control protocol/internet protocol (TCP/IP) network. TCP is responsible for ensuring data is delivered correctly between computers on an internet network. It’s similar to a handshake between two people: one person extends their hand, the other shakes it, and then the first person acknowledges and retracts their hand.
It involves the following three steps: synchronize (SYN), synchronize-acknowledge (SYN-ACK), and acknowledge (ACK).
Here's how it works:
1. SYN: The initiating computer (or active client) sends a synchronize sequence number (SYN) packet to the receiving computer (usually a server). The SYN packet value is set to an arbitrary number (e.g., 100) to “ask” if any open connections are available.
2. SYN-ACK: If the receiving computer (also known as a passive client) has open ports that can accept the connection, it sends back a synchronize-acknowledge (SYN-ACK) packet to the initiating computer. The packet includes two numbers: the receiving computer’s own SYN, which can be any arbitrary number as well (e.g., 200), and the ACK number, which is the initiating computer’s SYN plus one (e.g., 101).
3. ACK: The initiating computer (active client) then sends an acknowledge sequence number (ACK) packet back to the receiving computer. This ACK packet is an acknowledgement of receipt of the SYN-ACK packet. The packet value is set to the receiving computer’s SYN (sent in step two) plus one again (e.g., 201). With this final step, the connection is established, and data transmission can begin.
These steps acknowledge the connection parameters on each side, stabilize the connection, and verify the serial numbers of each device. Each side must acknowledge a sequence number that is one larger than the one sent because the acknowledgement field relies on the next sequence number expected, which in turn acknowledges all of the earlier sequence numbers.
Where the three-way handshake creates a connection allowing two computers to seamlessly pass information back and forth, a four-way handshake terminates that connection with a pair of finish (FIN) and ACK messages.
The three-way handshake is a cornerstone of the TCP protocol because it establishes the connection parameters and reliable communication between two computers before actual data transmission begins. Much of our online activity uses three-way handshakes. It's a key mechanism for creating a secure connection over a TCP/IP network. For example, when you open a web browser and search for something on the internet, a three-way handshake connects the client-facing web browser with the internet server. Without proper synchronization, malicious actors such as black hat hackers could establish connections to vulnerable systems.
You can learn about TCP connections, OSI models, and how devices communicate from the experts at Microsoft by enrolling in the online course Introduction to Secure Networking.
Power shell
Read more: Network Certification: 6 Options for Your IT Career
Subscribe to our weekly LinkedIn newsletter, Career Chat, for industry updates, tips, and trends. Then, explore free IT resources to optimize your professional growth:
Watch on YouTube: 7 IT Career Paths to Explore (And How to Start)
Explore trends: How AI is transforming IT
Learn the terminology: Information Technology (IT) Terms: A to Z Glossary
Accelerate your career growth with a Coursera Plus subscription. When you enroll in either the monthly or annual option, you’ll get access to over 10,000 courses.
Editorial Team
Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...
This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.