How to ensure stable and reliable TCP transport protocol?

The TCP, transmission control protocol, which fully implements the various control functions upon data transmission:
the data packets sent for the ACK acknowledgment signal transmitting end;
lost data packets for retransmission mechanism or Watchdog Timeout;
arrives at the receiver for the data packet end-host mess sequence order control;
control sliding window for efficient transmission of the data packet;
for flow control to avoid network congestion time;
for the beginning of a sudden start to avoid sending large amounts of data packets resulting in the slow-start algorithm and network paralysis congestion control.

In addition, TCP as a transport protocol for the connection with a control, confirmation will be sent only when data is present on the host side, the waste can be controlled communication traffic.

 

 

data transmission

 By TCP sequence number, retransmission timeout, and testing, flow control, sliding window congestion control for reliability.

1, application data is divided into data block deemed most appropriate TCP transmission.

2, TCP packet transmitted to each numbered packet receiver sorts the ordered data to the application layer.

3, the TCP receiving side discards duplicate data.

4, retransmission timeout: When TCP sends a segment, it starts a timer and wait for the destination to acknowledge receipt of this segment. If you can not receive a confirmation, it will retransmit this segment.

5, the checksum: the TCP checksum will remain binary data packet transmitted from its header and data are added and then negated. This test is an end and the aim of detecting any change in the data transmission process. If you receive a section of the test and an error, TCP discards this segment and do not acknowledge receipt of this segment.

6, the flow control: each party TCP connection has a fixed size of buffer space, the receiving TCP only allows the sending end of the receiving end can receive the data I buffer. When the receiver a chance to process the data sender, the sender can be prompted to reduce the rate of transmission, to prevent packet loss. Flow control protocol TCP is used a variable size sliding window protocol. Now the receiver has a window (sliding window), with the ACK message transmission. (TCP implemented using a sliding window flow control)

7, sliding window: transmission practice, the
need to explain, if you do not know the TCP sliding window this thing, you do not understand is equal to the TCP protocol.
We all know that the problem will need to address the reliable transmission of TCP packets out of order and,
therefore, TCP will need to know the actual network data processing or data bandwidth, processing speed, so as not to cause network congestion and packet loss.

8, the congestion control: when the network is congested, reducing transmission data. Congestion window sender, before sending data than sent, even if the receiver window, whichever is less slow start, congestion avoidance, congestion transmission, fast recovery. Application data is divided into data block deemed most appropriate for TCP transmission, the receiving side discards the duplicated TCP data. 

Stop and wait protocol is TCP protocol for reliable transmission, its basic principle is that every finished sending a packet to stop, wait for confirmation. And then receive a confirmation issued in a packet.

Guess you like

Origin www.cnblogs.com/raysync0704/p/11140083.html