What is a computer triple handshake

  Kiến thức lập trình

First handshake:
The client sets the TCP packet flag SYN to 1 and randomly generates a sequence number value seq=J, which is stored in the Sequence Number field at the beginning of TCP. It indicates the port of the server that the client intends to connect to and sends the packet to the server. After sending, the client enters the SYN_SENT state and waits for confirmation from the server.

Second handshake:
After receiving the data packet, the server side knows from the flag SYN=1 that the client requests to establish a connection. The server side sets the TCP packet flag SYN and ACK to 1, ack=J+1, randomly generates a sequence value seq=K, and sends the data packet to the client to confirm the connection request. The server side enters the SYN-RCVD state.

Third handshake:
After receiving the confirmation, the client checks whether the ack is J+1 and ACK is 1. If it is correct, set the flag bit ACK to 1, ack=K+1, and send the data packet to the server. The server checks whether the ack is K+1 and ACK is 1. If it is correct, the connection is established successfully. The client and server enter the ESTABLISHED state, complete three handshakes, and then the client and server can start transmitting data.

Enable more people to understand computers.

New contributor

yxd is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT