This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11976|Reply: 0

[Network Protocol] The three-way handshake process of the TCP protocol

[Copy link]
Posted on 1/5/2015 12:07:30 PM | | |
1. TCP handshake protocol

In the TCP/IP protocol, the TCP protocol provides reliable connection services by using a three-way handshake to establish a connection.

First handshake: When establishing a connection, the client sends a syn packet (syn=j) to the server and enters the SYN_SEND state, waiting for the server to confirm.

The second handshake: When the server receives the SYN packet, it must confirm the customer's SYN (ack=j+1), and also send a SYN packet (syn=k), that is, SYN+ACK packet, at which time the server enters the SYN_RECV state.

Third handshake: The client receives the SYN+ACK packet from the server and sends the confirmation packet ACK (ack=k+1) to the server.

After three handshakes, the client and server begin to transfer data, and there are some important concepts in the above process:

Unconnected Queue: In the three-way handshake protocol, the server maintains an unconnected queue that opens an entry for each client's SYN packet (syn=j) that indicates that the server has received the SYN packet and issues a confirmation to the customer, awaiting the customer's confirmation packet. The connection identified by these entries is in a Syn_RECV state on the server, and when the server receives a confirmation packet from the customer, the entry is deleted and the server enters the ESTABLISHED state.
Backlog parameter: Indicates the maximum number of unconnected queues.

SYN-ACK Retransmission Times If the server sends the SYN-ACK packet and does not receive the customer confirmation packet, the server performs the first retransmission, waits for a period of time without receiving the customer confirmation packet, and performs the second retransmission. Note that the waiting time for each repass is not necessarily the same.

Semi-connection survival time: refers to the maximum time that an entry in the semi-connection queue survives, that is, the maximum time from the time the service receives the SYN packet to the time when the packet is confirmed to be invalid, and the time value is the sum of the maximum waiting time for all retransmission request packets. Sometimes we also call semi-connected survival time time, SYN_RECV survival time.





Previous:Software cracks common assembly instructions
Next:TCP three-way handshake process basics
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com