当前位置:网站首页>TCP fast retransmission sack mechanism
TCP fast retransmission sack mechanism
2022-07-04 11:20:00 【Ascetic monk runnercai】
First, let's look at a netizen question :
Questions from netizens
Here is an explanation for the blogger about the doubling of overtime retransmission time , Because after timeout retransmission ,RTT Time will double , Previously, it was thought that doubling was only for the current TCP package , I didn't expect that it was all connected TCP Of RTT Time doubling .
Another problem with overtime retransmission is , Find out 2 The number is out of time , that 3 Do you want to retransmit the number , The answer is yes , Need to retransmit , That's why a bag is lost , All subsequent packets are retransmitted , And when retransmitted RTT It's doubled , This leads to very poor efficiency .
And the timeout retransmission will cause the sliding window to change .
Another strange thing is , Why is there no trigger for fast retransmission , See the blog text for details , Fast retransmission means that the receiver will send three packets when it finds a packet loss ack To tell the sender about the packet loss , The package needs to be sent again , This will be shorter than the timeout , If it's sending sack Of ACK package , It will be more efficient . Specifically SACK The following is about .
TCP Overtime retransmission and fast retransmission
ACK Delay confirmation mechanism :
One 、ACK Definition
TCP Agreement , After the receiver successfully receives the data , Will reply one ACK Data packets , It means that you have confirmed the receipt of ACK All the data in front of the confirmation number .
ACK The length of the field is 32 position , Can express 0~2^32-1 Between the value of the .
Two 、ACK effect
The sender did not receive the server's ACK After confirming the package , It will resend TCP Data packets . The sender received it ACK, Indicates that the receiver has received the data , Ensure the reliability of the data .
3、 ... and 、ACK Mechanism
After receiving the data , Not immediately to the sender ACK Of . This can be caused by :
1、 Before the serial number of the received data packet, there are packets to be received . Because when the sender sends data , You don't have to wait until the data was sent last time Ack You can continue sending TCP package , And these TCP The order in which packets arrive is not guaranteed , In this way, the receiver may receive and then send TCP package ( Note that the submission to the application layer is sequential ).
2、 In order to reduce network traffic ,ACK There is a delay confirmation mechanism .
3、ACK After reaching the maximum value of , And from 0 Start .
Four 、ACK Delay confirmation mechanism
After receiving the data , Not immediately ACK, It's a delay . commonly ACK The delay time is 200ms, But this 200ms It's not the amount of time you need to delay after you receive the data . The system has a fixed timer every 200ms Will check if you need to send ACK package . There are two purposes to do this .
1、 The purpose of this is ACK It can be combined , That is, if you receive two in a row TCP package , It doesn't have to be ACK two , Just reply to the final ACK That's all right. , Can reduce network traffic .
2、 If the receiver has data to send , Then the data will be sent TCP In the packet , close ACK Information . To do so , Can avoid a lot of ACK With a single TCP Packet sending , Reduced network traffic .
Delay confirmation (Delayed Ack)
setsockopt(fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){1}, sizeof(int))
Generally speaking, it is related to nagle Use... In specific situations
边栏推荐
- 3W word will help you master the C language as soon as you get started - the latest update is up to 5.22
- Introduction to Lichuang EDA
- Definition and method of string
- 51 data analysis post
- How to create a new virtual machine
- Iptables cause heartbeat brain fissure
- OSI model notes
- 2022 AAAI fellow release! Yan Shuicheng, chief scientist of sail, and Feng Yan, Professor of Hong Kong University of science and technology, were selected
- Summary of Shanghai Jiaotong University postgraduate entrance examination module firewall technology
- thread
猜你喜欢
Using terminal connection in different modes of virtual machine
Deepmind proposed a Zuan AI, which specially outputs network attack language
JMeter common configuration components and parameterization
JMeter Foundation
Usage of case when then else end statement
Reptile learning winter vacation series (2)
Canoe the second simulation engineering xvehicle 3 CAPL programming (operation)
Post man JSON script version conversion
20 kinds of hardware engineers must be aware of basic components | the latest update to 8.13
Fundamentals of software testing
随机推荐
Process communication and thread explanation
Serialization oriented - pickle library, JSON Library
Take advantage of the world's sleeping gap to improve and surpass yourself -- get up early
Terms related to hacker technology
os. Path built-in module
Elevator dispatching (pairing project) ④
Using terminal connection in different modes of virtual machine
Polymorphic system summary
Climb Phoenix Mountain on December 19, 2021
Iptables cause heartbeat brain fissure
Analysis function in SQL
51 data analysis post
MBG combat zero basis
Summary of collection: (to be updated)
Deepmind proposed a Zuan AI, which specially outputs network attack language
Some summaries of the 21st postgraduate entrance examination 823 of network security major of Shanghai Jiaotong University and ideas on how to prepare for the 22nd postgraduate entrance examination pr
Jemeter plug-in technology
Dos and path
Reptile learning 4 winter vacation learning series (1)
Canoe: the difference between environment variables and system variables