注册 登录
自由的生活_软路由 返回首页

tomosak的个人空间 https://bbs.routerclub.com/?117479 [收藏] [复制] [分享] [RSS]

日志

ROS 3.x-4.x多ADSL负载均衡设置方法

已有 1099 次阅读2011-3-22 13:41

/ip firewall mangle
add action=mark-connection chain=prerouting comment=nth_1 connection-state=\
    new disabled=no new-connection-mark=nth_1 nth=6,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=no 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,1 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=no 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=4,1 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=no 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=3,1 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=no 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_5nth=2,1 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=no src-address=\
    192.168.10.0/24
add action=mark-connection chain=prerouting comment=nth_6 connection-state=\
    new disabled=no new-connection-mark=nth_6 passthrough=yes src-address=\
    192.168.10.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=nth_6 \
    disabled=no new-routing-mark=routing_6 passthrough=no 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
add action=masquerade chain=srcnat comment=6 connection-mark=nth_6 disabled=\
    no out-interface=pppoe-out6
add action=masquerade chain=srcnat comment=nat disabled=no

/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
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    pppoe-out5 routing-mark=routing_6



路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

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

GMT+8, 2024-11-22 12:40 , Processed in 0.036454 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

返回顶部