User Tools

Site Tools


wiki:tcp_handshaking_process

What is TCP handshaking :

The TCP handshaking refers to the process by which two endpoints establish a connection using the Transmission Control Protocol (TCP), which is one of the core protocols of the Internet Protocol (IP) suite. The TCP handshake is a three-way process that involves the following steps:

  1. SYN: The first endpoint sends a SYN (synchronize) packet to the second endpoint, indicating its intention to establish a connection.
  1. SYN-ACK: The second endpoint receives the SYN packet and responds with a SYN-ACK (synchronize-acknowledge) packet, indicating that it has received the SYN packet and is willing to establish a connection.
  1. ACK: The first endpoint receives the SYN-ACK packet and responds with an ACK (acknowledge) packet, indicating that it has received the SYN-ACK packet and is ready to start exchanging data with the second endpoint.

At this point, the TCP connection is considered to be established, and the two endpoints can start sending data to each other. Once the data exchange is complete, either endpoint can initiate a TCP connection teardown process to close the connection.

The TCP handshake is a critical part of the TCP protocol, as it helps to ensure reliable and efficient communication between endpoints by establishing a clear and well-defined connection between them. The three-way handshake also provides a mechanism for detecting and correcting errors or inconsistencies in the transmission of data, helping to ensure that data is transmitted accurately and reliably across the network.

The above process of communication between devices over the internet happens according to the current TCP/IP suite model(stripped out version of OSI reference model). The Application layer is a top pile of a stack of TCP/IP models from where network referenced applications like web browsers on the client-side establish a connection with the server. From the application layer, the information is transferred to the transport layer where our topic comes into the picture. The two important protocols of this layer are – TCP, UDP(User Datagram Protocol) out of which TCP is prevalent(since it provides reliability for the connection established). However, you can find an application of UDP in querying the DNS server to get the binary equivalent of the Domain Name used for the website.

Handshake Example with Packet Tracer

wiki/tcp_handshaking_process.txt · Last modified: 2023/04/11 07:08 by summit