Community discussions

MikroTik App
 
palmczak
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 78
Joined: Sat May 29, 2004 7:53 pm

Simple Queues with a script

Sat Dec 04, 2004 3:30 am

Hello,

First let me start by saying that I have no hair left since I pulled it all out trying to get this to work.

That said, would someone please post an example of a script that will add multiple simple queues. I do not care what the name is. nor do I care what the badwidth/speed is I just want to be able to add 75 simple queues all in the same class C (ie. 192.168.1.x). No matter what I try all I get is a log entry ---- "invalid expression"

Also I do not want to use PCQ.

I have searched the forums as well as the doc's so I do not need a referal to them.

Thanks

Joe
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 986
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Mon Dec 06, 2004 10:43 am

As easy as that:
:for i from=1 to=75 do={/queue simple add target-address=(192.168.1. . $i . "/32") max-limit=56000}
And to remove all this:
/queue simple remove [find]
Eugene
 
palmczak
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 78
Joined: Sat May 29, 2004 7:53 pm

Mon Dec 06, 2004 4:11 pm

Thanks that was what I needed!

Joe
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re:

Wed Sep 01, 2021 8:56 pm

Better, also for remove, and target-address do not (longer) exist:
:for i from=101 to=175 do={
    /queue simple add name="queue-$i" target="192.168.1.$i/32" limit-at=64k/64k max-limit=10M/1M priority=6/4 comment="some comment"
}

/queue simple remove [find where comment="some comment"]

Who is online

Users browsing this forum: Google [Bot] and 22 guests