TCP Handshake is the process used to establish a TCP connection between two hosts. It is commonly known as the “three-way handshake” and ensures a reliable connection for data transfer.
Three-Way Handshake Steps
- Client → Server: SYN — The client sends a SYN (synchronize) packet to start the connection.
- Server → Client: SYN-ACK — The server responds with a SYN-ACK packet, acknowledging the request.
- Client → Server: ACK — The client sends an ACK to confirm, completing the handshake. Data transfer begins afterward.
Why TCP Handshake is Important
- Ensures proper packet ordering and delivery.
- Provides a reliable stream-based connection over TCP.
- Helps prevent certain types of attacks, such as SYN floods, using techniques like SYN cookies.
TCP Handshake and My IP
- The handshake confirms that packets from your My IP address are recognized by the server.
- Attackers using IP spoofing cannot complete a full handshake, preventing them from establishing a reliable connection.
- This process applies to both IPv4 and IPv6 networks.
FAQ
- What happens if the handshake fails? — The connection is not established; the client may retry or show an error.
- What is a SYN flood? — An attack where many fake SYN packets are sent to overwhelm a server. Mitigation techniques are required.
- Does the handshake work for IPv6? — Yes, TCP operates the same way over IPv6 networks.
- How does it relate to My IP address? — Only packets from the correct IP can complete the handshake, verifying the client’s identity.