Service Features of TCP transmission protocol

Source: Internet
Author: User

At the transport layer, we know that the most important protocol is TCP. So what is TCP transmission protocol? Now we will briefly introduce it to you, and also summarize its service features. We hope that you can have a clear understanding of this part.

TCP is a connection-oriented, reliable, and byte-stream-based Transport layer (Transport layer) communication protocol. It is described by RFC 793 (specified) of IETF) in the simplified computer network OSI model, UDP is another important transmission protocol in the same layer 。

In Internet protocol suite, the TCP layer is located on top of the IP layer and the middle layer under the application layer. The application layer of different hosts often needs reliable connections like pipelines, however, the IP layer does not provide such a stream mechanism, but provides unreliable packet switching 。

The Application Layer sends an eight-byte data stream for inter-network transmission to the TCP layer, TCP then splits the data stream into packets of an appropriate length (usually restricted by the maximum transmission unit (MTU) at the data link layer of the network connected to the computer) later, TCP sends the result packet to the IP layer to transmit the packet to the TCP layer of the receiver entity through the network, each byte is assigned a sequence number, at the same time, the serial number also ensures that the packets transmitted to the receiving end are received in order. Then, the receiving end object sends back an ACK message to the successfully received bytes ); if the sender entity does not receive confirmation within a reasonable round-trip delay (RTT), the corresponding data (if lost) it will be re-transmitted. TCP uses a checksum function to check whether data has errors. The Checksum is calculated during sending and receiving 。

First, after the TCP transmission protocol is established, both parties can transmit data at the same time, and secondly, it is full-duplex. In terms of reliability, timeout retransmission and RST validation mechanisms are adopted 。

In terms of traffic control, the sliding window protocol is used, which stipulates that unconfirmed groups in the window need to be re-transmitted 。

In terms of congestion control, the slow start algorithm is used 。

Main features of TCP services

(1) connection-oriented transmission;

(2) end-to-end communication;

(3) high reliability, ensuring the correctness of the transmitted data without loss or disorder;

(4) full duplex transmission;

(5) The byte stream is used to transmit the byte sequence in bytes;

(6) emergency data transmission function 。

TCP retransmission policy

The basis for TCP transmission protocol to control whether data segments need to be re-transmitted is to set up a re-transmission timer. When sending a data segment, start a re-transmission timer. If the timer receives a confirmation before timeout, the timer is disabled, if no confirmation is received before the timer times out, the data segment is retransmitted 。

The key to this retransmission strategy is to set the initial value of the timer. Currently, many algorithms are used as a dynamic algorithm proposed by Jacob son in 1988 to continuously adjust the timeout interval. its working principle is as follows: each TCP connection maintains a variable RTT, which is used to store the estimated time closest to the current round-trip to the target end. When a data segment is sent, the connection timer is started at the same time, if you confirm the arrival before the timer times out, record the required time (M) and correct the RTT value. If the timer does not receive confirmation before the time-out, the RTT value is doubled 。
 
How does TCP ensure high data transmission reliability?

To ensure reliability, the message is sent with an incremental serial number. The forward and confirm numbers are used to ensure the reliability of transmission. In addition, a timer is set for each message, set a maximum latency. TCP transmission protocol for those messages that exceed the maximum latency still do not receive the confirmation information is considered to have been lost, need to re-transmit 。

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.