What are packets and what is a 3 way handshake?

Packets and the 3-way handshake are fundamental concepts in the realm of computer networking, especially within the context of the Transmission Control Protocol (TCP), which is a key component of the Internet protocol suite.


Packets are the basic units of data that are transmitted over a network. When you send information across the internet, whether it's an email, a web page request, or a file transfer, the data is divided into smaller, manageable pieces known as packets. Each packet contains both the data payload (a piece of the whole data) and control information, such as the source and destination addresses, which helps network devices route the packet to its final destination. Once all packets reach their destination, they are reassembled in the correct order to reconstruct the original message or file.

3-Way Handshake

The 3-way handshake is a process used in TCP networks to establish a reliable connection between a client and a server. TCP is a connection-oriented protocol, which means that a connection must be established before two devices can start communicating. The 3-way handshake ensures that both the sender and receiver are ready to transmit and receive data, and that a communication channel is established. The process involves three steps:

  1. SYN: The client sends a TCP segment with the SYN (synchronize) flag set to the server to initiate a connection.
  2. SYN-ACK: The server responds with a TCP segment that has both the SYN and ACK (acknowledge) flags set, acknowledging receipt of the client's SYN request.
  3. ACK: The client sends an ACK segment back to the server, acknowledging receipt of the server's SYN-ACK packet.

After these three steps are successfully completed, the TCP connection is established, and data transmission can begin. This process is crucial for the reliable transmission of data over the internet, ensuring that connections are established without errors before any data is exchanged.

You should also read:

What is IPSEC?

IPsec (Internet Protocol Security) is a suite of protocols designed to secure Internet Protocol (IP) communications by authenticating and encrypting each IP packet…

What are DNAT and SNAT?

DNAT (Destination Network Address Translation) and SNAT (Source Network Address Translation) are two types of Network Address Translation (NAT) techniques used in computer…