cicinh 发表于 2011-6-6 02:13:13

6线NTH脚本......

ip firewall mangle
#外部连接
add action=mark-connection chain=input comment="" disabled=no \ in-interface=ADSL-1 new-connection-mark=from_adsl_1 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from_adsl_1 \ disabled=no new-routing-mark=to_adsl_1 passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=\ ADSL-2 new-connection-mark=from_adsl_2 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from_adsl_2 \ disabled=no new-routing-mark=to_adsl_2 passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=\ ADSL-3 new-connection-mark=from_adsl_3 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from_adsl_3 \ disabled=no new-routing-mark=to_adsl_3 passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=\ ADSL-4 new-connection-mark=from_adsl_4 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from_adsl_4 \ disabled=no new-routing-mark=to_adsl_4 passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=\ ADSL-5 new-connection-mark=from_adsl_5 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from_adsl_5 \ disabled=no new-routing-mark=to_adsl_5 passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=\ ADSL-6 new-connection-mark=from_adsl_6 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from_adsl_6 \ disabled=no new-routing-mark=to_adsl_6 passthrough=yes
#内网均衡
add action=mark-connection chain=prerouting comment= "" connection-state=new \ disabled=no in-interface=LAN new-connection-mark=nth_1 nth=6,1 \ passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=nth_1 \ disabled=no in-interface=LAN new-routing-mark=to_adsl_1 passthrough=no
add action=mark-connection chain=prerouting comment="" connection-state=new \ disabled=no in-interface=LAN new-connection-mark=nth_2 nth=5,1 \ passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=nth_2 \ disabled=no in-interface=LAN new-routing-mark=to_adsl_2 passthrough=no

add action=mark-connection chain=prerouting comment="" connection-state=new \ disabled=no in-interface=LAN new-connection-mark=nth_3 nth=4,1 \ passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=nth_3 \ disabled=no in-interface=LAN new-routing-mark=to_adsl_3 passthrough=no
add action=mark-connection chain=prerouting comment="" connection-state=new \ disabled=no in-interface=LAN new-connection-mark=nth_4 nth=3,1 \ passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=nth_4 \ disabled=no in-interface=LAN new-routing-mark=to_adsl_4 passthrough=no
add action=mark-connection chain=prerouting comment="" connection-state=new \ disabled=no in-interface=LAN new-connection-mark=nth_5 nth=2,1 \ passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=nth_5 \ disabled=no in-interface=LAN new-routing-mark=to_adsl_5 passthrough=no
add action=mark-connection chain=prerouting comment="" connection-state=new \ disabled=no in-interface=LAN new-connection-mark=nth_6 passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=nth_6 \ disabled=no in-interface=LAN new-routing-mark=to_adsl_6 passthrough=no
/ip firewall nat
#线路正常时的负载:
add action=masquerade chain=srcnat comment="" disabled=no out-interface=ADSL-1 routing-mark=to_adsl_1
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\ ADSL-2 routing-mark=to_adsl_2
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\ ADSL-3 routing-mark=to_adsl_3
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\ ADSL-4 routing-mark=to_adsl_4
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\ ADSL-5 routing-mark=to_adsl_5
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\ ADSL-6 routing-mark=to_adsl_6

jt00278 发表于 2011-6-6 14:40:25

路过,看看……

ycfei 发表于 2011-6-6 22:40:50

路过,已复制。谢谢。

zhjchina 发表于 2011-6-6 22:55:15

这个东西没必要贴了吧。没任何新意可言

2线和200线有什么区别呢,发这种东西和灌水差不多了。

cicinh 发表于 2011-6-7 01:14:23

我是测试能不能正常发贴......

981398 发表于 2011-6-7 11:28:37

回复 cicinh 的帖子

总评分: 铜板 -10   查看全部评分
页: [1]
查看完整版本: 6线NTH脚本......