Get the App
SLTechnology News&Howtos  ›  Servers  › 

Tcp/ip establishment process

Shulou Source: shulou.com Published: 2022-06-02 04:01:08 10月02日 Update

1. Tcp / ip: in the osi network reference model, it provides reliable transmission services /

Definition: transmission control protocol

A: the establishment of tcp/ip is accomplished through three handshakes and four waves.

two。 What is a three-way handshake?

First of all, let's assume that syn= "m", syn, means that the client sends a link request to the server, and the server receives the link request from the syn.

Package, the status of the client is: syn_sent

First handshake: when the client sends a syn (m) link request to the server, waits for confirmation from the server, and then the client status is

Syn_sent

Second handshake: when the server receives a link request for the packet of syn (m), the server needs to send an acknowledgement packet ack (masks 1), which means

Yes, I received it. Mroom1 indicates confirmation, and it also sends syn packets, assuming that the second time, syn=n, and then the status of the server is

Syn_recv, that is, the server sent two packets syn and ack this time.

Third handshake: when the client receives the syn and ack packets sent by the server, it sends an acknowledgement packet ack to the server

(Number1), where nail1 indicates confirmation, and then the status of the client and server is establish, that is, the tcp is established.

3. Wave four times:

The Prime Minister finished waving four times and described it with this word: fin = finsh.

First wave: the client sends a disconnect request for fin to the server

Second wave: the server receives the fin request packet sent by the client, and the server does not immediately send the fin packet to the client.

Maybe the server is still transmitting data and cannot be disconnected, so I sent an ack confirmation packet first, meaning, I received your FIN packet, but I

The data has not been sent yet. Please wait a moment.

The third wave: when the server completes the data transfer, then sends a fin packet to the client, which means that I have transferred all the data

That's it. Now we can disconnect.

Fourth wave: when the client receives the FIN packet sent by the server, it sends an ack to the server, which means it can disconnect

And then break the link after two msl periods

As shown below:

Tags: Service client client server meaning link data status transfer that is end two first process that is data transfer duration model second handshake Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology MariaDB Redmi macOS Xiaomi