Hi, I am new to mikrotik products and scripting, but I am very keen to learn as I want to write a few scripts for bandwidth control and load balancing. I am starting off with the rb750 using routeros v6 and winbox, and using sample scripts from here to try things out, but most of the scripts dont work as they seem to be for older versions of routeros. Am i better starting with an older version of routeros to learn the basics , or is there documentation on here to show the changes that is in v6, so i can modify the scripts from older versions, example : i was stuck for ages trying to run a simple script until i was told that in v6 target-addresses and interface parameters are joined into one target parameter. So for a newbie whats the best way of learning v6 scripts or should i just pay someone to write a few scripts.
There are no need of scripts for the purpose you generally stated. Scripts ere needed in case you need some dynamic behavior that cannot be reached with static configuration.
To clarify @jarda answer you should start by learning standard configuration using console commands. Scripts are in fact extended configuration.
Mikrotik scripts usually are not copy-paste-run solution. After you learn configuration you can start looking into http://wiki.mikrotik.com/wiki/Manual:Scripting and debug existing scripts
I will explain what I am trying to do and then you can decide if i am going the right way about it. I have 20 users and I want to limit each of these to 3gb per day, but when they reach this limit i want their download speed to drop to a certain amount. So the way im thinking of doing is :
(1) From the console I setup a simple que for each user and set a limit on their bandwidth depending on this user .
(2) I write a simple FOR Loop script to check each ip address for the current bytes used, if they exceed the limit then i alter their bandwidth, this script would run every hour.
(3)Create a script in the schedule to run at midnight which resets the bytes used to 0
As the number of users may change etc i want to have it done automatically, so would this be the right way?
Actually you’re right, in that case you need simple script.
Wiki has one - http://wiki.mikrotik.com/wiki/Limiting_a_user_to_a_given_amount_of_traffic_II - also it may be useful to rad through topic http://forum.mikrotik.com//viewtopic.php?t=308