当前位置:网站首页>网络丢包问题排查
网络丢包问题排查
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:
边栏推荐
- Leetcode: Sword finger offer 66 Build product array [application of pre and post infix]
- LeetCode-1303. Team size
- 五月集训(第28天)——动态规划
- 六月集训 第六日——滑动窗口
- Install MySQL tutorial
- 5 statement
- The first day of June training - array
- 2021 robocom world robot developer competition - undergraduate group (Preliminary)
- (14) The software version number is displayed in the flash window of blender source code analysis
- Cron expression and website generation
猜你喜欢

3 strings, containers, and arrays

SQL injection - blind injection

Opencv_ 100 questions_ Chapter V (21-25)

leetcode:剑指 Offer 60. n个骰子的点数【数学 + 层次dp + 累计贡献】

2021 RoboCom 世界机器人开发者大赛-本科组(初赛)

SQL language

Use ms17-010 Eternal Blue vulnerability to infiltrate win7 and establish a permanent back door

VSCode常用插件

Multithreading mode (I) -- protective pause and join source code

How to build your own website (using the pagoda panel)
随机推荐
Oracle Database
六月集训 第八日——前缀和
Upload file (post form submission form data)
Solution: unsatisfieddependencyexception: error creating bean with name 'authaspect':
Leetcode: Sword finger offer 63 Maximum profit of stock [record prefix minimum and or no brain segment tree]
Redis data structure (VIII) -- Geo
数据库全量SQL分析与审计系统性能优化之旅
LeetCode-1350. Invalid students
June 9th training day - bit operation
Multithreading (4) -- no lock (2) -- Atomic related atomic classes
Solution: content type 'application/x-www-form-urlencoded; charset=UTF-8‘ not supported
LeetCode-1185. Day of the week
MySQL multiple SQL batch operations (crud) in JDBC
AI作业ch8
Codeforces Round #793 (Div. 2) A B C
It only takes 10 minutes to understand the underlying principle of NiO
leetcode:剑指 Offer 63. 股票的最大利润【记录前缀最小和 or 无脑线段树】
Node. Detailed installation tutorial of CPM and cnpm (including error resolution)
Multithreading (V) -- Concurrent tools (II) -- j.u.c concurrent contracting (I) -- AQS and reentrantlock principles
SQL injection - Union query