Why "three-way handshake" is required during TCP connection Establishment [reprinted]
Source: Internet
Author: User
I personally think that from the information theory perspective, as toplanguage discusses, this is necessary for transmission in unreliable channels. Transport Control Protocol (TCP) is a connection-oriented, reliable, and byte stream-based transport layer communication protocol. It is designed to provide a reliable end-to-end byte stream on an unreliable interconnected network. The interconnected network is different from a single network, because different parts of the interconnected network may have different topologies, bandwidth, latency, group size, and other parameters. TCP is designed to dynamically adapt to these features of the interconnected network and be robust when faced with multiple failures. Each TCP connection requires three phases: Connection establishment, data transmission, and connection release. The "three-way handshake" occurs in the connection establishment phase. The specific process of "three-way handshake" is described on the Internet. Google. Here we will discuss why the three-way handshake is required ". After Google answers this question, I found that the "three-way handshake" process on the internet is described in detail, however, there is no good answer to why a three-way handshake is required to establish a connection. You can only turn to books. In Xie xiiren's fourth version of computer network, the "three-way handshake" aims to "Prevent invalid connection request message segments from being suddenly transmitted to the server, resulting in errors ". In another classic book "Computer Network", the "three-way handshake" aims to solve the problem of "repeated groups with latency in the network. The two unused expressions clarify the same issue. The example in Xie xiiren's "Computer Network" is as follows: the first connection request message segment sent by the client is not lost, but is stuck at a certain network node for a long time. As a result, it will arrive at the server at a certain time after the connection is released. This is a long-overdue packet segment. However, after the server receives the invalid Connection Request Message segment, it is mistaken for a new connection request sent by the client again. Therefore, the client sends a confirmation message segment and agrees to establish a connection. If the "three-way handshake" is not used, a new connection is established as long as the server sends a confirmation message. Because the client does not send a connection request, it does not accept the confirmation from the server or send data to the server. However, the server thinks that the new transport connection has been established and waits for the client to send data. In this way, many server resources are wasted. The "three-way handshake" method can prevent the above phenomenon. For example, in that case, the client will not send confirmation to the server. Because the server cannot receive the confirmation, it will know that the client does not require a connection ." This example clearly explains the meaning of the "three-way handshake" for establishing a reliable connection. In Google groups's toplanguage, it is interesting to see a post about TCP "three-way handshake. The postmaster proposed "Why is TCP connection three-way handshake ?" One of the many replies wrote: "the essence of this problem is that the channel is not reliable, but the dual-producer communication needs to reach an agreement on a specific issue. to solve this problem, no matter what information you contain in the message, three-way communication is the theoretical minimum. therefore, the three-way handshake is not a requirement of TCP, but caused by the requirement of "reliably transmitting information over unreliable channels. note the essential requirements here. The channel is not reliable and data transmission is reliable. three times, you want to shake hands or send data later. It doesn't matter if you want to transmit reliable information. therefore, if the channel is reliable, that is, no matter when a message is sent, the other party will be able to receive the message, or you do not care if you want to ensure that the other party receives your message, then you can directly send messages like UDP. ". This can be seen as another way to answer the question of "three-way handshake. Address: http://www.cnblogs.com/TechZi/archive/2011/10/18/2216751.html
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