Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
749 views3 pages

TCP 3-Way Handshake

The TCP 3-way handshake is a process that establishes a connection between a client and server. It involves 3 steps: 1) the client sends a SYN message to the server with a sequence number, 2) the server responds with a SYN-ACK message containing its own sequence number and acknowledging the client's, and 3) the client sends an ACK to the server acknowledging its sequence number, completing the handshake. This allows both sides to reliably synchronize sequence numbers and securely set up the connection before transmitting data.

Uploaded by

akademi menembak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
749 views3 pages

TCP 3-Way Handshake

The TCP 3-way handshake is a process that establishes a connection between a client and server. It involves 3 steps: 1) the client sends a SYN message to the server with a sequence number, 2) the server responds with a SYN-ACK message containing its own sequence number and acknowledging the client's, and 3) the client sends an ACK to the server acknowledging its sequence number, completing the handshake. This allows both sides to reliably synchronize sequence numbers and securely set up the connection before transmitting data.

Uploaded by

akademi menembak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

TCP 3-Way Handshake (SYN, SYN-ACK,ACK)

What is TCP Three-Way HandShake?


Three-Way HandShake or a TCP 3-way handshake is a process which is used in a TCP/IP network to
make a connection between the server and client. It is a three-step process that requires both the client
and server to exchange synchronization and acknowledgment packets before the real data
communication process starts.

Three-way handshake process is designed in such a way that both ends help you to initiate, negotiate,
and separate TCP socket connections at the same time. It allows you to transfer multiple TCP socket
connections in both directions at the same time.

In this Networking tutorial, we will explain:

1. What is TCP Three-Way Hand Shake?


2. TCP message types
3. TCP Three-Way Handshake Process
4. Real-world Example

TCP message types


TCP Three-Way Handshake Process
TCP traffic begins with a three-way handshake. In this TCP handshake process, a client needs to
initiate the conversation by requesting a communication session with the Server:

Step 1: In the first step, the client establishes a connection with a server. It sends a segment with SYN
and informs the server about the client should start communication, and with what should be its
sequence number.
Step 2: In this step server responds to the client request with SYN-ACK signal set. ACK helps you to
signify the response of segment that is received and SYN signifies what sequence number it should
able to start with the segments.
Step 3: In this final step, the client acknowledges the response of the Server, and they both create a
stable connection will begin the actual data transfer process.

Real-world Example

Here is a simple example of the three-way handshake process that is consists of three steps:

 Host X begins the connection by sending the TCP SYN packet to its host destination. The
packets contain a random sequence number (For example, 4321) that indicates the beginning
of the sequence numbers for data that the Host X should transmit.
 After that, the Server will receive the packet, and it responds with its sequence number. It's
response also includes the acknowledgment number, that is Host X's sequence number
incremented with 1 (Here, it is 4322).
 Host X responds to the Server by sending the acknowledgment number that is mostly server's
sequence number that is incremented by 1.
After the data transmission process is over, TCP automatically terminates the connection between two
separate endpoints.

Summary
1. TCP 3-way handshake or three-way handshake or TCP 3-way handshake is a process which is
used in a TCP/IP network to make a connection between server and client.
2. Syn use to initiate and establish a connection
3. ACK helps to confirm to the other side that it has received the SYN.
4. SYN-ACK is a SYN message from local device and ACK of the earlier packet.
5. FIN is used for terminating a connection.
6. TCP handshake process, a client needs to initiate the conversation by requesting a
communication session with the Server
7. In the first step, the client establishes a connection with a server
8. In this second step, the server responds to the client request with SYN-ACK signal set
9. In this final step, the client acknowledges the response of the Server
10. TCP automatically terminates the connection between two separate endpoints.

You might also like