当前位置:网站首页>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 .
边栏推荐
- "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
- 《MATLAB 神经网络43个案例分析》:第43章 神经网络高效编程技巧——基于MATLAB R2012b新版本特性的探讨
- [principles of multithreading and high concurrency: 1_cpu multi-level cache model]
- MATLAB小技巧(24)RBF,GRNN,PNN-神经网络
- [shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)
- 【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)
- Add some hard dishes to the interview: how to improve throughput and timeliness in delayed task scenarios!
- yii2 中andWhere多个or查询 orm条件
- Cancer biopsy instruments and kits - market status and future development trends
- 基于can总线的A2L文件解析(2)
猜你喜欢
![[shutter] banner carousel component (shutter_wiper plug-in | swiper component)](/img/a6/5c97ef3f34702b83ebf0511501d757.gif)
[shutter] banner carousel component (shutter_wiper plug-in | swiper component)

Xiaodi notes

vfork执行时出现Segmentation fault

"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

力扣------网格中的最小路径代价

Pytest (6) -fixture (Firmware)

random shuffle注意

Practice of traffic recording and playback in vivo

Random Shuffle attention
![Error when installing MySQL in Linux: starting mysql The server quit without updating PID file ([FAILED]al/mysql/data/l.pid](/img/32/25771baad1ed06c5a592087df748f1.jpg)
Error when installing MySQL in Linux: starting mysql The server quit without updating PID file ([FAILED]al/mysql/data/l.pid
随机推荐
Linear rectification function relu and its variants in deep learning activation function
Notifydatasetchanged not applicable to recyclerview - notifydatasetchanged not working on recyclerview
2022-2028 global splicing display industry research and trend analysis report
MUX VLAN Foundation
sql server 查询指定表的表结构
I2C 子系统(四):I2C debug
Segmentation fault occurs during VFORK execution
基于can总线的A2L文件解析(2)
Add automatic model generation function to hade
tensor中的append应该如何实现
Getting started | jetpack hilt dependency injection framework
Chart. JS multitooltip tag - chart js multiTooltip labels
I2C subsystem (III): I2C driver
Matlab tips (24) RBF, GRNN, PNN neural network
TCP 三次握手和四次挥手机制,TCP为什么要三次握手和四次挥手,TCP 连接建立失败处理机制
The process of connecting MySQL with docker
Andwhere multiple or query ORM conditions in yii2
How to use asp Net MVC identity 2 change password authentication- How To Change Password Validation in ASP. Net MVC Identity 2?
I2C 子系統(四):I2C debug
I2C 子系统(二):I3C spec