The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+3 votes
Why TCP requires three way handshake why not two way is sufficient..

What is the actual use of SYN packet
asked in Computer Networks by Junior (645 points) | 112 views

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 ....

read more about it here

2 Answers

+2 votes

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    I received your syn, I ACKnowledge that I am ready for [X+1]
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]

Reference :

answered by Loyal (2.8k points)
0 votes
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 (43.9k points)

Related questions

+1 vote
1 answer
asked Oct 8, 2017 in Computer Networks by atul_21 Boss (5.1k points) | 164 views
+2 votes
2 answers
asked Feb 8, 2017 in Computer Networks by reena_kandari Boss (8.3k points) | 329 views
+1 vote
1 answer
asked Mar 10, 2017 in Computer Networks by sh!va Veteran (37.3k points) | 158 views

34,292 questions
41,038 answers
39,941 users