RouterOS Scripts RouterOS Script

Various maybe good examples of RouterOS scripting functions. See MikroTik’s Scripting Language Manual for syntax and structure, and basic examples. For more practical scripts, see ✗ Rextended Fragments of Snippets.

TUI & Bridge Tools

$lsbridge

“Visualizes” the VLAN-aware bridge settings in the terminal. Even “view-only”, a handy tool to “see” the bridge settings. Eventually, interactive control will be added.

$lsbridge output showing bridge VLAN visualization
$lsbridge showing bridge VLAN configuration on a hex S

See the forum post for code and more screenshots. Script download (requires 7.18+)

$mkvlan / $rmvlan / $catvlan

VLAN automation scripts for RouterOS — add L3 VLANs and manage bridge ports/VLANs. The autovlan.rsc file contains $mkvlan, $rmvlan, $catvlan, and related functions.

Script download (requires 7.17+)

Interactive Functions

$PIANO

Interactive “player piano” and studio-quality recorder using :beep.

$INQUIRE + $CHOICES + $QKEYS

Prompt user for input using arrays — flexible interactive selection helpers for RouterOS scripts.

$ROKU

The missing Roku TV remote for RouterOS.

Utility Functions

$ZT2DNS

Import ZeroTier Members into MikroTik DNS, with 6PLANE support.

$npushover

Send messages to pushover.net — an example of using JSON, arrays, and /tool/fetch.

$updateDynu

Update IP to DNS mappings at dynu.com for DDNS support.

Track LTE Signal using The Dude

Not really a RouterOS function — but provides an example of The Dude’s array_element() and oid_column() functions to handle name to OID mapping.