当前位置:网站首页>网络丢包问题排查
网络丢包问题排查
2022-06-12 06:42:00 【wwwlyj123321】
使用ethtool -S 查看网口收发包的统计情况
MTU:Maximum transmission unit——the size of the largest packet that a network protocol can transmit
MTU是IP数据包每次能传输的最大数据单元,超过此大小将会进行分包,而若设置不能进行分包,则会导致丢包。
MSS就是IP数据包每次能传输的最大数据分段,这个值是MTU值减去IP数据包头大小20Byte和TCP数据段的包头20Byte。即Mss+40=MTU。
举例:如client机器的MTU是1500,Server机器的MTU是1440。之前一直认为MSS协商是client和server各自mss取最小值为这次tcp通讯的mss值。但是经过查资料才发现,client提供的mss是1460 (mss = mtu – 40 = 1500 – 40 = 1460)是表示从server到client的数据部分不能大于1460,整个IP包不能超过1500,而server提出的mss是1400(mss = mtu – 40 = 1440 – 40 = 1400)是表示从client到servr的数据部分不能大于1400,整个IP包不能超过1440。
需要关注在IP隧道技术,如LVS的LD到RS,IPSEC等使用IP隧道导致的MTU增大(注:IP隧道技术是使用IP传送IP包的技术,会在原来的IP包加上新的IP头等信息,导致IP包大小变大,可能超过了MTU的值),超过对应client或者server的最大MTU导致链接不通的情况,这个时候,一般会反向通过icmp包周知告诉发送端,比如:这个ICMP包告诉发送源端,下一跳的MTU是1450,你发送的包太大需要分片。但是你的包IP头里面设置了不可分片,所以我只能把包丢掉,通知你一下,重发小一点的包过来。
- ifconfig ${Interface} mtu ${SIZE} up
- ifconfig eth1 mtu 9000 up
这个是最通用的方法,对所有的linux 发行版本都有效。缺点就是重启后失效,需要在开机项中加载
ref:
边栏推荐
- Multithreading (4) -- no lock (3) -- longadder source code
- LeetCode-1587. Bank account summary II
- Leetcode January 12 daily question 334 Increasing ternary subsequence
- Matlab 6-DOF manipulator forward and inverse motion
- LeetCode-997. Find the town judge
- Tomato learning notes -vscade configuring makefile (using task.jason and launch.jason)
- LeetCode-1185. Day of the week
- Redis problem (I) -- cache penetration, breakdown, avalanche
- 六月集训 第一日——数组
- Redis configuration (IV) -- cluster
猜你喜欢

leetcode 278. First wrong version

Use ms17-010 Eternal Blue vulnerability to infiltrate win7 and establish a permanent back door
![Leetcode: Sword finger offer 67 Convert string to integer [simulation + segmentation + discussion]](/img/32/16751c0a783cc3121eddfe265e2f4f.png)
Leetcode: Sword finger offer 67 Convert string to integer [simulation + segmentation + discussion]

VSCode常用插件

(14)Blender源码分析之闪屏窗口显示软件版本号

PHP read / write cookie

丢掉丑陋的 toast,会动的 toast 更有趣

platform driver

SQL injection read / write file

Throw away the ugly toast. The movable toast is more interesting
随机推荐
Bid farewell to the charged xshell, and the free function of tabby is more powerful
Tomato learning notes-stm32 SPI introduction and Tim synchronization
Some operations of MATLAB array
五月集训(第28天)——动态规划
3 strings, containers, and arrays
Redis data type (VII) -- hyperloglog
Solution: unsatisfieddependencyexception: error creating bean with name 'authaspect':
About session Getattribute, getattribute error
六月集训 第九日——位运算
AI operation ch8
SQL injection based on error reporting
CL210OpenStack操作的故障排除--章節實驗
5 statement
GET 和 POST 的区别及留言板代码实现
Set judge the existence of intersection
美团获得小样本学习榜单FewCLUE第一!Prompt Learning+自训练实战
The eighth day of June training - prefix and
SQL注入——联合查询union
AI作业ch8
六月集训 第八日——前缀和