当前位置:网站首页>TCP的三次握手详解
TCP的三次握手详解
2022-04-21 23:58:00 【我叫狸匪】
TCP的三次握手

首先我们先理解其中字段的意思
SYN=1的值表示希望连接
ACK=1确认字段ack有效
seq:发送数据包的序号
ack=seq+1:表示收到发送的数据,并且希望他发送下一个序号的数据包
以下我实际中的例证(抓包工具为科来,服务端为QQ):
打开抓包软件后在启动QQ

可以看到本地与QQ之间建立的三次握手
第一步(我发送给QQ的数据)
SYN=1(我希望与QQ建立连接)
seq=2605745043 (我对QQ说:我的发送的数据包序为2605745043 )
ACK=0(没有确认字段)
ack=0 (因为是建立连接的发起者所以为0)

第二步(QQ发送给我的数据)
SYN=1(QQ希望与我建立连接)
seq=1104303432(QQ对我说:QQ发送的数据包序为1104303432)
ACK=1(有确认字段所以值为1)
ack=seq(我客户端的)+1=2605745044(QQ说:我收到你客户端发送的数据包序啦,并且我希望你发送下一条数据包序)

第三步(我发送给QQ的数据)
seq=2605745044(第二条中QQ希望我发的数据包序为2605745044,所以我这次就发送)
ACK=1(有确认字段所以值为1)
ack=seq(QQ的)+1=1104303433(我收到你数据包序为1104303432的数据包啦,并且我希望收到下一个数据包)

第四步开始通信

版权声明
本文为[我叫狸匪]所创,转载请带上原文链接,感谢
https://blog.csdn.net/LoserFei/article/details/124292656
边栏推荐
- FANSEA 4W 单线圈发射无线充5W模块
- 拼多多店铺怎么选择资源位,怎么报名活动,什么活动对店铺利益最大?
- 7.4 线程退出
- Storage group physical quantity entity path
- Judging by JS in IE and edge, you can only enter numbers, letters and date types.
- The most basic JDBC template and database garbled code processing
- Redis high availability (HA)
- Union, intersection and difference tool classes based on Apache set Toolkit
- Degree of second offence
- AI的新故事,藏在李彦宏的《智能交通》音频书里
猜你喜欢

"National tide" building blocks, the next answer to tide play?

How to set the motion stroke and angle in SolidWorks

DetNet: A Backbone network for Object Detection

Browser principle learning notes 1 - browser process

Academicians and experts discussed how to embrace "counting from the east to the west", and the second China IDC industry discovery conference was successfully held

How to obtain a module of a certain layer in pytorch? (it is convenient to change gradient, obtain feature map, cam, etc.)

已拿offer,面试必备知识点

可替换MPS MP2451的高压DCDC芯片FS2451助力智能电表设计40V0.5A降压IC

FANSEA 4W 单线圈发射无线充5W模块

浏览器原理学习笔记1-浏览器进程
随机推荐
14 自定义xml
【網絡協議】DHCP和PXE
DW07D 二合一锂电池保护 IC
Application of different R & D cooperation modes in cloud efficiency
【MYSQL优化1】mysql优化思路
Degree of second offence
Fs2451 can replace the high-voltage DCDC chip of MPS mp2451 to help the design of smart meter 40v0 5A step-down IC
JDBC概念 在idea里创建JDBC项目步骤
SolidWorks hold down Ctrl and drag to copy entities
[fundamentals of interface testing] Part IV - interface testing process and interface document analysis
[source code] super detailed interpretation of linkedblockingqueue source code
ascript基础:事件流以及常用的事件属性
B. Vlad and Candies
7.4 线程退出
JDBC concept steps of creating JDBC project in idea
How to make dynamic drawing with PS
架构实战训练 模块三
7.9 thread mutex
Kubernetes deployment: offline deployment of highly available kubernetes clusters using kubespreay (scheme 1)
Judging by JS in IE and edge, you can only enter numbers, letters and date types.