当前位置:网站首页>Illustrated network: the principle behind TCP three-time handshake, why can't two-time handshake?
Illustrated network: the principle behind TCP three-time handshake, why can't two-time handshake?
2022-07-06 00:37:00 【InfoQ】
What is? TCP?
- English full name :
Transmission Control Protocol
- Chinese name :Transmission control protocol

TCP Three handshakes
Three handshakes in life

- Xiao Ming : Hello , Is it Xiaomei ?【The first handshake】
- Xiaomei : Yes , I'm Xiaomei .【The second handshake】
- Xiao Ming : well , I know you are Xiaomei .【The third handshake】
Three professional handshakes
- Server side: The server is a physical computer dedicated to running services to meet the needs of other computers

- client: The client is the computer hardware device or software that accesses the services provided by the server
- SYN: Sync serial number (Synchronize Sequence Number), This is the first packet from the client to the server , It can be described as a request to establish a connection , If SYN by 1, It means that the device needs to establish a secure connection , Otherwise not .

- ACK: confirm (Acknowledgement), Can be said to be SYN Response , If ACK by 1, The device has received SYN Message and confirm , Otherwise no .



- First step :TCP The client sends... To the server TCP SYN Packets to start the connection , The packet contains a random serial number n, It represents the serial number of the data that the client should transmitStart.

- The second step : The server receives the packet , And use its serial number (m) To respond , Its response also includes the confirmation number , That is, the serial number of the client plus 1, Here is n+1.

- The third step : The client responds to the server by sending a confirmation number , The confirmation number is the serial number of the server plus 1, Here is m+1.

TCP Analysis of three handshakes

172.16.16.128:2826
212.58.226.142:80
- First step : host
172.16.16.128:2826
Host computer212.58.226.142:80
send out [SYN] Seq=0
- The second step : host
212.58.226.142:80
Host computer172.16.16.128:2826
send out [SYN,ACK] Seq=0,Ack=1
- The third step : host
172.16.16.128:2826
Host computer212.58.226.142:80
send out [ACK] Seq=1,Ack=1
TCP window
Win=8192

The other parameters
- MSS(Maximum Segment Size), Maximum segment size .
- WS(Windows Scaling), Used to control the maximum TCP Receive window size .
TCP Why can't a second handshake establish a connection
- The server needs to confirm that the server can receive packets from the client
- The client needs to confirm that the client can receive packets from the server
- The client needs to confirm that the server can receive packets from the client
- The server needs to confirm that the client can receive packets from the server

- Xiaoming asked :“ Hello , Excuse me, Shi Xiaomei ?”: After sending successfully , Xiaoming is sure that he can receive information from Xiaomei , The first condition is verified 【The server needs to confirm that the server can receive packets from the client】
- Xiaomeihui :“ Yes , I'm Xiaomei ”: After sending successfully , Xiaomei is sure that she can receive information from Xiaoming , It can also confirm that Xiao Ming can receive information from her , Verified the second 、 The third condition 【The client needs to confirm that the client can receive packets from the server】【The client needs to confirm that the server can receive packets from the client】
- Xiaoming returns :“ well , I know you are Xiaomei ”: After sending successfully , Xiaoming is sure that Xiaomei can receive information from him , Four conditions are verified 【The server needs to confirm that the client can receive packets from the server】
summary
- What is? TCP?
- TCP Three handshakes
- Three handshakes in life
- Three professional handshakes
- TCP Analysis of three handshakes
- TCP window
- The other parameters
- TCP Why can't a second handshake establish a connection
- summary
边栏推荐
- Free chat robot API
- 孤勇者
- Global and Chinese markets for hinged watertight doors 2022-2028: Research Report on technology, participants, trends, market size and share
- Model analysis of establishment time and holding time
- Spark AQE
- Arduino hexapod robot
- Basic introduction and source code analysis of webrtc threads
- [designmode] adapter pattern
- 云导DNS和知识科普以及课堂笔记
- Power Query数据格式的转换、拆分合并提取、删除重复项、删除错误、转置与反转、透视和逆透视
猜你喜欢
Free chat robot API
Model analysis of establishment time and holding time
Idea remotely submits spark tasks to the yarn cluster
[groovy] JSON serialization (convert class objects to JSON strings | convert using jsonbuilder | convert using jsonoutput | format JSON strings for output)
KDD 2022 | 脑电AI助力癫痫疾病诊断
Priority queue (heap)
Key structure of ffmpeg -- AVCodecContext
The relationship between FPGA internal hardware structure and code
Data analysis thinking analysis methods and business knowledge -- analysis methods (II)
Browser reflow and redraw
随机推荐
How spark gets columns in dataframe --column, $, column, apply
Location based mobile terminal network video exploration app system documents + foreign language translation and original text + guidance records (8 weeks) + PPT + review + project source code
Spark SQL null value, Nan judgment and processing
About the slmgr command
Atcoder beginer contest 258 [competition record]
LeetCode 8. String conversion integer (ATOI)
Codeforces round 804 (Div. 2) [competition record]
Basic introduction and source code analysis of webrtc threads
Global and Chinese market of valve institutions 2022-2028: Research Report on technology, participants, trends, market size and share
《强化学习周刊》第52期:Depth-CUPRL、DistSPECTRL & Double Deep Q-Network
How to use the flutter framework to develop and run small programs
Global and Chinese market of water heater expansion tank 2022-2028: Research Report on technology, participants, trends, market size and share
synchronized 和 ReentrantLock
Opencv classic 100 questions
Common API classes and exception systems
Spark DF增加一列
NLP basic task word segmentation third party Library: ICTCLAS [the third party library with the highest accuracy of Chinese word segmentation] [Chinese Academy of Sciences] [charge]
State mode design procedure: Heroes in the game can rest, defend, attack normally and attack skills according to different physical strength values.
剖面测量之提取剖面数据
Browser reflow and redraw