Some three-way handshake interview summary

A picture is worth a thousand words. Look at the three-way handshake process diagram.

 

 
The first handshake: Client SYN flag bit is set to 1, randomly generates a value X = SEQ , and the packet is sent to the Server, Client enters the SYN_SENT state , waiting for acknowledgment Server. (2) The second handshake: Server receives the packet data from the flag bit SYN = 1 know Client requests to establish a connection, Server SYN and ACK flag bit are set to 1, ack = x + 1, to generate a random value seq = Y , and the data packet to the connection request to confirm Client, Server enters SYN_RCVD state . (3) third handshake: the Client receives acknowledgment, checking whether the ack x + 1, ACK is 1, then if the correct ACK flag is set to 1, ack = K + 1, and the data packet to Server, Server ack check whether y + 1, ACK is 1, if correct, the connection is established, Client and Server enters eSTABLISHED state , complete the three-way handshake, then you can begin to transfer data between Client and Server.

Note: bold above have to ask, such as the serial number of the first data sent from the client to the server is how come? State during the client and server three-way handshake?

Another: If the handshake third time, the client does not receive the packet sent by the server, how would you do?

A: retransmission will continue until success or timeout.

Guess you like

Origin www.cnblogs.com/kevin-lee123/p/11635425.html