找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: pupie

Openwrt高级应用之5:mwan3来宽带叠加

 火... [复制链接]
发表于 2013-10-17 21:28 | 显示全部楼层
MARK 下,下次来看
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2013-10-17 21:36 | 显示全部楼层
用MWAN3 4拨叠加 给下载机用
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2013-11-21 16:57 | 显示全部楼层
请问楼主,MWAN3支持相同网关多拨吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2013-12-4 14:14 | 显示全部楼层
因为楼主用的12.09的版本 此版本存在一个路由缓存的问题,所以相同网关叠加存在问题,可以禁用内核的路由缓存,在启动项里面加上
echo -1 > /proc/sys/net/ipv4/rt_cache_rebuild_count
ip route flush cache

最新的trunk版本就不存在路由缓存的问题,应该相同网关叠加比较好


参考:http://www.morfast.net/blog/linux/load-balance/

点评

链接实效,找到了个代替链接:http://www.ddhow.com/blog/fuzai.html  发表于 2014-6-12 13:25
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2013-12-4 14:15 | 显示全部楼层
yanggis 发表于 2013-11-21 16:57
请问楼主,MWAN3支持相同网关多拨吗?

因为楼主用的12.09的版本 此版本存在一个路由缓存的问题,所以相同网关叠加存在问题,可以禁用内核的路由缓存,在启动项里面加上
echo -1 > /proc/sys/net/ipv4/rt_cache_rebuild_count
ip route flush cache

最新的trunk版本就不存在路由缓存的问题,应该相同网关叠加比较好


参考:http://www.morfast.net/blog/linux/load-balance/
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2013-12-4 16:26 | 显示全部楼层
shenyz 发表于 2013-12-4 14:14
因为楼主用的12.09的版本 此版本存在一个路由缓存的问题,所以相同网关叠加存在问题,可以禁用内核的路由缓 ...

mwan3已经修复这个bug了。。。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2013-12-4 16:32 | 显示全部楼层
本帖最后由 99010 于 2013-12-4 16:35 编辑

我的mwan3配置。注:双线接入。单线多拨一样可以使用,只需改一下ping的ip。
  1. # This is a mwan3 example config. For mwan3 to work you will need at least:
  2. # (这是mwan3的设置示例。至少需要以下几项才能运行mwan3)
  3. # - 2 interfaces  (2个接口)
  4. # - 2 members (2个成员)
  5. # - 1 policy  (1个策略)
  6. # - 1 rule  (1条规则)
  7. #
  8. # First define all your wan interfaces. Interface name must match with the
  9. # name used in your network configuration:
  10. # 本人是双线接入(联通、电信)

  11. config 'interface' 'wan'
  12.         option 'enabled' '1'
  13.         list 'track_ip' '8.8.4.4'
  14.         list 'track_ip' '8.8.8.8'
  15.         list 'track_ip' '221.7.128.68'
  16.         list 'track_ip' '221.7.136.68'
  17.         option 'reliability' '2'
  18.         option 'count' '1'
  19.         option 'timeout' '2'
  20.         option 'interval' '5'
  21.         option 'down' '3'
  22.         option 'up' '8'
  23.         option 'reroute' '1'

  24. config 'interface' 'wan1'
  25.         option 'enabled' '1'
  26.         list 'track_ip' '8.8.4.4'
  27.         list 'track_ip' '8.8.8.8'
  28.         list 'track_ip' '202.10.224.68'
  29.         list 'track_ip' '202.103.225.68'
  30.         option 'reliability' '2'
  31.         option 'count' '1'
  32.         option 'timeout' '2'
  33.         option 'interval' '5'
  34.         option 'down' '3'
  35.         option 'up' '8'
  36.         option 'reroute' '1'

  37. # Next define a member and configure metric and weight values for this member.(接着设置一个成员的权重和跃点值)
  38. # Each interface can have multiple member definitions. Give each member a correct (每一个接口可以含有多重成员定义。每一个成员名称必须有正确的名称)
  39. # name (A-Z, a-z, 0-9, "_" and no spaces).
  40. # 2条线路的权重及跳跃点都一样

  41. config member 'wan_m1_w1'
  42.         option interface 'wan'
  43.         option metric '1'
  44.         option weight '1'

  45. config member 'wan1_m1_w1'
  46.         option interface 'wan1'
  47.         option metric '1'
  48.         option weight '1'

  49. # After that create a routing policy. A routing policy consist of one or more(然后创建一条路由策略。包括一个或者几个成员。每个策略必须有正确的名称。可以创建多重策略,以至于可以使不同的通信走不同的主/次wan口)
  50. # members. Give each policy a correct name (A-Z, a-z, 0-9, "_" and no spaces). You
  51. # can create multiple policies, so that it is possible for different traffic to
  52. # have different primary and/or backup interfaces.
  53. # 只配置了2个策略:1:只走wan1,2:wan、wan1负载平衡

  54. config policy 'wan_only'
  55.         list use_member 'wan_m1_w1'

  56. config policy 'wan_wan1_loadbalanced'
  57.         list use_member 'wan_m1_w1'
  58.         list use_member 'wan1_m1_w1'

  59. # And to finish the config define your traffic rules. Rules are matched in top to
  60. # bottom order. If you define a rule and it matches, all following rules are ignored.
  61. #(最后来设置通信规则。他是从你设置的规则由上到下依次匹配,如果你定义的一条规则匹配上了,后面的规则都将忽略。如果平衡选项已经设置,mwan3将使每一个新的包走同一个目标主机地址来到达负载平衡,如果没有设置,那么mwan3会根据目标地址自动负载平衡)
  62. # If the option equalize is set, mwan3 will load-balance each new session to the same
  63. # host. If not set, it will load-balance based on destination.
  64. # 443、8000只允许走wan,

  65. config 'rule' 'rule1'
  66.         option 'src_ip' '192.168.1.0/24'
  67.         option 'proto' 'tcp'
  68.         option 'dest_port' '443'
  69.         option 'use_policy' 'wan_only'

  70. config 'rule' 'rule2'
  71.         option 'src_ip' '192.168.1.0/24'
  72.         option 'proto' 'tcp'
  73.         option 'dest_port' '8000'
  74.         option 'use_policy' 'wan_only'

  75. config 'rule' 'rule3'
  76.         option 'src_ip' '192.168.1.0/24'
  77.         option 'proto' 'udp'
  78.         option 'dest_port' '8000'
  79.         option 'use_policy' 'wan_only'

  80. config 'rule' 'rule4'
  81.         option 'dest_ip' '0.0.0.0/0'
  82.         option 'use_policy' 'wan_wan1_loadbalanced'
复制代码


注:其中的option 'reroute' '1'就是复位路由缓存附送最新的mwan3


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

评分

参与人数 1恩山币 +3 收起 理由
ZHIZAI100 + 3 一看就是觉得高端、大气、上档次!

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2013-12-4 16:57 | 显示全部楼层
99010 发表于 2013-12-4 16:32
我的mwan3配置。注:双线接入。单线多拨一样可以使用,只需改一下ping的ip。

感谢,
我做mwan3接口配置的时候是全部删除
新建的接口的时候没有了 option 'reroute' '1'的参数
不看你的mwan3配置 我还不知道,
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-1-1 11:27 | 显示全部楼层

学习学习,谢谢大家分享。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-2-18 15:02 | 显示全部楼层
留个脚印~~谢谢分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-3-5 19:28 | 显示全部楼层
mark一下,下次好用
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-6-18 11:28 | 显示全部楼层
顶一个,很精透!!!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-7-11 13:36 | 显示全部楼层
小白 表示头大
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-8-8 12:22 | 显示全部楼层
好详细,感谢楼主
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-9-19 20:32 | 显示全部楼层
下载了也来折腾
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-18 17:05

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表