We all know that TCP is a reliable, connection-oriented transport layer protocol. We always hope that TCP can transmit data as quickly as possible. If there is such a situation that the sender sends data very quickly and the receiver has exhausted its resources and has no time to receive it, then the excess data will be discarded, which violates the principle of TCP reliability.
Therefore, it is necessary to introduce a method of flow control: to prevent the sender from sending too fast, so that the receiver can receive the data smoothly without causing congestion of the network link. Ideas Following this idea: let the sender not send too fast. Then let the receiver control the sender's data size, and notify the sender how much space is left to receive data each time it responds. Of course, the actual interaction is not that simple, it just provides a way of thinking. Using this idea, the sliding window method was born. Sliding Window The sliding window is like a window that tells the sender the size of the data that can be sent. It can also be said that the window marks the size of the receiver's buffer. The window size also indicates how much data can be sent at a time, and this window can slide, hence the name sliding window. How to tell the sender the window size? How to inform the sender of the window size? Do we need to resend a packet of data to tell the other party? This is obviously unreasonable. We can use the confirmation response packet cleverly. Having a confirmation response packet is not enough. What if it is the first interaction? Therefore, we need to inform the other party during the three-way handshake. (rwnd means receiving window) In the original confirmation response strategy, each time data is sent, an Ack response is required. The next data segment will be sent only after receiving the Ack. What if the sender does not receive the Ack response? This method is too inefficient. With the use of a sliding window, data can be sent multiple times as long as it does not exceed the other party's window size. This greatly improves efficiency. Sliding Window Details
Examples A sends data to B. When the connection is established, B tells A: "My receiving window rwnd = 400 (bytes). Note: The capital ACK above the arrow in the figure represents the confirmation bit ACK in the header, and the lowercase ack represents the value of the confirmation field. The above process is as follows:
|
<<: Summarize various issues between wireless AP and AC of WiFi system
Aoyozhuji is a long-established foreign VPS servi...
[[267637]] On June 6, China officially issued 5G ...
1. The harder you work, the more anxious you beco...
The coronavirus outbreak has had an unprecedented...
1. Closed container closed network mode It is equ...
The networking world is known for widespread chan...
As a non-rich person, have you ever applied for v...
I clearly entered the website address of a portal...
edgeNAT launched its first anniversary celebratio...
[[433169]] The Wi-Fi Alliance announced on Tuesda...
SaltyfishTech, Saltyfish Cloud, is a Chinese host...
[[400280]] It is raining in Hangzhou today, and S...
Recently, the three major operators represented b...
On April 17, during the 2018 Huawei Analyst Confe...