Hello everyone, I am Xiaolin. I saw an old man asked a question on the website. To put it simply, why during the TCP three-way handshake, if the confirmation number of the SYN-ACK message received by the client does not meet the expectation, why does it return RST instead of discarding it? If I say return to RST, does it mean return to RST? Of course not, I also confirmed it by reading the RFC standard. Let me describe the scene first:
The above process is the process of TCP three-way handshake to prevent the establishment of historical connections. The reason why TCP needs three-way handshake is firstly to prevent confusion caused by old repeated connection initialization, and secondly to reliably synchronize the sequence numbers of both parties. Why is it designed that when the client receives a SYN-ACK message that does not meet its expectations, it returns RST instead of discarding it? Now let's assume it is discarded and see what happens? It can be seen that when a client connected in the SYN_SENT state receives a SYN-ACK message that does not meet expectations, if the selected processing is "discard", both parties will trigger a timeout retransmission until the maximum number of retransmissions is reached before entering the CLOSE state. This process takes 10-20 seconds. From the client's perspective, it is difficult to establish a connection with the server because an old connection with the same four-tuple already exists on the server. If the server connection is not terminated, the client's new connection (SEQ=100) cannot be confirmed. This is because in the non-LISTEN state, if a SYN is received, a challenge ack is returned. This ack does not confirm the receipt of the SYN message, but continues to reply to the last ACK sent. Does it feel like the old connection (SEQ=90) on the server is just sitting there doing nothing? Therefore, the task of killing the old connection on the server is left to the client. When a client connected in the SYN_SENT state receives a SYN-ACK message that does not meet its expectations, it directly sends RST to the server, killing the server's old connection so that the client's new connection can be established quickly. What do you think? TCP is full of details! |
<<: HTTP caching is enough to read this article
>>: What is the function of each layer in the computer network layered model?
The conversion from the HTTP protocol for naked d...
Author | Cai Zhuliang 1. Directory Network Protoc...
[[425673]] This article is reprinted from the WeC...
The design of the third layer switch is based on ...
01/ Let’s start with the developers’ worries When...
Aruba, a subsidiary of Hewlett Packard Enterprise...
Recently, the Ministry of Industry and Informatio...
100M broadband is not necessarily fast! When it c...
The fifth generation of network bandwidth arrives...
A few days ago, I talked with my colleagues about...
In recent times, 5G has become popular in the cir...
[[188584]] When it comes to Internet companies in...
Recently, the first quarter results of the three ...
Network latency Network delay refers to the time ...
Recently, Gartner, a global authoritative technol...