Connection Management and congestion control of TCP transmission control protocol

Source: Internet
Author: User

We have understood the basic knowledge and structure of the TCP transmission control protocol. Now let's talk about its connection management and congestion control problems. First, let's take a look at what is TCP transmission control protocol connection management:

1. The client sends a special TCP packet segment to the server TCP, this packet segment does not contain any application layer data. However, the SYN bit in the header of the packet segment is set to 1 (this packet segment is called the SYN packet segment ). the customer opportunity selects a random Starting sequence number and places the number in the corresponding field in the header;

2. When an IP datagram containing the TCPSYN packet segment is transmitted to the server host, the server reads the TCPSYN packet segment from the datagram and assigns the TCP cache and variable to the TCP connection, and send the allowed packet segment to the client TCP (this packet segment does not contain application layer data). In addition, the message segment contains a confirmation number for the client packet segment, and fill in the expected initial serial number in the packet segment 。

3. When the client receives the SYNACK packet segment, it also needs to allocate cache and variable to the TCP connection. The client also sends a packet segment to the server and sets SYN to 0, enter a confirmation number 。

4. Both the client and any server end can terminate the connection. The end Party proposes to terminate the connection and send a message segment to the other party. The FIN field is set to 1 and waits for ACK confirmation from the other party, then, wait for the FIN packet segment sent by the other party. After confirmation, wait for a certain period of time to close the connection 。

TCP transmission control protocol congestion control:

1. Consider multiple senders and vrouters with unlimited cache;

2. Consider multiple senders and vrouters with limited caches;

3. Consider multiple senders, vrouters with limited cache, and in the case of multi-hop paths 。

In 1st cases, the group manager's queue latency is huge when the group speed is close to the link capacity;

In 2nd cases, when the sender encounters a high latency, the router may use its link bandwidth to forward unnecessary group copies due to unnecessary retransmission. In 3rd cases, as a result, when a group is discarded along a path, the capacity of each upstream router used to forward the group to the discarded group is wasted.

There are two methods for congestion control, one of which is end-to-end congestion control; 2 is network-assisted congestion control. The 1st solution is that the terminal system does not provide display support for transport layer congestion control because the network layer does not. Even if there is congestion in the network, the end system also needs to observe network behavior, can be determined. The second solution is to notify the sender through the network layer. This is also a solution currently recommended for TCP protocol. Currently, it is used in the atm abr (Available Bit Rate) congestion control solution 。

In end-to-end congestion control, TCP senders perceive that congestion occurs through discarding events (discarding events refer to sending timeout events and receiving three ACK packets consecutively )。

The TCP transmission control protocol congestion control algorithm consists of the following three parts:

1) Addition and multiplication

2) Slow Start

3) Respond to timeout events

TCP manages these complex dynamic processes by maintaining a Threshold value (Threshold) variable. It is used to determine the Window Length when the slow start ends and avoids congestion 。

1st. addition means that if no congestion is detected by the TCP sender, there may be available bandwidth that can be used by TCP, therefore, after each TCP sender receives a continuous ACK packet segment, the congestion window is increased by 1, until congestion occurs. Multiplication reduction means that after the TCP sender continuously receives three repeated ACK packets, the transmission path may be congested because the packet segment is lost, at this time, the congestion window is quickly halved. If packet loss occurs, the congestion window is halved 。

2nd. Slow Start refers to the TCP sender. During the initialization phase, transmission starts at a very slow rate, but the transmission rate is rapidly increased at an exponential rate. Each time a transmitted packet segment is confirmed, the congestion window value is doubled until it reaches the threshold, and then the policy of adding and multiplying is adopted. 3rd, the response to packet loss events detected due to timeout and three consecutive ACK packets received is different. For packet loss events detected due to timeout, in this case, the slow start policy is adopted, and three ACK packets are received consecutively using the multiplication and subtraction strategy. Because, after packet loss, however, some packets are still accepted by the receiving end, this at least indicates that the network still has the ability to pay. Therefore, after three ACK packets are received consecutively, the slow start phase will be canceled 。

Most of the current TCP transmission control protocols are implemented using the Reno Algorithm and its variants. The current TCPVegas algorithm is designed to avoid congestion when maintaining a good throughput 。

Basic Ideas

1. Check the router congestion between the source and destination before the group is lost 。

2. When a loss is detected, the transmission rate is linearly reduced. This is predicted by observing the round-trip latency 。

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.