Tag Archives: ROS

Scriptlet: Find Default Route Interface Names (and a free licence!)

Today I’m giving you the task of reviewing and improving a small script I’ve written, and one of you will win a free Level 4 RouterOS licence. 

Background: I had need of a script to find the interfaces associated with any default routes in order to create matching firewall entries, and it had to work with RouterOS v6.

This script searches through any default route (dst-address= and adds it to an array so long as the interface can’t already be found in the array. I don’t often use arrays in MikroTik so the first version has a search function that doesn’t loop through the array, but instead just converts it to a string again to run the find command (Line 8)

Continue reading Scriptlet: Find Default Route Interface Names (and a free licence!)

Mikrotik Script: Alert on queue tree limit exceeded

Hi guys,

This is my first post here, I’m a Network Engineer who works a lot with Mikrotik devices and Server Administration and you can see more of my posts on my website. I found this blog some time ago and was invited to contribute with some of my own scripts that may help others!

Today i’ll show you a little script for RouterOS to check if queue tree exceed the limit you set.

For. Example I’ve got a queue tree that limits the amount of total traffic (Upload+Download) to 50Mbps.

I want to know whenever this queue exceed the limit, and I want the system to send me an email.

This is the script:

:global checkrate [/queue tree get total-traffic rate]
:local limit 50000000

:if ( $checkrate < $limit ) do={
:log info ("Queue not Exceeded")
:if ( $checkrate > $limit ) do={
:log info ("Queue Exceeded")
/tool e-mail send server=xxx.xxx.xxx.xxx from="me@myself.com" to="me@myself.com" subject=("Queue Limit Exceed") body=("Queue Limit Exceed, Limit is: " . $checkrate)

The Mother of all QoS Trees – v6.0

Contained in this post is a free copy of my 2013 QoS tree (compatible with v6.0) for anyone to do what they want with, I only ask that if you republish this you include a link to this post.

It is intended to work on a per-interface basis; with you specifying the WAN interface and the speed limit it is to have. You can then use simple-queues for your internal users for a full double-qos solution.

Continue reading The Mother of all QoS Trees – v6.0

Study guide: Moving up to RouterOS v6

Given v6.0 stable is now upon us I’ve taken some time to collate some of the posts I’ve been familiarising myself with over the last few weeks to understand the major changes that have been implemented in this release and how to best upgrade and make use of these.


I’ve tagged some videos and forum posts below with topics breakdowns for ease of review

Continue reading Study guide: Moving up to RouterOS v6