xyhyuyunhai 发表于 2009-7-9 18:00:21

用3.2以后的版本做多线负载更简单!!

/ip firewall mangle
add action=mark-connection chain=prerouting comment="" connection-state=new \
    disabled=no new-connection-mark=nth_1 nth=2,1 passthrough=yes \
    src-address=192.168.3.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.3.0/24
add action=mark-connection chain=prerouting comment="" connection-state=new \
    disabled=no new-connection-mark=nth_2 passthrough=yes \
    src-address=192.168.3.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.3.0/24

/ip firewall nat
add action=masquerade chain=srcnat comment="" connection-mark=nth_1 disabled=\
    no out-interface=adsl1
add action=masquerade chain=srcnat comment="" connection-mark=nth_2 disabled=\
    no out-interface=adsl2
add action=masquerade chain=srcnat comment="" disabled=no

/ip route
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    adsl2 routing-mark=routing_2
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    adsl1 routing-mark=routing_1

菜鸟们注意了,把PPPOE 拨号的名字改成,adsl1,adsl2,然后把这个脚本运行下就可以了。
我在3.2 3.22下面测试通过。

WGHBOY 发表于 2009-7-9 21:04:11

你现在才发现呀,我老早就发过了

younger 发表于 2009-7-9 22:25:29

一直在用2.9.27。该下一个3.2来用了

cool525000 发表于 2009-7-10 01:35:06

谢谢楼主,我也在用3.2.
页: [1]
查看完整版本: 用3.2以后的版本做多线负载更简单!!