当前位置:网站首页>Network Interview Questions

Network Interview Questions

2022-06-10 11:09:00 csx_ zzh

TCP Three handshakes , And the reason for the three handshakes ?

hypothesis A For the client ,B For the server side .

First B be in LISTEN( monitor ) state , Waiting for customer's connection request .

A towards B Send connection request message ,SYN=1,ACK=0, Choose an initial sequence number x.

B Receive connection request message , If you agree to establish a connection , to A Send connection confirmation message ,SYN=1,ACK=1, The confirmation number is x+1, Also choose an initial sequence number y.

A received B After the connection confirmation message of , And to B Send a confirmation , The confirmation number is y+1, Serial number is x+1.B received A After the confirmation of , Connection is established .

The purpose of triple handshake is to establish a reliable communication channel , The main purpose of the three handshakes is for both parties to confirm their relationship with each other Sending and receiving are normal .

The third handshake is to prevent invalid connection requests from reaching the server , Let the server open the connection by mistake .

原网站

版权声明
本文为[csx_ zzh]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206101054353161.html