To establish a connection, TCP uses a 3-way handshake.
The “three-way handshake” happens thus. The originator sends an initial packet called a “SYN” to establish communication and “synchronize” sequence numbers in counting bytes of data which will be exchanged. The destination then sends a “SYN/ACK” which again “synchronizes” his byte count with the originator and acknowledges the initial packet. The originator then returns an “ACK” which acknowledges the packet the destination just sent him. The connection is now “OPEN” and ongoing communication between the originator and the destination are permitted until one of them issues a “FIN” packet, or a “RST” packet, or the connection times out.
1) Client sends SYN packet to the server
2) Server responds with SYN + ACK packet
3) Client sends back ACK + data that it requested at the first place

The “three-way handshake” happens thus. The originator sends an initial packet called a “SYN” to establish communication and “synchronize” sequence numbers in counting bytes of data which will be exchanged. The destination then sends a “SYN/ACK” which again “synchronizes” his byte count with the originator and acknowledges the initial packet. The originator then returns an “ACK” which acknowledges the packet the destination just sent him. The connection is now “OPEN” and ongoing communication between the originator and the destination are permitted until one of them issues a “FIN” packet, or a “RST” packet, or the connection times out.
1) Client sends SYN packet to the server
2) Server responds with SYN + ACK packet
3) Client sends back ACK + data that it requested at the first place

No comments:
Post a Comment
Thank You for your Comments, We will read and response you soon...