肌肉男来
本帖最后由 横山居石 于 2010-4-5 19:49 编辑ROS 2.9.27 PPOE根据人数限速,设置网段10.10.10.0/24
问题:放入scheduler运行时间设置一分钟,无法运行,且之前在scheduler里面可以运行的都不能运行了
在终端里面运行是没有问题的,我现在就郁闷了,你的那个代码我又看不懂,希望过路的大哥们指点一下!!!
代码如下:
:set user1
#以下是删除代码,必段先在Queues里有10.10.10.0/24段的限速些代码才能正常运行
:for ok from=1 to=254 do={queue simple remove ("YES" . $ok)}
:if ($user1 < 4) do={
:for ok from 1 to 254 do={/queue simple add name=(YES . $ok) target-address=(10.10.10. . $ok) limit-at=0/0 max-limit=256000/2048000 burst-limit=256000/3072000 burst-threshold=256000/2048000 burst-time=20s/20s \ interface=all}
}
:if ($user1 < 6) do={
:if ($user1 >= 4) do={
:for ok from 1 to 254 do={/queue simple add name=(YES . $ok) target-address=(10.10.10. . $ok) limit-at=0/0 max-limit=200000/1500000 burst-limit=240000/1800000 burst-threshold=200000/1500000 burst-time=20s/20s \ interface=all}
}}
:if ($user1 < 8) do={
:if ($user1 >= 6) do={
:for ok from 1 to 254 do={/queue simple add name=(YES . $ok) target-address=(10.10.10. . $ok) limit-at=0/0 max-limit=150000/1100000 burst-limit=200000/1500000 burst-threshold=150000/1100000 burst-time=20s/20s \ interface=all}
}}
:if ($user1 < 10) do={
:if ($user1 >= 8) do={
:for ok from 1 to 254 do={/queue simple add name=(YES . $ok) target-address=(10.10.10. . $ok) limit-at=0/0 max-limit=120000/900000 burst-limit=150000/1200000 burst-threshold=120000/900000 burst-time=20s/20s \ interface=all}
}}
:if ($user1 < 12) do={
:if ($user1 >= 10) do={
:for ok from 1 to 254 do={/queue simple add name=(YES . $ok) target-address=(10.10.10. . $ok) limit-at=0/0 max-limit=80000/800000 burst-limit=120000/900000 burst-threshold=80000/800000 burst-time=20s/20s \ interface=all}
}}
:if ($user1 < 14) do={
:if ($user1 >= 12) do={
:for ok from 1 to 254 do={/queue simple add name=(YES . $ok) target-address=(10.10.10. . $ok) limit-at=0/0 max-limit=70000/700000 burst-limit=80000/800000 burst-threshold=70000/700000 burst-time=20s/20s \ interface=all}
}}
:if ($user1 < 16) do={
:if ($user1 >= 14) do={
:for ok from 1 to 254 do={/queue simple add name=(YES . $ok) target-address=(10.10.10. . $ok) limit-at=0/0 max-limit=64000/600000 burst-limit=70000/700000 burst-threshold=64000/600000 burst-time=20s/20s \ interface=all}
}}
:if ($user1 < 18) do={
:if ($user1 >= 16) do={
:for ok from 1 to 254 do={/queue simple add name=(YES . $ok) target-address=(10.10.10. . $ok) limit-at=0/0 max-limit=55000/550000 burst-limit=60000/600000 burst-threshold=55000/550000 burst-time=20s/20s \ interface=all}
}}
:if ($user1 >= 18) do={
:for ok from 1 to 254 do={/queue simple add name=(YES . $ok) target-address=(10.10.10. . $ok) limit-at=0/0 max-limit=55000/512000 burst-limit=60000/512000 burst-threshold=55000/512000 burst-time=20s/20s \ interface=all}
}
另外诚心请教,PPOE限制某一个账号只能上一个网站,其它都封掉,不要笑,本人菜鸟学习中,谢谢!!! 你的ros或者硬件有问题,见过有脚本不能运行的
页:
[1]