In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Suppose we discuss that A sends data to B, with a sending window on the A side and an receiving window on the B side.
Construct its own sending window according to the window value A given by B. if A receives the acknowledgement message from B, the value of the window is 20 and the confirmation sequence number is 31, then the receiver will construct the following window.
The front and rear edges can be motionless and forward, but the front can be moved backward (not recommended)
Let's talk about the send window.
(1) the sending window indicates that the data in it can be sent continuously before the acknowledgement Datagram is received, but what has been sent must be retained for retransmission.
(2) if the window is larger, more can be sent continuously, but only if the receiving window can receive it in time.
(3) the part along the trailing edge of the sending window indicates that it has been confirmed, so it will not move backwards. If it moves forward (received acknowledgement) and does not move (no acknowledgement is received), the front may move forward and backward, but it is not recommended to move backward, and a confirmation message may be received. Tell the source host to reduce the window.
Suppose 11 bytes were sent, but to receive an acknowledgement
P3-P1 = A send window (also known as notification window)
P2-P1 = number of bytes sent but not yet received acknowledgement
P3-P2 = number of bytes allowed to be sent but not yet sent (also known as available window)
As you can see from above, it takes three pointers to save a window.
The following assumption is that byte 31 is received, and byte 31-33 is delivered to the host, deleted, and the window is moved forward by 3 serial numbers. A colleague sends a signal to A, and the confirmation number is shi34.
All the serial numbers in A's sending window have been used up, but no more confirmation has been received and must be stopped. It may be the reason for the network. If the input has timed out, it needs to be retransmitted.
As we talked about caching earlier, let's talk about caching and windows:
(1) the buffers and serial numbers are limited and can be reused.
The above is the send buffer, which mainly contains the data sent by the application to the sender (not sent) and the data that tcp has sent but has not received confirmation.
Receive cach
(1) those that arrive sequentially, but are not received by the application, do not arrive sequentially.
Note:
(1) although the sender's window is determined according to the receiver's confirmation data, the two sides are not always the same size because of the network time delay.
(2) there is no mandatory tcp for those who arrive out of order, but it is usually saved in the window for a while.
(3) tcp requires that the receiver must have the function of cumulative acknowledgment, which can reduce network communication, but the time of push and transmission is different and too long, otherwise the mechanism of retransmission will occur, usually no more than (0.5s).
Choice of timeout retransmission time:
Every time TCP sends a message segment, it sets a timer for that message segment. As long as the retransmission time set by the timer has not been confirmed, the message segment will be retransmitted. Because there is a great difference in the probability distribution of round-trip experiments between the data link layer and the transport layer, it is necessary to choose an appropriate timeout retransmission time.
The round-trip delay of the message segment refers to the difference between the time of receipt of the acknowledgement message and the time sent by each message segment. The average round-trip delay RTT of each message segment is obtained by weighted average of the round-trip delay samples of each message segment. The calculation formula is as follows:
The average round-trip delay RTT= α × (old RTT) + (1-α) × (new round-trip delay sample), the typical value of 1 ≤ α < 1 is 7 ≤ 8.
Even with a good RTT, it is not easy to choose an appropriate timeout retransmission time RTO (Restransmission Time out). Obviously, RTO is larger than RTT. The calculation formula is RTO = β × RTT, β > 1, and the recommended formula is 2.
Select confirm SACK
The receiver received two byte blocks that are not contiguous with the previous byte stream. If the sequence numbers of these bytes are within the receiving window, the receiver receives the data first, but accurately tells the sender the information so that the sender does not repeat the received data.
Each byte block with discontiguous front and back bytes has two boundaries: the left boundary and the right boundary. These boundaries are marked with four pointers in the figure. The left boundary of the first byte block is L1 = 1501, but the right boundary R1 = 3001. The left boundary indicates the sequence number of the first byte of the byte block, but the right boundary minus 1 is the last sequence number in the byte block. The left boundary of the second byte block is L2 = 3501 and the right boundary is R2 = 4501.
If you want to use SACK, then this information needs to have an optional header, and you can only use a maximum of 4 bytes fast 4 "4" 2 "32 + 2 (one byte indicates the SACK option, and the other indicates how many bytes this option uses)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.