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?
1. Hardware upgrade An ordinary P4 server can gen...
5G is accelerating. 3GPP has completed the non-st...
In January this year, BandwagonHost released a pa...
On January 11, at the 2022 (12th) China Internet ...
On January 6, the Ministry of Science and Technol...
On September 18, 2019, the fourth HUAWEI CONNECT ...
"Point and hit" is often used to descri...
Despite the sudden outbreak, this did not stop Ch...
Hengchuang Technology is a Chinese business found...
Friendhosting has launched a 30% discounts for Va...
[[335212]] This article is reprinted from the WeC...
LOCVPS (Global Cloud) launched its first promotio...
1. Project Background The 5G communication networ...
With the increase in remote office and branch off...
Yesterday I received an email from RackNerd, sayi...