找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1956|回复: 1

[脚本] 多adsl搭建no-markPCC问题

[复制链接]
发表于 2012-8-21 01:13:08 | 显示全部楼层 |阅读模式

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

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

×
脚本如下:帮我看看有问题没
/ip firewall mangle
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out1 new-connection-mark=adsl_conn_01 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out2 new-connection-mark=adsl_conn_02 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out3 new-connection-mark=adsl_conn_03 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out4 new-connection-mark=adsl_conn_04 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out5 new-connection-mark=adsl_conn_05 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out6 new-connection-mark=adsl_conn_06 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out7 new-connection-mark=adsl_conn_07 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out8 new-connection-mark=adsl_conn_08 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out9 new-connection-mark=adsl_conn_09 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out10 new-connection-mark=adsl_conn_10 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out11 new-connection-mark=adsl_conn_11 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out12 new-connection-mark=adsl_conn_12 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out13 new-connection-mark=adsl_conn_13 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out14 new-connection-mark=adsl_conn_14 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no in-interface=pppoe-out15 new-connection-mark=adsl_conn_15 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_01 passthrough=yes per-connection-classifier=\
    both-addresses:15/0
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_02 passthrough=yes per-connection-classifier=\
    both-addresses:15/1
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_03 passthrough=yes per-connection-classifier=\
    both-addresses:15/2
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_04 passthrough=yes per-connection-classifier=\
    both-addresses:15/3
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_05 passthrough=yes per-connection-classifier=\
    both-addresses:15/4
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_06 passthrough=yes per-connection-classifier=\
    both-addresses:15/5
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_07 passthrough=yes per-connection-classifier=\
    both-addresses:15/6
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_08 passthrough=yes per-connection-classifier=\
    both-addresses:15/7
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_09 passthrough=yes per-connection-classifier=\
    both-addresses:15/8
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_10 passthrough=yes per-connection-classifier=\
    both-addresses:15/9
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_11 passthrough=yes per-connection-classifier=\
    both-addresses:15/10
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_12 passthrough=yes per-connection-classifier=\
    both-addresses:15/11
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_13 passthrough=yes per-connection-classifier=\
    both-addresses:15/12
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_14 passthrough=yes per-connection-classifier=\
    both-addresses:15/13
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
    no dst-address-type=!local in-interface=lan new-connection-mark=\
    adsl_conn_15 passthrough=yes per-connection-classifier=\
    both-addresses:15/14
add action=mark-routing chain=prerouting connection-mark=adsl_conn_01 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_01 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_02 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_02 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_03 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_03 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_04 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_04 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_05 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_05 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_06 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_06 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_07 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_07 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_08 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_08 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_09 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_09 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_10 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_10 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_11 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_11 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_12 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_12 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_13 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_13 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_14 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_14 passthrough=\
    yes
add action=mark-routing chain=prerouting connection-mark=adsl_conn_15 \
    disabled=no in-interface=lan new-routing-mark=adsl_rout_15 passthrough=\
    yes
add action=mark-routing chain=output connection-mark=adsl_conn_01 disabled=no \
    new-routing-mark=adsl_rout_01 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_02 disabled=no \
    new-routing-mark=adsl_rout_02 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_03 disabled=no \
    new-routing-mark=adsl_rout_03 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_04 disabled=no \
    new-routing-mark=adsl_rout_04 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_05 disabled=no \
    new-routing-mark=adsl_rout_05 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_06 disabled=no \
    new-routing-mark=adsl_rout_06 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_07 disabled=no \
    new-routing-mark=adsl_rout_07 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_08 disabled=no \
    new-routing-mark=adsl_rout_08 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_09 disabled=no \
    new-routing-mark=adsl_rout_09 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_10 disabled=no \
    new-routing-mark=adsl_rout_10 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_11 disabled=no \
    new-routing-mark=adsl_rout_11 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_12 disabled=no \
    new-routing-mark=adsl_rout_12 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_13 disabled=no \
    new-routing-mark=adsl_rout_13 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_14 disabled=no \
    new-routing-mark=adsl_rout_14 passthrough=yes
add action=mark-routing chain=output connection-mark=adsl_conn_15 disabled=no \
    new-routing-mark=adsl_rout_15 passthrough=yes
routeros
发表于 2012-8-21 08:09:54 | 显示全部楼层
/ ip firewall mangle
add chain=prerouting in-interface=pppoe-out1 connection-mark=no-mark action=mark-connection new-connection-mark=ISP1_conn
add chain=prerouting in-interface=pppoe-out2 connection-mark=no-mark action=mark-connection new-connection-mark=ISP2_conn
add chain=prerouting in-interface=LAN connection-mark=no-mark dst-address-type=!local per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=ISP1_conn
add chain=prerouting in-interface=LAN connection-mark=no-mark dst-address-type=!local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=ISP2_conn
add chain=prerouting connection-mark=ISP1_conn in-interface=LAN action=mark-routing new-routing-mark=to_ISP1
add chain=prerouting connection-mark=ISP2_conn in-interface=LAN action=mark-routing new-routing-mark=to_ISP2
add chain=output connection-mark=ISP1_conn action=mark-routing new-routing-mark=to_ISP1     
add chain=output connection-mark=ISP2_conn action=mark-routing new-routing-mark=to_ISP2
/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_ISP1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_ISP2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 distance=2 check-gateway=ping

这是官方的PCC脚本 自己比较下

点评

谢谢  发表于 2012-8-21 16:13
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-22 04:31 , Processed in 0.070081 second(s), 9 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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