找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3146|回复: 5

[脚本] 6线NTH脚本......

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

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

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

×
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
routeros
发表于 2011-6-6 14:40:25 | 显示全部楼层
路过,看看……

评分

参与人数 1铜板 -10 收起 理由
tangdong -10 兄弟,回帖多打点字嘛!

查看全部评分

routeros
回复

使用道具 举报

发表于 2011-6-6 22:40:50 | 显示全部楼层
路过,已复制。谢谢。
routeros
回复

使用道具 举报

发表于 2011-6-6 22:55:15 | 显示全部楼层
这个东西没必要贴了吧。没任何新意可言

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

routeros
回复

使用道具 举报

 楼主| 发表于 2011-6-7 01:14:23 | 显示全部楼层
我是测试能不能正常发贴......
routeros
回复

使用道具 举报

发表于 2011-6-7 11:28:37 | 显示全部楼层
回复 cicinh 的帖子

总评分: 铜板 -10   查看全部评分
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-22 15:01 , Processed in 0.055597 second(s), 8 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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