免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1950 | 回复: 4

[网络子系统] CentOS 7(3.10)的 route multipath 是个什么情况? [复制链接]

论坛徽章:
12
寅虎
日期:2013-12-04 20:37:4915-16赛季CBA联赛之广东
日期:2017-08-22 19:23:1215-16赛季CBA联赛之上海
日期:2016-06-18 23:05:05操作系统版块每日发帖之星
日期:2016-06-06 06:20:00操作系统版块每日发帖之星
日期:2016-06-05 06:20:00操作系统版块每日发帖之星
日期:2016-06-03 06:20:002015年辞旧岁徽章
日期:2015-03-03 16:54:152015年亚洲杯之巴勒斯坦
日期:2015-02-10 21:38:08卯兔
日期:2014-10-31 20:42:23申猴
日期:2014-06-11 17:15:10处女座
日期:2014-05-22 09:00:1815-16赛季CBA联赛之广夏
日期:2017-09-25 23:37:46
发表于 2017-06-12 19:09 |显示全部楼层

在多路径路由场景下,我记得以前 kernel 是先选择一条路由之后,就直接存入 route cache,以后每次直接从 cache 中取,这样能保证同一个流一定是送到同一条路由。

但是今下午发现,早在 3.6 的内核就已经取消了 route cache:

9. Networking

    Delete ipv4 routing cache

然后直接跳到了 4.4 才添加了基于流的多路径路由。

11. Networking

IPv4: Hash-based multipath routing. When the routing cache was removed in 3.6, the IPv4 multipath algorithm changed from more or less being destination-based into being quasi-random per-packet scheduling. This increased the risk of out-of-order packets and made it impossible to use multipath together with anycast services. In this release, the multipath routing implementation is replaced with a flow-based load balancing based on a hash over the source and destination addresses

这中间的跨度也太大了点儿吧。

那么凡是介于 3.6 和 4.4 版本之间的 kernel 是个什么情况?有什么方法可以保证相同 source ip 的链接一定走同一条路由出去吗?

有人研究过没?


论坛徽章:
12
寅虎
日期:2013-12-04 20:37:4915-16赛季CBA联赛之广东
日期:2017-08-22 19:23:1215-16赛季CBA联赛之上海
日期:2016-06-18 23:05:05操作系统版块每日发帖之星
日期:2016-06-06 06:20:00操作系统版块每日发帖之星
日期:2016-06-05 06:20:00操作系统版块每日发帖之星
日期:2016-06-03 06:20:002015年辞旧岁徽章
日期:2015-03-03 16:54:152015年亚洲杯之巴勒斯坦
日期:2015-02-10 21:38:08卯兔
日期:2014-10-31 20:42:23申猴
日期:2014-06-11 17:15:10处女座
日期:2014-05-22 09:00:1815-16赛季CBA联赛之广夏
日期:2017-09-25 23:37:46
发表于 2017-06-18 00:54 |显示全部楼层
本帖最后由 wait_rabbit 于 2017-06-18 00:57 编辑


我自问自答了。

从这里得到的信息看:https://serverfault.com/question ... in-post-3-6-kernels

还是直接升到 4.4 吧  

论坛徽章:
20
程序设计版块每日发帖之星
日期:2015-08-17 06:20:00程序设计版块每日发帖之星
日期:2016-07-16 06:20:00程序设计版块每日发帖之星
日期:2016-07-18 06:20:00每日论坛发贴之星
日期:2016-07-18 06:20:00黑曼巴
日期:2016-12-26 16:00:3215-16赛季CBA联赛之江苏
日期:2017-06-26 11:05:5615-16赛季CBA联赛之上海
日期:2017-07-21 18:12:5015-16赛季CBA联赛之青岛
日期:2017-09-04 17:32:0515-16赛季CBA联赛之吉林
日期:2018-03-26 10:02:16程序设计版块每日发帖之星
日期:2016-07-15 06:20:0015-16赛季CBA联赛之江苏
日期:2016-07-07 18:37:512015亚冠之萨济拖拉机
日期:2015-08-17 12:21:08
发表于 2017-06-26 10:54 |显示全部楼层
http://vger.kernel.org/~davem/columbia2012.pdf
从中间部分开始看。

Cache is Exploitable
* This is true regardless of hash quality.
* Attacker can simply cycle through all values of all keys
* Each new packet sent modifies the lookup key in some way
* Each new packet creates a new routing cache entry
* Triggers garbage collection when size limit is reached
* Cache is no longer a cache, since every lookup misses
* This is more expensive than having no cache at all.

Cache in Non-hostile Environment
* Even with “well behaved” traffic, cache is undesirable
* Google sees hit rates on the order of only 10 percent
* On simpler systems, cache is effective
* But still exposed to key cycling denial of service
* The cache has to be removed

论坛徽章:
20
程序设计版块每日发帖之星
日期:2015-08-17 06:20:00程序设计版块每日发帖之星
日期:2016-07-16 06:20:00程序设计版块每日发帖之星
日期:2016-07-18 06:20:00每日论坛发贴之星
日期:2016-07-18 06:20:00黑曼巴
日期:2016-12-26 16:00:3215-16赛季CBA联赛之江苏
日期:2017-06-26 11:05:5615-16赛季CBA联赛之上海
日期:2017-07-21 18:12:5015-16赛季CBA联赛之青岛
日期:2017-09-04 17:32:0515-16赛季CBA联赛之吉林
日期:2018-03-26 10:02:16程序设计版块每日发帖之星
日期:2016-07-15 06:20:0015-16赛季CBA联赛之江苏
日期:2016-07-07 18:37:512015亚冠之萨济拖拉机
日期:2015-08-17 12:21:08
发表于 2017-06-26 11:03 |显示全部楼层
Goal: less than 10 percent cost increase for real operations

这增加的10%的性能开销又是通过什么途径给去掉的呢?
在这里去掉了一个route cache,肯定又在什么地方增加了一个XXX cache吧?

论坛徽章:
9
程序设计版块每日发帖之星
日期:2016-02-13 06:20:00数据库技术版块每日发帖之星
日期:2016-06-15 06:20:00数据库技术版块每日发帖之星
日期:2016-06-16 06:20:00数据库技术版块每日发帖之星
日期:2016-06-18 06:20:00程序设计版块每日发帖之星
日期:2016-06-27 06:20:00程序设计版块每日发帖之星
日期:2016-07-09 06:20:00IT运维版块每日发帖之星
日期:2016-07-15 06:20:00IT运维版块每日发帖之星
日期:2016-07-27 06:20:00程序设计版块每日发帖之星
日期:2016-08-18 06:20:00
发表于 2017-06-27 09:13 |显示全部楼层
本帖最后由 mordorwww 于 2017-06-27 11:23 编辑

http://blog.csdn.net/dog250/article/details/50809816

路由查找开销大,但是通过next hop cache提高效率
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP