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?
Recently, a portal website published an article p...
In March this year, the headquarters building of ...
The CCBN-BDF Forum was held at the same time as t...
Scientists at the Technical University of Munich ...
As of the end of 2020, 718,000 5G base stations h...
Starlink will provide 10Gbps network speeds in th...
Under the tough order of "admit everyone who...
[[419885]] What's the bandwidth of your home ...
Have you noticed that many apps now have a line o...
Currently, online video conferencing has become a...
The three major US mobile operators AT&T, T-M...
This article provides a detailed summary of Ether...
[[351004]] The ability to upload files is a key r...
When China leads the world in 5G technology, the ...