找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3793|回复: 2

[负载平衡] NTH多线负载均衡

[复制链接]
发表于 2011-7-29 20:27:02 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

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

×
本帖最后由 micke 于 2011-7-29 20:37 编辑

原来使用ros 2.9x拨多条AD,使用那个牛叉的脚本刷网关,效果不错

现在升级到3.x了,坛子上说不用脚本,直接用INTERFACE,调试也成功,但感觉负载好像不太均衡,每条AD同一时刻流量不像

2.9x里分布均衡,有的线路几M,有的线路才几K,打开网页速度也不如2.9x,请问是哪里问题

配置如下:
/ip firewall mangle
add action=mark-connection chain=prerouting comment=nth_1 connection-state=\
      new disabled=no new-connection-mark=nth_1 nth=5,1 passthrough=yes \
      src-address=192.168.10.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=nth_1 \
      disabled=no new-routing-mark=routing_1 passthrough=yes src-address=\
      192.168.10.0/24

add action=mark-connection chain=prerouting comment=nth_2 connection-state=\
    new disabled=no new-connection-mark=nth_2 nth=5,2 passthrough=yes \
    src-address=192.168.10.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=nth_2 \
    disabled=no new-routing-mark=routing_2 passthrough=yes src-address=\
    192.168.10.0/24

add action=mark-connection chain=prerouting comment=nth_3 connection-state=\
    new disabled=no new-connection-mark=nth_3 nth=5,3 passthrough=yes \
    src-address=192.168.10.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=nth_3 \
    disabled=no new-routing-mark=routing_3 passthrough=yes src-address=\
    192.168.10.0/24

add action=mark-connection chain=prerouting comment=nth_4 connection-state=\
    new disabled=no new-connection-mark=nth_4 nth=5,4 passthrough=yes \
    src-address=192.168.10.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=nth_4 \
    disabled=no new-routing-mark=routing_4 passthrough=yes src-address=\
    192.168.10.0/24

add action=mark-connection chain=prerouting comment=nth_5 connection-state=\
    new disabled=no new-connection-mark=nth_5 nth=5,5 passthrough=yes src-address=\
    192.168.10.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=nth_5 \
    disabled=no new-routing-mark=routing_5 passthrough=yes src-address=\
    192.168.10.0/24

/ip firewall nat
add action=masquerade chain=srcnat comment=1 connection-mark=nth_1 disabled=\
    no out-interface=pppoe-out1
add action=masquerade chain=srcnat comment=2 connection-mark=nth_2 disabled=\
    no out-interface=pppoe-out2
add action=masquerade chain=srcnat comment=3 connection-mark=nth_3 disabled=\
    no out-interface=pppoe-out3
add action=masquerade chain=srcnat comment=4 connection-mark=nth_4 disabled=\
    no out-interface=pppoe-out4
add action=masquerade chain=srcnat comment=5 connection-mark=nth_5 disabled=\
    no out-interface=pppoe-out5


/ip route
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    pppoe-out2 routing-mark=routing_2
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    pppoe-out3 routing-mark=routing_3
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    pppoe-out4 routing-mark=routing_4
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    pppoe-out1 routing-mark=routing_1
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    pppoe-out5 routing-mark=routing_5
请老大们帮手看看

另外补充点,就是有时候AD断了重拨后有同网关现象,不知道和这个有没有关系,指定接口了应该不会吧?
routeros
 楼主| 发表于 2011-7-30 09:59:55 | 显示全部楼层
老大们都不在? 没人回答的 ,问题太简单不愿回答?
routeros
回复

使用道具 举报

发表于 2011-8-12 02:39:42 | 显示全部楼层
这么经典的脚本……
routeros
回复

使用道具 举报

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

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-5-17 11:00 , Processed in 0.047210 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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