Detailed TCP protocol (V) - Congestion Control Transmission

First, the theoretical basis

1.1 Congestion

What is

  • Too many hosts, the speed is too fast, too much data transmission
  • To the network
  • Beyond the network processing capability
  • It leads to a lot of data packets for forwarding the network congestion intermediate device (such as a router) queue
  • Network performance is significantly decreased phenomenon

as a result of

  • Data packets through the network growth delay
  • Because the queue is full are discarded resulting in a large number of packets

1.2 Congestion Control

What is

  • Rational management, specification, adjustment to the network
  • The number of hosts to send data, the data transmission rate or the amount of
  • Avoid or eliminate existing congestion

methodHere Insert Picture Description
TCP's congestion control can be drawn without having to belong to the state of congestion feedback

Two, TCP congestion control

What is
End angle, detecting whether the network blocked, if so, immediately down the data transmission rate

method
Of the AIMD (Additive increase, multiplicative decrease)
when the network is not congested, the window size plus growth, when the network is congested, the multiplicative decrease the window size, the following specific description

2.1TCP congestion control algorithm

(A) slow start algorithm to avoid congestion

as the picture shows:
Here Insert Picture Description

Understand the basic concept map

RTT: Defines a segment to receive a confirmation of this time segment time interval from the transmission side of the round trip time

CongWin variables:CongWin transmitting end congestion window variables, in bytes, represents a case where not received, the number of bytes that can be transmitted continuously, with the size of the dynamic change of network congestion level receiver acknowledges

Thershold: Congestion window threshold Thershold, a turning point in the slow start and congestion avoidance

Explain the process of drawing algorithm

Slow start phase
Heuristic method, the MSS initially CongWin set (maximum segment size), within the RTT, each receive an ACK, CongWin a plus the MSS, when the congestion window is increased to the threshold thershold, into the

Congestion avoidance phase
When this slow growth phase window size, this window is confirmed for all segments, a window size increase of the MSS (whether the ACK number received), this time CongWin linear growth (plus growth), occurs when the timer times out ( network congestion)

How to solve the network congestion
CongWin congestion window value becomes 1 (multiplicative decrease), to enter the slow start phase, when the congestion window threshold value becomes half Thershold network congestion window size (FIG Thershold update value 12)

Incomprehensible point
RTT is generally a long time, all the congestion window can send all segments

So in the slow start phase, received several several ACK window size growth over the RTT time interval, the general said RTT interval is doubled, as
Here Insert Picture Description
to avoid congestion phase, regardless received within a time interval RTT several ACK, only the window size is increased by one

(B) the fast retransmit and fast recovery algorithm

Why has this algorithm?
Repeat three times to distinguish between the timer expires and confirm the situation
mentioned in the blog post, and repeated three times to confirm the timer expires ACK are considered lost, but here and be considered as network congestion, and the sender can receive a confirmation receiving end, in fact and true network congestion is not the same, so there is this algorithm

Repeat three times to confirm the way
Here Insert Picture Description
Although seq = segment 200 is not overtime, but after three duplicate acknowledgments will still retransmission

Fast retransmission and fast recovery algorithm of FIG.

Here Insert Picture Description
And on a different algorithm is:
Upon receipt of three duplicate ACK, congestion window CongWin will be directly transferred to the congestion window threshold Thershold, then enter the congestion avoidance phase, which is fast recovery, the recovery value is CongWin

Third, the difference between flow control and congestion control

End data flow control, congestion control of the rate control global network

If network congestion, then the recipient has another big cache, the data can not be received

Implement two controls are sent by dynamically changing the window size, the transmission window size takes the minimum two control

He published 198 original articles · won praise 94 · views 90000 +

Guess you like

Origin blog.csdn.net/shang_0122/article/details/104569769