当前位置:网站首页>传输层 选择性确认 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个段,再多了就不行了。
虚机里面有个功能,指定丢包率。

传输文件丢包如下:

边栏推荐
- go-zero微服务实战系列(七、请求量这么高该如何优化)
- [network bandwidth] Mbps & Mbps
- I talked about exception handling for more than half an hour during the interview yesterday
- Crazy digital collections, the next myth of making wealth?
- Follow me study hcie big data mining Chapter 1 Introduction to data mining module 2
- 单项数据流之子组件修改父组件的值
- Stable currency risk profile: are usdt and usdc safe?
- Discard Tkinter! Simple configuration to quickly generate cool GUI!
- golang7_TCP编程
- 吐血整理:一份不可多得的架构师图谱!
猜你喜欢

Wechat applet: Yunkai publishes white wall wechat applet source code download server free and domain name support traffic main revenue

win10安装Monggodb的基本使用教程

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

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

Problems in replacing RESNET convolution of mmdet with ghost convolution group
![[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](/img/d7/4671b5a74317a8f87ffd36be2b34e1.jpg)
[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

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

Stable currency risk profile: are usdt and usdc safe?
Redis fragment cluster setup and use tutorial

动荡的中介生意,不安的租房人
随机推荐
Redis的五种数据结构的底层实现原理
Follow me study hcie big data mining Chapter 1 Introduction to data mining module 2
Wechat applet: repair collection interface version cloud development expression package
c语言入门教程–-6循环语句
单项数据流之子组件修改父组件的值
BYD has three years left
TikTok全球短视频霸主地位或被YouTube反超
Game development of contract quantitative trading system (ready-made case analysis)
C keyboard hook
[high concurrency] cache idea
如何优雅的写 Controller 层代码?
电脑时间校对后不自动更新要如何解决
Cicd introduction [easy to understand]
Hardware development notes (VIII): basic process of hardware development, making a USB to RS232 module (VII): creating a basic dip component (crystal oscillator) package and associating the principle
Mondo rescue creates an image file (which is conducive to image damage recovery)
Interview high concurrent, cool!! (high energy in the whole process, collection recommended)
MySQL 1146 error [easy to understand]
吐血整理:一份不可多得的架构师图谱!
Teach you how to install the latest version of mysql8.0 database on windows, nanny level teaching
MySQL数据库:读写分离