当前位置:网站首页>Byte Qiu Zhao confused me on both sides, and asked me under what circumstances would the SYN message be discarded?
Byte Qiu Zhao confused me on both sides, and asked me under what circumstances would the SYN message be discarded?
2022-08-09 12:10:00 【InfoQ】
- 开启 tcp_tw_recycle 参数,并且在 NAT 环境下,造成 SYN 报文被丢弃
- accpet 队列满了,造成 SYN 报文被丢弃
坑爹的 tcp_tw_recycle
net.ipv4.ip_local_port_range
- 防止具有相同四元组的旧数据包被收到,也就是防止历史连接中的数据,被后面的连接接收,否则就会导致后面的连接收到一个无效的数据,
- 保证「被动关闭连接」的一方能被正确地关闭,即保证最后的 ACK 能让被动关闭方接收,从而帮助其正常关闭;
- net.ipv4.tcp_tw_reuse,如果开启该选项的话,客户端(连接发起方) 在调用 connect() 函数时,内核会随机找一个 time_wait 状态超过 1 秒的连接给新的连接复用,所以该选项只适用于连接发起方.
- net.ipv4.tcp_tw_recycle,如果开启该选项的话,允许处于 TIME_WAIT 状态的连接被快速回收;
accpet 队列满了
- 半连接队列,也称 SYN 队列;
- 全连接队列,也称 accepet 队列;
- Recv-Q:当前 accpet 队列的大小,也就是当前已完成三次握手并等待服务端 accept() 的 TCP 连接个数;
- Send-Q:当前 accpet 最大队列长度,上面的输出结果说明监听 8088 端口的 TCP 服务进程,accpet 队列的最大长度为 128;
- 调大 accpet 队列的最大长度,调大的方式是通过调大 backlog 以及 somaxconn 参数.
- 检查系统或者代码为什么调用 accept() 不及时;
边栏推荐
- wpf实现简易画板功能(带截取画板,签名截图等等)
- This application has no explicit mapping for /error, so you are seeing this as a fallback
- 研发需求的验收标准应该怎么写? | 敏捷实践
- Two ways to enter the Oracle database
- PAT1009
- Experiment record: the process of building a network
- proto3-2 syntax
- [现代控制理论]5_系统的可控性_controllability
- ZOJ1298(单源最短路径)
- PAT1011
猜你喜欢
Redis的下载安装
IDEA close/open reference prompt Usages
[Interview high-frequency questions] Linked list high-frequency questions that can be gradually optimized
x86 Exception Handling and Interrupt Mechanism (1) Overview of the source and handling of interrupts
字节秋招二面把我干懵了,问我SYN报文什么情况下会被丢弃?
【Robustness of VQA-1】——2019-EMNLP-Don’t Take the Easy Way Out
电解电容漏电流及均压
web course design
[Essence] Analysis of the special case of C language structure: structure pointer / basic data type pointer, pointing to other structures
web课程设计
随机推荐
PAT1013 并查集 DFS(查找联通分量的个数)
Two ways to enter the Oracle database
TIC2000调用API函数Flash擦除片上FLASH失败
CANopen DS402名词
PAT1002
阿里云新增三大高性能计算解决方案,助力生命科学行业快速发展
PM2之配置文件
mysql参数配置学习----临时表内存表的设置
MySQL查询性能优化七种武器之索引潜水
PAT1006
shell脚本------函数的格式,传参,变量,递归,数组
Semaphore SIGCHLD use, how to make the parent that the child performs over, how to make the distinction between multiple child processes. The end
2022 全球 AI 模型周报
BISS绝对值编码器_TI方案_线路延迟补偿
Installation of gdb 10.2
redis主从复制
Summary of learning stages (knapsack problem)
win10 outlook邮件设置
Win10调整磁盘存储空间详解
"Digital Economy Panorama White Paper" Special Analysis of Banking Industry Intelligent Marketing Application Released