Transport Layer: TCP network congestion - transmission error - retransmission

Network congestion - cause transmission exception - Solution: retransmitting
congestion Principle - Cause:
1. Unlimited router cache: No packet loss, queue infinite time
C is fixed router egress bandwidth of the beginning input rate = output rate, with input rate is gradually increased, the bandwidth of the final output rate = not increase the router, the data packet queue in the routing cache unlimited, increasing delay, eventually exceeds the timer, the retransmission is triggered
Here Insert Picture Description
when the router 2 finite buffer: memory overflow loss needs to be retransmitted, in the queue have not lost packet retransmission is meaningless, a waste of bandwidth (because too much queuing delay trigger retransmission timer)
Here Insert Picture Description
Here Insert Picture Description
3. after dropping the upstream server bandwidth is wasted
Here Insert Picture Description
how to sense whether congestion?
Timeout / received from the recipient ACK-- three redundant determination of congestion

Transmission error
packet loss: packets lost during the transmission, the receiving end of the ACK acknowledgment packet is lost during transmission, the receiving side no abnormality response ACK or the receiving end discards.
Scrambled: in front of the packet lost

Retransmission
TCP retransmission mechanism two kinds: retransmission timeout and the fast retransmission
timeout retransmission : sent out when the request packet, a timer is turned on (calculated retransmission time), when the timer reaches the time, ACK is not received , the operation proceeds retransmission request has been retransmitted the maximum number of retransmissions until the ACK is received or a
fast retransmission : application of congestion control
when the receiver receives the packet of sequence number is not normal, then the receiver will repeat to receive that should send a duplicate ACK, this time, if the sender receives ACK same serial number of three consecutive bars, it will start the fast retransmission mechanism, corresponding to the ACK packet re-sent once send
Here Insert Picture Description
TCP timer - (time-out interval setting issue)
timeout interval must be slightly larger than the round-trip time (RTT): equal RTT cause unnecessary retransmission, too soon can not be greater than the retransmission packet causes too much delay.
1. The estimated round-trip time (time-out interval is greater than solve the question of who) EstimatedRTT : a successful sending a TCP RTT do a measurement (the most recent one written sampleRTT), and the average RTT before doing the weighted average calculated RTT in the new ( because of congestion of the network at different times, different system load, so to keep updated)
Here Insert Picture Description
alpha recommended values are given in RFC 0.125- latest sampleRTT reflects the current situation of the network, the weights have to be big.
2.RTT deviation value (how to solve the problem is slightly larger) DevRTT: DevRTT is an average difference of SampleRTT EstimatedRTT and
Here Insert Picture Description
Here Insert Picture Description
3. Computing retransmission time (Timeoutintervel)
Here Insert Picture Description

Why choose fast retransmission is three times ACK?
The main consideration is to distinguish between packet loss is due to other factors such as link failure or out of order raised. When the two duplicated ACK is likely to be out of order due! When the three are likely to be duplicated ACK packet loss! Duplicated ACK four times more likely to be more and more of packet loss! But such a policy response is too slow. Packet loss will definitely lead to three duplicated ACK! Summary is selected receives three duplicate acknowledgments window halved best, which is practical experience.

Published 54 original articles · won praise 1 · views 2753

Guess you like

Origin blog.csdn.net/weixin_44682507/article/details/103221671