当前位置:网站首页>TCP handshake three times and wave four times. Why does TCP need handshake three times and wave four times? TCP connection establishes a failure processing mechanism
TCP handshake three times and wave four times. Why does TCP need handshake three times and wave four times? TCP connection establishes a failure processing mechanism
2022-07-03 02:53:00 【Nineteen (drag on and on)】
TCP Three handshakes and four cell phone swings ,TCP Why three and four handshakes ,TCP Connection establishment failure processing mechanism
List of articles
1:TCP Three times mobile phone system

- The client sends... To the server
SYNpackage :
Sign a :SYN
Serial number :Seq=x( Random value ) - The server sends... To the client
SYNACKmessage :
Sign a :SYN ACK
Serial number :Seq=y
Confirmation no. :Ack=x+1 - The client sends... To the server
ACKmessage
Sign a :ACK
Serial number :Seq=x+1
Confirmation no. :Ack=y+1
2:TCP Four waves of mobile phone

- The client sends a disconnection message to the server :
Sign a :FIN
Serial number :Seq=u( Random value ) - The server sends a message to the client :
Sign a :ACK
Serial number :Seq=v
Confirmation no. :Ack=u+1 - The server returns the data to be transferred to the client , Send the data to the client again after sending it TCP message :
Sign a :FIN ACK
Serial number :Seq=w
Confirmation no. :Ack=u+1 - The client sends a message to the server :
Sign a :ACK
Serial number :Seq=u+1
Confirmation no. :Ack=w+1
3:TCP Handshake timeout processing mechanism
3.1: The first handshake failed
The client sends... To the server SYN Message to establish a connection . If the confirmation message from the server is not received within a period of time , It will wait for some time to continue sending SYN news . If it still does not receive the server confirmation message , Will continue to repeat the above actions , Until the number of transmissions exceeds the maximum number of retransmissions .
3.2: The second handshake failed
The server sends... To the client SYN ACK message , At this time, the server will block waiting for the client connection , Waiting for the client to send ACK message . If the client does not receive the confirmation message , Then the client will send to the server again SYN message , Execution is similar to The first handshake failed The handling action of .
3.3: The third handshake failed
Client received SYN ACK After confirming the message , Send to server ACK message . If the server does not receive the client's message for a long time ACK news , It will continue to send to the client SYN ACK news , Repeat the above , Until the maximum number of retransmissions is exceeded .
4:TCP Why three handshakes
TCP The two handshakes can only let the client know that the data it sends can be received by the server , But the server cannot judge whether the client can receive its own data .

As can be seen from the above figure , Just one client will cause the server to open multiple ports , Cause waste of service side expenses .
5:TCP Why wave four times

TCP Four waves ensure that the server is disconnected when all data has been transmitted .
边栏推荐
- Matlab tips (24) RBF, GRNN, PNN neural network
- Principle and application of database
- I2C 子系統(四):I2C debug
- Notifydatasetchanged not applicable to recyclerview - notifydatasetchanged not working on recyclerview
- [shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)
- Introduction to cron expression
- The Linux server needs to install the agent software EPS (agent) database
- 搭建私有云盘 cloudreve
- I2C subsystem (II): I3C spec
- js根据树结构查找某个节点的下面的所有父节点或者子节点
猜你喜欢

"Analysis of 43 cases of MATLAB neural network": Chapter 43 efficient programming skills of neural network -- Discussion Based on the characteristics of the new version of MATLAB r2012b

Installation and use of memory leak tool VLD
![[translation] the background project has joined the CNCF incubator](/img/0b/e3d2674b1a1cba3ea398cbcb1a018a.png)
[translation] the background project has joined the CNCF incubator

Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 2)

The process of connecting MySQL with docker

迅雷chrome扩展插件造成服务器返回的数据js解析页面数据异常
![[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)](/img/e5/c01f760b07b495f5b048ea367e0c21.gif)
[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)

用docker 連接mysql的過程

Matlab tips (24) RBF, GRNN, PNN neural network
![[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)](/img/65/c1fe95f8c391394f7ff1b75c7d75b6.jpg)
[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)
随机推荐
你真的懂继电器吗?
SQL server queries the table structure of the specified table
迅雷chrome扩展插件造成服务器返回的数据js解析页面数据异常
What is the way out for children from poor families?
Andwhere multiple or query ORM conditions in yii2
Mathematical statistics -- Sampling and sampling distribution
ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc
Basic operation of binary tree (C language version)
【翻译】后台项目加入了CNCF孵化器
Sqlserver row to column pivot
Kubernetes family container housekeeper pod online Q & A?
Deep learning: multi-layer perceptron and XOR problem (pytoch Implementation)
【翻译】Flux安全。通过模糊处理获得更多信心
Getting started | jetpack hilt dependency injection framework
yii2 中andWhere多个or查询 orm条件
【翻译】具有集中控制平面的现代应用负载平衡
MATLAB小技巧(24)RBF,GRNN,PNN-神经网络
JMeter performance test JDBC request (query database to obtain database data) use "suggestions collection"
Update and return document in mongodb - update and return document in mongodb
Can netstat still play like this?