49 views
Why TCP requires three way handshake why not two way is sufficient..

What is the actual use of SYN packet

Okay use two-way handshaking ...client send SYN and server send ACK in response..

so client to server connection is established means client is sure that if it sends data , receiver is there to receive...But what about server to client as there is no confirmation(ACK) from client to server so server can never know that whether client is receiving response or not.....

SYN packet is data less packet , used for synchronization between both parties ....

https://tools.ietf.org/html/rfc793#section-2.6

+1 vote

Why not just use a two-way handshake? The short answer is because a two way handshake would only allow one party to establish an ISN(Initial Sequence Number), and the other party to acknowledge it. Which means only one party can send data.

But TCP is a bi-directional communication protocol, which means either end ought to be able to send data reliably. Both parties need to establish an ISN, and both parties need to acknowledge the other's ISN.

Actual use of SYN packet

Sequence number doesn't start at 0. It starts at the ISN (Initial Sequence Number), which is a randomly chosen value. And since TCP is a bi-directional communication, both parties can "speak", and therefore both must randomly generate an ISN as their starting Sequence Number. Which in turn means, both parties need to notify the other party of their starting ISN.

So you end up with this sequence of events for a start of a TCP conversation between Alice and Bob:

Alice ---> Bob    SYNchronize with my Initial Sequence Number of X
Alice <--- Bob    SYNchronize with my Initial Sequence Number of Y
Alice ---> Bob    I received your syn, I ACKnowledge that I am ready for [Y+1]
answered ago by (131 points) 3
Two handshaking is not enough to establish a connection. because when client initiates the connection to server, then both server and client have to acknowledge to each other.

SYN paacket is sent to establish the connection.
answered by Veteran (14.9k points) 6 19 58

+1 vote