1. TCP path MTU Detection
(1) determine the maximum capacity of the Data Part Of The sent packet based on the MTU and the MSS carried by the peer Syn (if the peer does not specify the MSS, the default value is 536 );
(2) Open the DF flag in the IP header;
(3) If the ICMP error message is received, it indicates that the Shard is required. If the ICMP message contains the next-hop MTU information, adjust the maximum data capacity based on this value, if the ICMP message does not support this new protocol (the next hop MTU value is 0), adjust the maximum data capacity to the next possible size;
(4) the DF flag is always opened to ensure that the correct path MTU can be measured;
(5) After timeout, the system will re-query path MTU to ensure that the correct path MTU can also be used for link changes.
The advantage of TCP path MTU inquiry is:
(1) Avoid partitioning when the MTU is less than 576 of the intermediate link;
(2) Prevent the MTU of some networks on the central link from being smaller than the MTU of the network on both ends of the communication;
(3) Make full use of the link throughput.
2. Long fat Pipe
A network with a large bandwidth delay accumulation is called the longfat Network (LFN, long fat network, in bytes), and the TCP link established on LFN is called the longfat pipe.
Problems arising from the long fat pipeline:
(1) The bandwidth delay accumulation of the long fat pipe is large. The window size field in the TCP header can only declare a window of 65535 (2 ^ 16) bytes at most, so the network cannot be fully utilized, the window expansion option is proposed to declare a larger window.
(2) due to the high delay of the long fat pipe, packet loss may result in depletion of the pipe (that is, the network communication speed decreases sharply ), the fast retransmission fast recovery algorithm is used to reduce the impact of this problem, and the SACK option is also used.
(3) To increase the throughput of the long fertilizer pipe, the long fertilizer pipe generally declares a large window value, which is not conducive to RTT measurement (because TCP only has one RTT timer, TCP cannot perform the next RTT measurement before the data starting the RTT timing is ack. However, because the transmission delay is generally greater than the propagation delay, therefore, TCP usually sends the data in a window to calculate the RTT once. Therefore, you need to introduce the timestamp option to increase the frequency of testing the RTT.
(4) because the sending speed of the long fat pipe is very fast, the serial numbers of the data will be repeated in a short period of time (repeated serial numbers will appear in the gigabit network in only 34 seconds ). therefore, the paws algorithm is introduced to deal with this situation.
3. Window expansion options
To use the window expansion option, you need to enable this option at both ends of the Link (both sides) at the same time, and the expansion offset stated by both sides of the link does not need to be equal (asymmetric ), and the offset cannot be changed (fixed) after the declaration ).
TCP ignores this option when it encounters an option that it does not support. This is done to provide compatibility to some earlier versions of TCP. therefore, if a sends an extended Window option to B, and B does not support this option, the option is not included in B's response, A can only use the old window size declaration method.
4. TIMESTAMP options
The working principle of the timestamp option is to send a value that increases monotonically with time to the other party. After receiving the timestamp option, the other party returns the same value in the response segment in the subsequent ack, TCP records the sending Timestamp and response time to obtain the RTT.
The timestamp option requires 12 bytes, because the option itself is 10 bytes, and two NOP must be added to make the Protocol length a multiple of 4 (12 ).
The recommended increase speed of the timestamp option is 1 ms ~ 1000 ms/time.
The timestamp record method is to record the timestamp value of the first unordered ACK message, and respond to this value in the next ack. The advantages of doing so are:
(1) Correct Estimation of latency ack (this must be considered );
(2) The RTT calculation is true when the disordered order and packet loss problems occur during transmission.
5. Number of paws to prevent Rewinding
The essence of the paws algorithm is to use the monotonic increment of the timestamp option to determine the order of the same message. The paws algorithm does not need to synchronize time between the sender and receiver. What the receiver needs is that the timestamp value increases monotonically, and each window must increase by at least 1.
6. T/tcp: TCP extension for transactions
7. The connections, memory bandwidth, and size of the receiving window will affect the network performance, but the network speed is determined by the window size and light speed (that is, the round-trip time ).
References:
TCP/IP details
Http://www.cnblogs.com/cenhao/archive/2011/08/07/2130129.html
Http://zenhumany.blog.163.com/blog/static/1718066332010827104959433/