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

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

日志

pcc负载

已有 929 次阅读2011-9-26 15:58


:global i;
:global u;
:global l;
:set i 4;
:set u 0;
:for a from=1 to="$i" do={
/ip route
add dst-address=0.0.0.0/0 gateway=("pppoe-out"."$a") routing-mark=$a check-gateway=ping
add dst-address=0.0.0.0/0 gateway=("pppoe-out"."$a") distance=$a check-gateway=ping
/ ip firewall nat
add chain=srcnat out-interface=("pppoe-out"."$a") action=masquerade
/ip fi man
add chain=input in-interface=("pppoe-out"."$a") action=mark-connection new-connection-mark=("wlan"."$a")
}
:for a from=1 to="$i" do={
add chain=output connection-mark=("wlan"."$a") action=mark-routing new-routing-mark=$a
}
:for a from=1 to="$i" do={
add action=mark-connection chain=prerouting dst-address-type=!local comment=("C"."$a") new-connection-mark=("wlan"."$a") passthrough=yes per-connection-classifier=("both-addresses-and-port:"."$i"."/"."$u") src-address-list="\BE\D6\D3\F2\CD\F8"
:set u ($u + 1)
}
:for a from=1 to="$i" do={
add action=mark-routing chain=prerouting comment=("R"."$a") connection-mark=("wlan"."$a") new-routing-mark=$a passthrough=no
}

路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist doodle 涂鸦板

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

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

GMT+8, 2024-11-6 09:39 , Processed in 0.095689 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

返回顶部