1. The Concept sliding window protocol, also known as the fallback N-step Protocol (GO-BACK-N,GBN), allows the sender to send multiple groupings (when multiple groupings are available) without waiting for confirmation, but it is limited to the number of unacknowledged groupings in the pipeline that cannot exceed a certain maximum allowable number of N. The sliding window protocol is a kind of traffic control method used by TCP, which can speed up the transmission of data. The sending window is only possible to slide forward if the receiving window is sliding forward (while also sending a confirmation). The two ends of the window in accordance with the above laws and constantly sliding forward, so this protocol is called Sliding window protocol. When both the Send window and the receive window are equal to 1 o'clock, the wait protocol is stopped. When the Send window is greater than 1, the receive window equals 1 o'clock, which is the fallback N-Step protocol. When both the sending window and the receive window are larger than 1 o'clock, the resend protocol is selected. It is stated in the agreement that a retransmission is required for an unconfirmed group within a window. The number of such groupings can be at most equal to the size of the sending window, that is, the size of the sliding window N minus 1 (because the sending window cannot be greater than (n-1), at least the receive window is greater than or equal to 1). 2. How it works TCP sliding windows are used to stage data groupings to be transferred between two computers. Each computer running the TCP protocol has two sliding windows: one for data transmission and the other for data reception. Send-side outgoing data packets are queued in the buffer queue for delivery. Groups that are grouped by sliding window boxes are the ones that can be sent up without receiving confirmation. The grouping of the left-hand flag X of the sliding window is the packet that has been received by the receiving side. As the new confirmation arrives, the window keeps sliding to the right. The TCP protocol software relies on the sliding window mechanism to solve the problem of transmission efficiency and flow control. It can send multiple data groupings before a confirmation message is received. This mechanism makes the network communication busy, improves the throughput rate of the whole network, it also solves the problem of end-to-end traffic flow control, allowing the receiving side to limit the transmission before having enough buffer to hold sufficient data. In actual operation, the size of the TCP sliding window can be adjusted at any time. Transceiver TCP protocol software in the packet Confirmation communication, also Exchange sliding window control information, so that both sides of the sliding window size can be changed according to the needs of the dynamic, to improve the efficiency of data transmission at the same time, to prevent the occurrence of congestion. Called the left edge of the window close to the right edge for the window, this behavior occurs when the data is sent and confirmed. When the right edge of the window is moved, more data is allowed to be sent, called window opening. This behavior occurs when the receiving process on the other end reads the confirmed data and releases the TCP receive cache. When the right edge moves to the left, the window is called shrinking. The Host Requirements RFC strongly recommends that this approach not be used. But TCP must be able to generate at one endThis situation is handled. If the left edge reaches the right edge, it is called a 0 window. 3. Slow start algorithm each send azimuth maintenance two windows: One is the receiver's permission window, the second is a congestion window. The number of bytes that are eventually allowed to be sent to accept the window and the minimum value of the dead window will prevail. Therefore the valid window is the one that the sender thinks is not the problem window and the receiver thinks that there is no problem in the window of the smallest. In fact, congestion control also defines a third parameter: The threshold value, the initial value is 64KB. Slow boot process: (1) When a link is established, the sender's congestion window is initialized to the maximum data segment value currently used on the link. Then send a maximum data segment, if the data segment is confirmed before the timer expires, then the Congestion window becomes 2. The congestion window grows at the exponential level later. (2) When the congestion window increases to the threshold, the exponential growth is stagnant, starting from this point, each successful transmission will cause the congestion window thread to grow (i.e., only one maximum data segment is grown at a time). (3) When the timeout occurs, the threshold is set to half of the current congestion window, and the congestion window is recharged to a maximum data segment, then the same slow-start algorithm is used to determine the processing power of the network. 4. Noun interpretation (1) Stop waiting Agreement (2) Fallback N-Step Protocol (3) Select the Retransmission GBN Protocol (GO-BACK-N,GBN) allows the sender to "populate pipelining" with multiple groupings, thus avoiding the problem of stopping waiting for the channel utilization mentioned in the protocol. However, the GBN protocol also has a performance problem. Especially when the window length and bandwidth delay product are very large, there will be a lot of grouping in the pipeline. The error of a single grouping causes GBN to retransmit a large number of groupings, many of which are not necessarily retransmission at all. As the channel error rate increases, the pipeline may be filled with packets that are not necessarily re-transmitted. The Select retransmission (SR) protocol avoids unnecessary retransmission by letting the sender near retransmit the packets that have been changed by the receiver (i.e., packet loss or damage). This individual, on-demand retransmission requires the receiving party to confirm the correctly accepted groupings individually. Use window length n again to limit the number of completed, unacknowledged groupings in the pipeline. However, unlike GBN, the sender has received an ACK for some of the groupings in the window.
Sliding Window Protocol