找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 21176|回复: 44

[限速] ros3.22 adsl 5线nth负载均衡,自动限速试用成功,上图,有脚本

  [复制链接]
发表于 2009-4-1 20:48:58 | 显示全部楼层 |阅读模式

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

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

×
# mar/30/2009 12:05:33 by routeros 3.22
# software id = AK73-PET
#
/queue type
add kind=pcq name=user2 pcq-classifier=dst-address pcq-limit=50 pcq-rate=\
    1500000 pcq-total-limit=2000
add kind=pcq name=user1 pcq-classifier=dst-address pcq-limit=50 pcq-rate=\
    1500000 pcq-total-limit=2000
   
/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.10.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.10.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.10.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.10.0/24

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

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

/system scheduler
add comment="" disabled=no interval=10s name=auto_queue on-event=":global RxCu\
    rRate 0\r\
    \n:global RxCurMaxa 6000000\r\
    \n:global RxCurMaxb 8000000\r\
    \n:global RxCurMaxc 10000000\r\
    \n:global RxCurMaxd 6000000\r\
    \n:global RxCurSet 0\r\
    \n:global RxCurSeta 800000\r\
    \n:global RxCurSetb 600000\r\
    \n:global RxCurSetc 500000\r\
    \n:global RxCurSetd 1500000\r\
    \n\r\
    \n/interface monitor lan once do={:set RxCurRate \$\"sent-bits-per-second\
    \"}\r\
    \n:set RxCurSet [/queue type get [/queue type find name=\"user1\"] pcq-rat\
    e]\r\
    \n\r\
    \n:if (\$RxCurMaxa<\$RxCurRate) do={:if (\$RxCurMaxb>\$RxCurRate) do={:if \
    (\$RxCurSet != \$RxCurSeta) do={\r\
    \n/queue type set \"user1\" pcq-rate=800000\r\
    \n/queue type set \"user2\" pcq-rate=800000}}}\r\
    \n:if (\$RxCurMaxb<\$RxCurRate) do={:if (\$RxCurMaxc>\$RxCurRate) do={:if \
    (\$RxCurSet != \$RxCurSetb) do={\r\
    \n/queue type set \"user1\" pcq-rate=600000\r\
    \n/queue type set \"user2\" pcq-rate=500000}}}\r\
    \n:if (\$RxCurMaxc<\$RxCurRate) do={:if (\$RxCurSet != \$RxCurSetc) do={\r\
    \n/queue type set \"user1\" pcq-rate=500000\r\
    \n/queue type set \"user2\" pcq-rate=400000}}\r\
    \n:if (\$RxCurMaxd>\$RxCurRate) do={:if (\$RxCurSet != \$RxCurSetd) do={\r\
    \n/queue type set \"user1\" pcq-rate=1500000\r\
    \n/queue type set \"user2\" pcq-rate=1500000}}\r\
    \n\r\
    \n" start-date=jan/01/1970 start-time=00:00:00
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.jpg
routeros
发表于 2009-4-1 20:59:27 | 显示全部楼层
坐沙发了,支持原创
routeros
回复

使用道具 举报

发表于 2009-4-1 22:31:42 | 显示全部楼层
板凳也可以
routeros
回复

使用道具 举报

发表于 2009-4-1 23:41:49 | 显示全部楼层
上面好似2线吧 都8完整把脚本放出 还叫5线
routeros
回复

使用道具 举报

 楼主| 发表于 2009-4-2 00:25:47 | 显示全部楼层
兄弟,你不是也5线吧,这个只做参考,不是你搬过去就能用了,教你学1+1等于几,还用不用教你1+2等于几呀,那样老师一辈子也教不完你
routeros
回复

使用道具 举报

发表于 2009-4-2 00:34:53 | 显示全部楼层
我知道!  但是老妈叫我做人要厚道.
放了一一点脚本 和图有出入 8厚道
routeros
回复

使用道具 举报

发表于 2009-4-2 00:41:46 | 显示全部楼层
小学生 老师叫了1+1=几 至于1+2=几老师都有教  中国人和外国人就有差别 国人老是留一手 说啥教了徒弟饿死师父 根本就是心理作用 老外就8会这样想
哈哈 我只是1线 抱着学习的态度来噶 玩VM玩玩都好
routeros
回复

使用道具 举报

 楼主| 发表于 2009-4-2 00:50:12 | 显示全部楼层
你1线叫我发个5线干吗,两线你都用不上
routeros
回复

使用道具 举报

发表于 2009-4-2 02:51:20 | 显示全部楼层
WGHBOY
能不能给份脚本给我呀
routeros
回复

使用道具 举报

 楼主| 发表于 2009-4-2 04:58:29 | 显示全部楼层
脚本就在上面,2线的,有几根就改几根
routeros
回复

使用道具 举报

发表于 2009-4-2 07:42:40 | 显示全部楼层
哈哈
routeros
回复

使用道具 举报

发表于 2009-4-2 08:31:28 | 显示全部楼层
有请问ADSL接入的脚本吗?
routeros
回复

使用道具 举报

 楼主| 发表于 2009-4-2 18:51:15 | 显示全部楼层
接入还要脚本
routeros
回复

使用道具 举报

 楼主| 发表于 2009-4-2 18:52:59 | 显示全部楼层
/ interface pppoe-client
add name="pppoe-out1" max-mtu=1480 max-mru=1480 interface=2wan \
    user="帐号" password="密码" profile=default \
    service-name="" ac-name="" add-default-route=yes dial-on-demand=no \
    use-peer-dns=no allow=pap,chap,mschap1,mschap2 disabled=no
add name="pppoe-out2" max-mtu=1480 max-mru=1480 interface=5wan \
    user="帐号" password="密码" profile=default \
    service-name="" ac-name="" add-default-route=yes dial-on-demand=no \
    use-peer-dns=no allow=pap,chap,mschap1,mschap2 disabled=no
routeros
回复

使用道具 举报

发表于 2009-4-3 02:36:59 | 显示全部楼层
放嘚太小喇 放多点啊
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-20 04:06 , Processed in 0.100266 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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