Chinaunix

标题: CentOS 7(3.10)的 route multipath 是个什么情况? [打印本页]

作者: wait_rabbit    时间: 2017-06-12 19:09
标题: CentOS 7(3.10)的 route multipath 是个什么情况?

在多路径路由场景下,我记得以前 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 的链接一定走同一条路由出去吗?

有人研究过没?



作者: wait_rabbit    时间: 2017-06-18 00:54
本帖最后由 wait_rabbit 于 2017-06-18 00:57 编辑


我自问自答了。

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

还是直接升到 4.4 吧  
作者: nswcfd    时间: 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


作者: nswcfd    时间: 2017-06-26 11:03
Goal: less than 10 percent cost increase for real operations

这增加的10%的性能开销又是通过什么途径给去掉的呢?
在这里去掉了一个route cache,肯定又在什么地方增加了一个XXX cache吧?
作者: mordorwww    时间: 2017-06-27 09:13
本帖最后由 mordorwww 于 2017-06-27 11:23 编辑

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

路由查找开销大,但是通过next hop cache提高效率




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2