当前位置:网站首页>网络丢包问题排查
网络丢包问题排查
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:
边栏推荐
- It only takes 10 minutes to understand the underlying principle of NiO
- MySQL group query to obtain the latest data date function of each group
- C language pointer
- Tomato learning notes-stm32 SPI introduction and Tim synchronization
- leetcode:890. 查找和替换模式【两个dict记录双射(set)】
- Flink practice
- LeetCode-1629. Key with the longest key duration
- Multithreading (4) -- no lock (3) -- longadder source code
- 4 expression
- Redis supports data structure types
猜你喜欢

Multithreading (2) -- pipeline (4) -- Park and unpark

AI operation ch8

Process when solving vagrant up_ builder. rb:43:in `join‘: incompatible character encodings: GBK and UTF-8

Category 7

Leetcode January 10 daily question 306 Additive number

SQL language

Opencv_ 100 questions_ Chapter V (21-25)

leetcode 278. First wrong version

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

使用 ms17-010 永恒之蓝漏洞对 win7 进行渗透及建立永久后门
随机推荐
LeetCode-1185. Day of the week
leetcode 704. Binary search
GET 和 POST 的区别及留言板代码实现
Solution: content type 'application/x-www-form-urlencoded; charset=UTF-8‘ not supported
Tomato learning notes-stm32 SPI introduction and Tim synchronization
leetcode:890. 查找和替换模式【两个dict记录双射(set)】
5 ROS simulation modeling (4-navigation navigation simulation)
Zhang Chi's class: Notice on the time of CAQ Six Sigma test in 2022
Detailed explanation of convirt paper (medical pictures)
3 strings, containers, and arrays
leetcode:剑指 Offer 66. 构建乘积数组【前后缀积的应用】
Some operations of MATLAB array
Bid farewell to the charged xshell, and the free function of tabby is more powerful
Deep and detailed analysis of PHP one sentence Trojan horse
CL210OpenStack操作的故障排除--章节实验
六月集训 第七日 ——哈希表
Computer composition and design work06 —— 基于MIPS
leetcode:剑指 Offer 67. 把字符串转换成整数【模拟 + 分割 +讨论】
June training day 6 - sliding window
数据库全量SQL分析与审计系统性能优化之旅