当前位置:网站首页>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
边栏推荐
- 本地Mysql忘记密码的修改方法(windows)
- First article
- Using terminal connection in different modes of virtual machine
- unit testing
- Digital simulation beauty match preparation -matlab basic operation No. 6
- 2021 annual summary - it seems that I have done everything except studying hard
- 2021-11-02
- Polymorphic system summary
- Dos and path
- Automatic translation between Chinese and English
猜你喜欢

2018 meisai modeling summary +latex standard meisai template sharing

Jemeter script recording

Canoe - the third simulation project - bus simulation - 3-2 project implementation

Canoe - the second simulation engineering - xvehicle - 2panel design (principle, idea)

Login operation (for user name and password)

Introduction to canoe automatic test system

Canoe - the second simulation project -xvihicle1 bus database design (operation)

Oracle11g | getting started with database. It's enough to read this 10000 word analysis

2020 Summary - Magic year, magic me

Detailed explanation of classic process synchronization problems
随机推荐
OSI model notes
The most ideal automated testing model, how to achieve layering of automated testing
JMeter common configuration components and parameterization
Detailed explanation of classic process synchronization problems
Object. Assign () & JS (= >) arrow function & foreach () function
守护进程Xinted和日志记录Syslogd
Fundamentals of database operation
Common tips
Canoe: the fourth simulation project -- bug debugging experience
I What is security testing
QQ get group settings
Elevator dispatching (pairing project) ④
Customized version of cacti host template
Canoe - the second simulation project -xvihicle1 bus database design (operation)
Send a request using paste raw text
LxC shared directory addition and deletion
Canoe the second simulation engineering xvehicle 3 CAPL programming (operation)
Heartbeat启动后无反应
Elevator dispatching (pairing project) ③
How to create a new virtual machine