当前位置:网站首页>Tcp/ip FAQs
Tcp/ip FAQs
2022-06-21 13:59:00 【Do not deceive the dark room__】
1.TCP/IP What is the function of the seventh floor ?

2. Three handshakes , Four waves ?
Three handshakes :


3. Why three handshakes and four waves ?
Because the server receives the connection request sent by the client for the first time during the handshake connection SYN After package , You can send it at the same time ACK Confirm the package and SYN Synchronization package , In the process of waving and releasing, the server receives the FIN After package , It is likely that it will not be closed immediately socket, Instead, you need to send ACK The confirmation package tells the client that I have received the request , It can only be sent after the server message is sent FIN End bag , disconnect , In this way, you can send one more time .
4. Why should the client wait while waving ?
According to the above two TCP Shake hands and wave hands ,TIME-WAIT The client receives the server FIN End packet sending ACK Wait time after confirming the package , So it can be launched to prevent the client's ACK Confirm that the package is lost and wait
Reprinted from https://blog.csdn.net/sinat_35297665/article/details/80979181
1、 To ensure the last one sent by the client ACK The message segment can reach the server . Because of this ACK Possible loss , Which leads to being in LAST-ACK The server in state could not receive a pair of FIN-ACK Confirmation message of . The server will time out to retransmit this FIN-ACK, Then the client retransmits the confirmation , Restart time wait timer . Finally, both the client and the server can be shut down normally . Suppose the client doesn't wait 2MSL, It's sending out ACK Then release it directly and close it , One but this ACK Lost words , The server will not be able to enter the closed connection state normally .
2、 It can also prevent invalid message segments . The client is sending the last ACK after , And then through 2MSL, All message segments generated during the duration of this link will disappear from the network . From the guarantee that there will be no message segment remaining in the network to harass the server after the connection is closed .
边栏推荐
- The SQL query statement executes select (1) first, and the ByteDance algorithm engineer is interviewed
- 3. operator
- 哪個期貨平臺 交易更安全放心。求推薦。
- Quelle plate - forme à terme est plus sûre. Je vous en prie.
- MySQL - data type
- Implementation principle and difference between C value type and reference type
- Detailed explanation of dictionary source code in C #
- Set up ZABBIX monitoring and email alarm
- Which futures trading platform is more secure. Ask for recommendation.
- MySQL - view properties
猜你喜欢
Collection reference type in JS

MySQL - table join and join

3D slicer import label and view label

Unbounded territory won the title of innovative brand of digital culture industry in 2022

Map collection traversal, adding, replacing and deleting elements

Declare war on uncivilized code I

C language elementary level (IX) enumeration

Setting of Seaborn drawing style

The new plan for national treasures - the exclusive digital collection of the four museums is coming!

Automatic operation and maintenance 3 - using playbook in ansible
随机推荐
seaborn数据总体分布的可视化策略
[googolu] takeout rebate system - business domain name of KFC configuration applet
技术分享 | MySQL中一个聚类增量统计 SQL 的需求
5. array
C language elementary (VII) structure
Open source FTP server FileZilla server
How to use search engine?
"My" C code specification
Alibaba cloud log service is available in Net project
MySQL - transaction management
Oracle client11 and pl/sql12 installation
C language elementary level (IX) enumeration
4. procedure flow structure
微证券开户正规安全吗,怎么操作开户?
Unbounded territory won the title of innovative brand of digital culture industry in 2022
Automatic operation and maintenance 4 - variables and encryption in ansible
Pingcap was selected as the "voice of customers" of Gartner cloud database in 2022, and won the highest score of "outstanding performer"
Artifacial Intelligent Project
A complete set of skills that a software test engineer needs to master
What is software testing?