Community discussions

MikroTik App
 
dusan
just joined
Topic Author
Posts: 20
Joined: Wed Oct 27, 2004 11:35 am
Location: Czech Republic, Breclav

Selecting records

Fri Nov 19, 2004 11:29 am

Hi all,
I want to select some simple queues according IP address. I have some queues from subnet 192.168.15.0/24 (about 20 queues). I want to select only them, for example :put [find target-address=192.168.15.xxx], but I' don't know how to express it. I didn't find anyting similar in manuals. Thanks for answers.
 
edzix
Member
Member
Posts: 333
Joined: Thu Jul 01, 2004 3:01 pm
Location: Latvia

Mon Nov 22, 2004 11:43 am

use :for to accomplish this, but in this case those 20 IP should be with the same step. For example, if you have IPs from 192.168.15.10 to 192.168.15.20 then:

/queue simple {:for i from 10 to 20 do=[:put [find target-address=("192.168.15." . $i)]}

Edgars
 
dusan
just joined
Topic Author
Posts: 20
Joined: Wed Oct 27, 2004 11:35 am
Location: Czech Republic, Breclav

Selecting records

Mon Nov 22, 2004 12:02 pm

well, it's not exactly what I wanted, I looked for something like "looking for some*". But this is probably currently unable.
No matter, thanks for answer.
 
edzix
Member
Member
Posts: 333
Joined: Thu Jul 01, 2004 3:01 pm
Location: Latvia

Mon Nov 22, 2004 2:12 pm

maybe you can write what exactly is the aim you want to reach? What would you like to do with those queues which are found?

Edgars
 
dusan
just joined
Topic Author
Posts: 20
Joined: Wed Oct 27, 2004 11:35 am
Location: Czech Republic, Breclav

Selecting records

Mon Nov 22, 2004 7:38 pm

I want to export only a part of all my simple queues, in this example all queues belonging to subnet 192.168.15.0/24. So I want to select all simple queues, that have a begin 192.168.15.xxx:

/queue simple export from [find target-address=192.168.15.10]

this command will export only address 192.168.15.10 and my idea is by some simple trick select all queues with 192.168.15. begining, maybe something like this:

/queue simple export from [find target-address=192.168.15.*]

I didn't find way how to do it, I'm sorry, if I looked bad.
 
edzix
Member
Member
Posts: 333
Joined: Thu Jul 01, 2004 3:01 pm
Location: Latvia

Tue Nov 23, 2004 2:36 pm

no, it's not possible. Maybe in v2.9, but it will be very complex script.

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

Mon Nov 29, 2004 2:45 pm

Very complex script, indeed :lol:
:global temp1; :set temp1 ""; :for i from 1 to 254 do={:set temp1 ($temp1 . "," . [/queue simple find target-address=(192.168.15. . $i)])}; /queue simple export from ($temp1);

Who is online

Users browsing this forum: GoogleOther [Bot], kleshki, rhodri and 39 guests