当前位置:网站首页>传输层 选择性确认 SACK
传输层 选择性确认 SACK
2022-06-29 13:44:00 【富士康质检员张全蛋】
改进的确认—选择确认(SACK)

上面可以看到收到了1 2 3 4给它一个确认,ack=401要它发送第5个了,1,2,3就不需要发确认了,说明已经收到了,发最后一个就行。
之后收到了5,6,7丢了,8也收到了,返回确认告诉它该发601个字节了,如果不支持选择性确认的话,那么会将7,8,9,10都发一遍,也就是将601后面的全部发一遍。
而有了选择性确认,在返回确认的时候,会告诉边界,也就是头和尾,哪些段收到了,那么8这个段就不需要重发了。
连续ARQ协议和滑动窗口协议都采用累积确认的方式

接收端收到了1-49640这些字节,然后从51101个字节到51453这些字节也收到了,剩下白颜色的部分就是没有收到的部分。
可以看到确认号49641,说明前面这些我都收到了,49641开始之后的该发给我了,但是后面的段我也收到了,这个时候在确认这,在TCP首部有个选项,选项里有12个字节,选项里面指定了左边界和右边界,左边界为51101,右边界51454,即收到的字节数再加1。这样最后发送端就知道哪些数据丢了,然后重新发丢掉的字节。
一个边界就要占用4个字节来表示,长度占用1个字节,选择性确认占用1个字节。TCP首部有固定的20个字节的长度,最长是60个字节,那么选项部分可以占用40个字节,去除长度和选择性确认占用的2个字节,那么还剩下38个字节,一个边界占用4个字节。
选择性确认最多表示8个边界
通过SACK选项可以使TCP发送方只发送丢失的数据而不用发送后续全部数据,提高了数据的传输效率。

8个边界就是32个字节,4个段,再多了就不行了。
虚机里面有个功能,指定丢包率。

传输文件丢包如下:

边栏推荐
- [dark horse morning post] the market value of China public education has evaporated by more than 200billion; New Oriental has more than 20million live fans; HM closes its first store in China; Vanke Y
- 【黑马早报】中公教育市值蒸发逾2000亿;新东方直播粉丝破2000万;HM关闭中国首店;万科郁亮称房地产已触底;微信上线“大爆炸”功能...
- Distributed cache for memcached
- 微信小程序:修复采集接口版云开发表情包
- TikTok全球短视频霸主地位或被YouTube反超
- 【 网络带宽 】MBps & Mbps
- 用手机在指南针上开户靠谱吗?这样炒股有没有什么安全隐患
- Characteristics of human immaturity
- Installation and removal of cover for CPU protection on desktop motherboard
- goby全端口扫描
猜你喜欢

Wechat applet: install B artifact and P diagram, modify wechat traffic main applet source code, Download funny joke diagram, make server free domain name

Introduction to reverse commissioning -pe file section table and block 03/07

微信小程序:万圣节头像框生成工具

广州开展瓶装气安全宣传活动,普及燃气安全知识

揭秘百度智能测试在测试自动执行领域实践

TikTok全球短视频霸主地位或被YouTube反超

电脑时间校对后不自动更新要如何解决

Equivalence class partition method for test case design method

文物数字藏品,开启文化传承的新方式

疯狂的数字藏品,下一个造富神话?
随机推荐
Redis的五种数据结构的底层实现原理
微信小程序:全新獨家雲開發微群人脈
“死掉”的诺基亚,一年躺赚1500亿
Unity SplashImage 缩放问题
Five years after graduation, I asked all the leaders around me and summarized their learning methods
Introduction to reverse commissioning -pe file section table and block 03/07
golang6 反射
[high concurrency] 28000 words' summary of callable and future interview knowledge points. After reading it, I went directly to ByteDance. Forgive me for being a little drifting (middle)
goby如何导出扫描结果
Goby full port scan
[use of veux developer tools - use of getters]
二叉树习题总结
国内十大券商,有哪些安全吗?
Source code migration from X86 platform to Kunpeng platform based on Kunpeng development kit [play with Huawei cloud]
STM32 watchdog study
Recruiting talents and seeking development | Jincang of the National People's Congress won the "best employer school recruitment case Award"
Problems in replacing RESNET convolution of mmdet with ghost convolution group
win11怎么看cpu几核几线程? win11查看cpu是几核几线程的教程
在同花顺上开户安全吗 开户在哪里申请
ANSVC无功补偿装置在河北某购物广场中的应用