Community discussions

MikroTik App
 
anscs
just joined
Topic Author
Posts: 8
Joined: Thu Jun 03, 2004 10:13 am
Location: Jakarta - Indonesian

Basic Script Loop Question

Tue Mar 25, 2008 7:12 am

Hi everyone,

I'm using Mikrotik ver 3.4

My script is:
:for e from 5 to 25 do={
/queue simple add name=("IP-" . $e) \
target-addresses=(172.16.10. . $e) \
max-limit=32000/64000 
}
after execution on Winbox Terminal
[admin@Mikrotik] > :for e from 5 to 25 do={
{... /queue simple add name=("IP-" . $e) \                    
{\... target-addresses=(172.16.10. . $e) \
{\... max-limit=32000/64000               
{... }                      
interrupted
           value of target-address must contain '/'
[admin@Mikrotik] >
what's wrong?

if execution on Winbox Terminal with Mikrotik ver 2.9.50 ..... no problem.

thanks

| m | a | m | a | n |
 
User avatar
Letni
Member
Member
Posts: 376
Joined: Tue Dec 05, 2006 5:16 am
Location: South Carolina

Re: Basic Script Loop Question

Tue Mar 25, 2008 7:32 am

V3.4 had some scripting bugs so you should upgrade to 3.6.

Also one major change in V3 is you need to have quotes around your values. So change max-limit=32000/64000 to max-limit="32000/64000" and try again.

-Louis
 
anscs
just joined
Topic Author
Posts: 8
Joined: Thu Jun 03, 2004 10:13 am
Location: Jakarta - Indonesian

Re: Basic Script Loop Question

Tue Mar 25, 2008 8:10 am

V3.4 had some scripting bugs so you should upgrade to 3.6.

Also one major change in V3 is you need to have quotes around your values. So change max-limit=32000/64000 to max-limit="32000/64000" and try again.

-Louis
Dear Louis,

I'm already upgrade from 3.4 to 3.6
but the same as problem

  MMM      MMM       KKK                          TTTTTTTTTTT      KKK
  MMMM    MMMM       KKK                          TTTTTTTTTTT      KKK
  MMM MMMM MMM  III  KKK  KKK  RRRRRR     OOOOOO      TTT     III  KKK  KKK
  MMM  MM  MMM  III  KKKKK     RRR  RRR  OOO  OOO     TTT     III  KKKKK
  MMM      MMM  III  KKK KKK   RRRRRR    OOO  OOO     TTT     III  KKK KKK
  MMM      MMM  III  KKK  KKK  RRR  RRR   OOOOOO      TTT     III  KKK  KKK

  MikroTik RouterOS 3.6 (c) 1999-2008       http://www.mikrotik.com/












  
[admin@Mikrotik] >
[admin@Mikrotik] > :for e from 5 to 25 do={
{... /queue simple add name=("IP-" . $e) \                    
{\... target-addresses=(172.16.10. . $e) \
{\... max-limit="32000/64000"               
{... }                      
interrupted
           value of target-address must contain '/'
[admin@Mikrotik] >

 
anscs
just joined
Topic Author
Posts: 8
Joined: Thu Jun 03, 2004 10:13 am
Location: Jakarta - Indonesian

Re: Basic Script Loop Question

Tue Mar 25, 2008 9:20 am

Problem is solve

just type script like
:for e from 5 to 25 do={
/queue simple add name=("IP-" . $e) \
target-addresses=("172.16.10." . $e . "/32") \
max-limit=32000/64000
}
Thanks for Louis

| m | a | m | a | n |

Who is online

Users browsing this forum: No registered users and 37 guests