top of page
Search
understandingdevop

How TCP 3-way handshake works?

Updated: May 17, 2020

Let's start with an example of our famous people Alice and Bob.

So here Alice is the client and Bob is server. Alice wants to establish a TCP connection with Bob.

- First Alice will send SYN data packet over the network to server Bob (Alice is trying to access www.google.com, so for that it will need to establish a connection with google's server on port 80/443 ). 1st way

- Bob's server must have port open which Alice is trying to access, and ready to initiate a new connection. if yes, Bob server will send an ACK+SYN packet back to Alice.- 2nd way

- Alice receives the SYN/ACK packet from the server and responds back with ACK packet and connection is established. - 3rd step.


I have captured the tcpdump output on Wireshark:-


SYN - 1st way

SYN-ACK - 2nd way

ACK - 3rd way

Connection Established!





5 views0 comments

Comments


Post: Blog2_Post
bottom of page