Mikrotik Scripting – Array Push Function

Since the scripting language at the moment on Router OS version 6.13 is lacking in the array editing department, here is a simple array push function I created.

# Usage: [$arrayPush <$array name> <value> <key position to place value (0-n or -1)>]
# Input an array name, value, and the key position to push the value to. To push value to the end of the array, enter -1.
# If array doesn't already exist, you must declare the variable and set it to "" before calling the function.
 Continue reading "Mikrotik Scripting – Array Push Function"

Mikrotik Scripting – Function to Split an IP Address into an Array

If you are unfamiliar with Mikrotik networking equipment, do yourself a favor and check them out at mikrotik.com or routerboard.com. Mikrotik uses Router OS, a Linux based operating system. In my eyes, they are every bit as comparable to Cisco at a fraction of the price with an impressive and robust GUI. I’ve been using them in production environments for six years with outstanding results. What other networking equipment has it’s own scripting language? None that I know of. The CCR series of routers with up to 36 processor cores are unparalleled in performance and flexibility.
Continue reading “Mikrotik Scripting – Function to Split an IP Address into an Array”