Community discussions

MikroTik App

Search found 159 matches

by jeroenp
Sat Feb 18, 2017 5:51 pm
Forum: Beginner Basics
Topic: Script needed for turning CRS-226 in 3 seperate switches
Replies: 0
Views: 604

Script needed for turning CRS-226 in 3 seperate switches

I had planned to do some Mikrotik research this weekend to turn a stock CRS-226 into 3 separate switches: - Switch 1 having ports sfp-sfplus1, eth1..eth8 - Switch 2 having ports sfplus2, eth9..eth15 - Switch 3 having ports eth16..eth23 DHCP clients on sfp-plus1, eth1, sfplus2, eth9, eth16 so I can s...
by jeroenp
Fri Dec 09, 2016 10:56 pm
Forum: Scripting
Topic: How can I export dynamic address list entries?
Replies: 7
Views: 15748

Re: How can I export dynamic address list entries?

One more variation for previous one: /execute script="foreach k,v in [/ip address find dynamic=yes] do={:put [/ip address get \$v address];}" file=dynaddresses.txt Possibly can export longer 4096 bytes due to not uses string buffer but not sure - need to be checked I encapsulated everythi...
by jeroenp
Wed Nov 30, 2016 11:50 pm
Forum: Scripting
Topic: Blacklist Filter update script
Replies: 632
Views: 213597

Re: Blacklist Filter update script

My only wish would be that all of these routers were able to send back addresses that they are attacked by. Unfortunately, there is no good way without putting their privacy at risk. Let's discuss (in a new thread if needed) on how to make this possible. I'm keeping dynamic login failure and unknow...
by jeroenp
Wed Nov 30, 2016 11:42 pm
Forum: General
Topic: Bug: Winbox 3.7 incompatible with RouterOS 6.9 Quick Set
Replies: 12
Views: 2600

Re: Bug: Winbox 3.7 incompatible with RouterOS 6.9 Quick Set

This has been discussed before. Not all bugs are affecting everyone, not all bugs should be made public, not all complaints in the forum are bugs. In that case I will use e-mail and schedule parts of the resulting thread as blog posts so they are part of my publicly searchable knowledge base at my ...
by jeroenp
Tue Nov 22, 2016 10:32 pm
Forum: Scripting
Topic: How can I export dynamic address list entries?
Replies: 7
Views: 15748

Re: How can I export dynamic address list entries?

Bump. Anyone?

--jeroen
by jeroenp
Tue Nov 22, 2016 10:31 pm
Forum: General
Topic: Bug: Winbox 3.7 incompatible with RouterOS 6.9 Quick Set
Replies: 12
Views: 2600

Re: Bug: Winbox 3.7 incompatible with RouterOS 6.9 Quick Set

I stopped reporting bugs using private means whenever no private details are involved. Makes is much easier to track and for others to follow/comment on. That is not a good idea. It is very difficult to track each response in the forum. If you want MikroTik staff to accept your report, please email...
by jeroenp
Thu Nov 17, 2016 11:45 am
Forum: General
Topic: Bug: Winbox 3.7 incompatible with RouterOS 6.9 Quick Set
Replies: 12
Views: 2600

Re: Bug: Winbox 3.7 incompatible with RouterOS 6.9 Quick Set

So above is the bug report; please administer in your systems the way you can handle it best. The problem with this approach is this is a user forum, and not an official support platform. And unless you write to support@ your report is very likely to remain completely unnoticed by the Mikrotik staf...
by jeroenp
Wed Nov 16, 2016 12:53 am
Forum: Scripting
Topic: How can I export dynamic address list entries?
Replies: 7
Views: 15748

How can I export dynamic address list entries?

Some of my address list entries are dynamic.

This does not export them as it only exports the non-dynamic entries:
/ip firewall address-list export
How can I export dynamic address list entries?

--jeroen
by jeroenp
Tue Nov 15, 2016 3:51 pm
Forum: General
Topic: Bug: Winbox 3.7 incompatible with RouterOS 6.9 Quick Set
Replies: 12
Views: 2600

Re: Bug: Winbox 3.7 incompatible with RouterOS 6.9 Quick Set

I stopped reporting bugs using private means whenever no private details are involved. Makes is much easier to track and for others to follow/comment on.

So above is the bug report; please administer in your systems the way you can handle it best.
by jeroenp
Sat Nov 12, 2016 3:42 pm
Forum: General
Topic: Bug: Winbox 3.7 incompatible with RouterOS 6.9 Quick Set
Replies: 12
Views: 2600

Bug: Winbox 3.7 incompatible with RouterOS 6.9 Quick Set

EuroDK delivers CRS226 devices with not so recent firmware: Image

It reveals a WinBox 3.7 bug:

In WinBox 3.7, when clicking "Quick Set", WinBox hangs and never shows the dialog.

--jeroen
by jeroenp
Fri Nov 04, 2016 2:29 am
Forum: General
Topic: Odd error when logging on to the forum
Replies: 0
Views: 644

Odd error when logging on to the forum

I just got this error a few minutes ago when logging on to the forum: General Error SQL ERROR [ mysql4 ] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''################\ WHERE user_id = #####' at line 1 [1064]...
by jeroenp
Wed Nov 02, 2016 3:29 pm
Forum: Scripting
Topic: What topic can be used to monitor global variable modifications?
Replies: 0
Views: 719

What topic can be used to monitor global variable modifications?

I'd like to monitor global variable modifications (assignments, removals) to assist debugging a few of my scripts.

What topics can be used from http://wiki.mikrotik.com/wiki/Manual:System/Log#Topics for this? I tried `debug` and `script` but these don't work.

--jeroen
by jeroenp
Mon Oct 31, 2016 1:03 pm
Forum: Scripting
Topic: inverse of :toarray to create a CSV string
Replies: 2
Views: 1676

Re: inverse of :toarray to create a CSV string

Bump.

Anyone having a good idea for this (apart from manually assembling the CSV).

--jeroen
by jeroenp
Mon Oct 31, 2016 10:08 am
Forum: Scripting
Topic: What forms of IPv4 addresses does Mikrotik accept?
Replies: 2
Views: 943

What forms of IPv4 addresses does Mikrotik accept?

http://wiki.mikrotik.com/wiki/Manual:IP/Address doesn't detail what forms of IPv4 addresses are being accepted. For instance inet_addr accepts a much wide range of input (like leading zero for octal and many other forms) than the often used human readable quad-dotted decimal form a.b.c.d.e where a c...
by jeroenp
Thu Oct 27, 2016 1:28 pm
Forum: Scripting
Topic: Function like :find but with POSIX support?
Replies: 0
Views: 828

Function like :find but with POSIX support?

Given that the `~` operator has partial POSIX regular expression support : is there a function that works like `:find` but also supports regular expressions? find :find <arg> <arg> <start> return position of substring or array element :put [:find "abc" "a" -1]; --jeroen
by jeroenp
Mon Oct 24, 2016 9:56 am
Forum: Scripting
Topic: [Mikrotik follow-up needed] Router OS 6.37.1 - scheduled script cannot execute script
Replies: 3
Views: 2600

Re: [Mikrotik follow-up needed] Router OS 6.37.1 - scheduled script cannot execute script

I think you got it completely wrong. Problem why scheduler cannot execute script is because script as more permissions than scheduler Isn't that the point I made in2. of my previous post : 1. the `testFunctionScript` needs at least these policies to call a function: `read`, `write`, `policy`, `test...
by jeroenp
Sun Oct 23, 2016 8:05 pm
Forum: Scripting
Topic: script repository update: new docs, new/updated scripts (mostly date/time related)
Replies: 0
Views: 777

script repository update: new docs, new/updated scripts (mostly date/time related)

Two new updates to https://github.com/jpluimers/mikrotik-routeros Feel free to post issues at https://github.com/jpluimers/mikrotik-routeros/issues - documentation update in https://github.com/jpluimers/mikrotik-routeros/blob/master/scripts/README.rst - updated and new scripts with: Code cleanup, a ...
by jeroenp
Sun Oct 23, 2016 3:07 pm
Forum: Scripting
Topic: [Mikrotik follow-up needed] Router OS 6.37.1 - scheduled script cannot execute script
Replies: 3
Views: 2600

Re: Router OS 6.37.1 - scheduled script cannot execute script

Later: I found out two things: 1. the `testFunctionScript` needs at least these policies to call a function: `read`, `write`, `policy`, `test` 2. a `schedule` needs at least the same permissions as a script in order to run the script at all This is how the various permissions affect the `testFunctio...
by jeroenp
Sun Oct 23, 2016 8:44 am
Forum: Scripting
Topic: [Mikrotik follow-up needed] Router OS 6.37.1 - scheduled script cannot execute script
Replies: 3
Views: 2600

[Mikrotik follow-up needed] Router OS 6.37.1 - scheduled script cannot execute script

I've read the proposed workaround at Problem with global variables with Scripts running from the scheduler The below code fails in RouterOS 6.37.1: 1. Create a global variable having a function 2. Access that variable from a script (getting typeinfo or running it) then log the results 3. Run the scr...
by jeroenp
Sat Oct 22, 2016 8:48 pm
Forum: Scripting
Topic: Are there unit testing scripts or provisions for RouterOS code?
Replies: 2
Views: 1117

Re: Are there unit testing scripts or provisions for RouterOS code?

RouterOS scripting is too "simple" (as in... "not good") for a unit testing framework to be reliably written in it, which in turn means there's no viable way to internally do such tests. You could use the API to do that, i.e. run scripts to run, then analyze their output, and us...
by jeroenp
Sat Oct 22, 2016 12:14 pm
Forum: Scripting
Topic: Are there unit testing scripts or provisions for RouterOS code?
Replies: 2
Views: 1117

Are there unit testing scripts or provisions for RouterOS code?

In my day-to-day life as software developer I do a lot of unit testing mostly using xUnit like or derived frameworks even for scripting.

So: are there any kinds of RouterOS scripts available to help with unit testing?

Various search attempts didn't reveal any to me yet.

--jeroen
by jeroenp
Sat Oct 22, 2016 12:04 pm
Forum: Scripting
Topic: [Needs Mikrotik feedback] `reject-with` values are not documented any more
Replies: 6
Views: 2420

Re: [Needs Mikrotik feedback] `reject-with` values are not documented any more

Let me do that for you http://lmgtfy.com/?q=icmp+admin+prohibited+code&l=1#seen BTW there is no integer code in ROS v6. Your post was *not* helpful, especially not in your role as Mikrotik Support employee . In that light I regard your post even as unprofessional especially since you insinuate ...
by jeroenp
Wed Oct 19, 2016 10:39 pm
Forum: Scripting
Topic: [Mikrotik documentation needed] limitations on string lengths of properties
Replies: 0
Views: 684

[Mikrotik documentation needed] limitations on string lengths of properties

I was a bit surprised that a the `log-prefix` property of type `string` is actually limited to 31 significant characters. Even though you can enter `__BRIDGE_LAN_DHCP_REQUEST_GENERIC_LAN` in Winbox and on the console, the `log` will only show `__BRIDGE_LAN_DHCP_REQUEST_GENER`. Apparently the limit i...
by jeroenp
Wed Oct 19, 2016 10:37 pm
Forum: Announcements
Topic: Winbox 3.7 released!
Replies: 62
Views: 140145

Re: Winbox 3.7 released!

To do a console access to copy an IP address to ping it is a little overblown :lol: It takes less to just write it by hand... Just pointing out such a necessity on the log window. I totally agree with you. Mikrotik is needs to work hard at improving usability of their software and readability of th...
by jeroenp
Wed Oct 19, 2016 10:31 pm
Forum: Scripting
Topic: [Needs Mikrotik feedback] `reject-with` values are not documented any more
Replies: 6
Views: 2420

Re: [Needs Mikrotik feedback] `reject-with` values are not documented any more

http://wiki.mikrotik.com/wiki/Manual:IP/Firewall/Filter does not document the `reject-with` values any more. With the exception of "integer" (mentioned by Boen Robot) these response types are standard IP packet types. If you want to learn about those, then just google for any networking t...
by jeroenp
Wed Oct 19, 2016 6:40 pm
Forum: Announcements
Topic: Winbox 3.7 released!
Replies: 62
Views: 140145

Re: Winbox 3.7 released!

Is there a way to select/copy text from log via winbox? At least a single line/part of a single line? Unlike all the other grids, the log one is still very limited in functionality (for instance you cannot resize or select columns) and misses copy-to-clipboard functionality. The best you can do is ...
by jeroenp
Wed Oct 19, 2016 6:29 pm
Forum: Scripting
Topic: Blacklist Filter update script
Replies: 632
Views: 213597

Re: Blacklist Filter update script

... here are my current "starter set" for most new routers I deploy. ... Notice that the inbound blacklist drops are in the raw table, while the outbound are in the filter table. Also inbound are drops, outbound are ICMP Admin Prohibited. Thanks again. There is still a lot of stuff to be ...
by jeroenp
Wed Oct 19, 2016 6:26 pm
Forum: Scripting
Topic: [Needs Mikrotik feedback] `reject-with` values are not documented any more
Replies: 6
Views: 2420

[Needs Mikrotik feedback] `reject-with` values are not documented any more

http://wiki.mikrotik.com/wiki/Manual:IP/Firewall/Filter does not document the `reject-with` values any more. https://www.google.com/search?q=%22reject-with%22+mikrotik+site:wiki.mikrotik.com%2Fwiki%2FManual reveals one tiny example with one value not explaining what it means. Please re-add the relev...
by jeroenp
Tue Oct 18, 2016 11:14 pm
Forum: Scripting
Topic: Blacklist Filter update script
Replies: 632
Views: 213597

Re: Blacklist Filter update script

You are welcome to change the script and rules as much as you like. Script is written as it is because it works without fail on all 6.x versions. I don't normally change things if they are working. The rules in the first post do have the blacklist drops at the top. However, most by this point shoul...
by jeroenp
Mon Oct 17, 2016 10:07 pm
Forum: Scripting
Topic: Blacklist Filter update script
Replies: 632
Views: 213597

Re: Blacklist Filter update script

Any reason the below suggestions never made it to the updateBlacklist script? (note that I've already updated the first code fragment below from `intrusBlacklist` to `dynamicBlacklist`) Same for the ordering of the firewall rules further below: any reason why? :foreach i in=[/ip firewall address-lis...
by jeroenp
Mon Oct 17, 2016 10:08 am
Forum: General
Topic: Bug in WinBox 3.4/3.6/3.7 - ctrl-tab / ctrl-shift tab switch focus outside current window.
Replies: 0
Views: 630

Bug in WinBox 3.4/3.6/3.7 - ctrl-tab / ctrl-shift tab switch focus outside current window.

Bug in WinBox 3.4/3.6/3.7 - ctrl-tab / ctrl-shift tab switch focus outside current window. There are multiple manifestations of this issue but I suspect a central flaw in Ctrl-Tab handling so I provide two set of steps to reproduce. Both sets *only* reproduce when in fact going from a `list` type of...
by jeroenp
Fri Oct 14, 2016 4:28 pm
Forum: General
Topic: Improved String Matching ( Netfilter based) in IP Firewall
Replies: 2
Views: 2686

Re: Improved String Matching ( Netfilter based) in IP Firewall

Did anything ever come out of this?

--jeroen
by jeroenp
Fri Oct 14, 2016 1:25 pm
Forum: Scripting
Topic: [Answered] Shortcut "goto" like constructs possible?
Replies: 2
Views: 1636

Re: [Answered] Shortcut "goto" like constructs possible?

Thanks for confirming my suspicion of `:return` being the only such construct.

--jeroen
by jeroenp
Fri Oct 14, 2016 1:22 pm
Forum: Scripting
Topic: [Mikrotik follow-up needed] Any way to persist a :global variable so it survives reboot?
Replies: 5
Views: 1991

Re: Any way to persist a :global variable so it survives reboot?

:put [/system logging action print as-value where name=failedauth ] The not so cool (or - even though it's a bug - maybe cool), is that WinBox does not allow setting this comment. Woot! You can set and retrieve the comment. But WinBox won't show it or allow you to change it. Pixie dust! /system log...
by jeroenp
Thu Oct 13, 2016 10:15 pm
Forum: Scripting
Topic: [Answered] Shortcut "goto" like constructs possible?
Replies: 2
Views: 1636

[Answered] Shortcut "goto" like constructs possible?

Are any of the below "goto" like constructs possible? If so, how?

- function/procedure exit
- loop break
- loop continue

--jeroen
by jeroenp
Thu Oct 13, 2016 9:20 pm
Forum: Scripting
Topic: [Mikrotik follow-up needed] Any way to persist a :global variable so it survives reboot?
Replies: 5
Views: 1991

Re: Any way to persist a :global variable so it survives reboot?

The "/system note" is a good place. It is displayed at the start of every terminal session, but beyond that, it doesn't ever "do" anything. Alternatively, you could create a custom disabled item at any menu, and use it as a comment. By virtue of being disabled, it won't do anyth...
by jeroenp
Thu Oct 13, 2016 7:30 pm
Forum: Scripting
Topic: bug: Mikrotik script regex fails to support POSIX character classes like [:digit:]
Replies: 0
Views: 1092

bug: Mikrotik script regex fails to support POSIX character classes like [:digit:]

http://wiki.mikrotik.com/wiki/Manual:Scripting#Other_Operators documents “~” as binary operator that matches value against POSIX extended regular expression Part of http://www.regular-expressions.info/posixbrackets.html Basic Regular Expressions is support for POSIX Bracked Expressions http://www.re...
by jeroenp
Thu Oct 13, 2016 6:04 pm
Forum: Scripting
Topic: [Mikrotik follow-up needed] Any way to persist a :global variable so it survives reboot?
Replies: 5
Views: 1991

Re: Any way to persist a :global variable so it survives reboot?

Try store them in "comment"
What entity types would best be suited for such a comment?

--jeroen
by jeroenp
Thu Oct 13, 2016 4:33 pm
Forum: Scripting
Topic: inverse of :toarray to create a CSV string
Replies: 2
Views: 1676

inverse of :toarray to create a CSV string

I posted in the wrong forum before, so I will delete this from "General" soon: http://forum.mikrotik.com/viewtopic.php?f=2&t=113373 as it better fits the Scripting forum: `:toarray` can be used to split a CSV string into parts as documented at http://wiki.mikrotik.com/wiki/Script_to_fi...
by jeroenp
Thu Oct 13, 2016 4:31 pm
Forum: Scripting
Topic: Looking for example code for associative arrays containing records
Replies: 0
Views: 638

Looking for example code for associative arrays containing records

I posted in the wrong forum before, so I will delete this from "General" soon: http://forum.mikrotik.com/viewtopic.php?f=2&t=113364 as it better fits the Scripting forum: I'm trying to rewrite http://www.vulninfo.com/index.php/block-ssh-brute-force-on-mikrotik-routeros/ as it's buggy a...
by jeroenp
Thu Oct 13, 2016 4:29 pm
Forum: Scripting
Topic: [Mikrotik follow-up needed] Any way to persist a :global variable so it survives reboot?
Replies: 5
Views: 1991

[Mikrotik follow-up needed] Any way to persist a :global variable so it survives reboot?

I'm looking for a way to persist a :global variable so it survives a reboot.

Any ideas?

--jeroen
by jeroenp
Thu Oct 13, 2016 10:47 am
Forum: Announcements
Topic: Winbox 3.7 released!
Replies: 62
Views: 140145

Re: Winbox 3.7 released!

The Mac version has been updated as well: - http://joshaven.com/Winbox4Mac_3.7.dmg - http://joshaven.com/resources/tools/winbox-for-mac/ --jeroen You don't have to repackage the Mac version. Just download this: http://mikrotikdownload.s3.amazonaws.com/WinBox-macOS.zip and use Check for Updates to h...
by jeroenp
Thu Oct 13, 2016 10:13 am
Forum: Scripting
Topic: How to clear a logging action buffer?
Replies: 0
Views: 1543

How to clear a logging action buffer?

Given a logging action buffer in memory, how do I clear it? For instance this logging action buffer `failedauth`: /system logging action add memory-lines=1000 memory-stop-on-full=no name=failedauth target=memory /system logging add action=failedauth disabled=no prefix="" topics=critical,sy...
by jeroenp
Thu Oct 13, 2016 9:32 am
Forum: Scripting
Topic: is there any associative array, hash, map?
Replies: 24
Views: 8922

Re: is there any associative array, hash, map?

Can I create an associative array as a global variable without defining the how many elements there will be in the array? Yes you can; I asked this a while ago myself at http://forum.mikrotik.com/viewtopic.php?p=418796#p549154 ## set empty associative array: http://forum.mikrotik.com/viewtopic.php?...
by jeroenp
Wed Oct 12, 2016 9:30 pm
Forum: General
Topic: inverse of :toarray to create a CSV string
Replies: 0
Views: 711

inverse of :toarray to create a CSV string

`:toarray` can be used to split a CSV string into parts as documented at http://wiki.mikrotik.com/wiki/Script_to ... f_the_week

What is the inverse? i.e. how can you convert an array of strings into a CSV string (apart from manually coding a loop)?

--jeroen
by jeroenp
Wed Oct 12, 2016 9:23 pm
Forum: General
Topic: [Answered] Where are ip firewall address-list timeout values documented
Replies: 5
Views: 9337

Re: [Answered] Where are ip firewall address-list timeout values documented

Thanks guys. Mikrotik should hire you to improve the documentation.

--jeroen
by jeroenp
Wed Oct 12, 2016 6:40 pm
Forum: General
Topic: [Answered] Where are ip firewall address-list timeout values documented
Replies: 5
Views: 9337

[Answered] Where are ip firewall address-list timeout values documented

http://wiki.mikrotik.com/wiki/Manual:IP ... dress_list doesn't tell how `timeout` values can be formulated. It only has one example `5m` which I guess is minutes.

What other units or combination of units are possible to specify a valid timeout?

--jeroen
by jeroenp
Wed Oct 12, 2016 6:24 pm
Forum: Announcements
Topic: Winbox 3.7 released!
Replies: 62
Views: 140145

Re: Winbox 3.7 released!

by jeroenp
Wed Oct 12, 2016 6:06 pm
Forum: General
Topic: Looking for example code for associative arrays containing records
Replies: 0
Views: 626

Looking for example code for associative arrays containing records

I'm trying to rewrite http://www.vulninfo.com/index.php/block-ssh-brute-force-on-mikrotik-routeros/ as it's buggy and slow. Associative arrays of integers make it a lot faster, but I also want to allow tagging the various service names in the log (web for www, etc), so I'm thinking about associative...
by jeroenp
Tue Oct 11, 2016 10:05 pm
Forum: General
Topic: [Answered] How can I manually add log entries from a script?
Replies: 2
Views: 2856

Re: How can I manually add log entries from a script?

:log info "hello world";
Thanks.
by jeroenp
Tue Oct 11, 2016 9:11 pm
Forum: General
Topic: [Answered] How can I manually add log entries from a script?
Replies: 2
Views: 2856

[Answered] How can I manually add log entries from a script?

When running a script I often want to log information.

I could not find how to do that in the WiKi, but knowing how sparse that is:
How can I add log entries from a script?

--jeroen
by jeroenp
Tue Oct 11, 2016 9:02 pm
Forum: General
Topic: Torch not working with CRS226-24G-2S+
Replies: 5
Views: 1871

Re: Torch not working with CRS226-24G-2S+

But, when using Bridge, all ports share a single 1 gbps link to the CPU, so your layer 2 performance will suffer horribly. If you need to see all the traffic from a single port when using Master/slave port configuration, use port mirroring. Interesting! What steps are needed to set that up? --jeroen
by jeroenp
Tue Oct 11, 2016 9:53 am
Forum: General
Topic: Torch not working with CRS226-24G-2S+
Replies: 5
Views: 1871

Re: Torch not working with CRS226-24G-2S+

See http://forum.mikrotik.com/viewtopic.php?t=68619#p348979 If you want to see the traffic in torch, use "/interface bridge". You are using the "master-port" function which is different. Take a look at the diagrams in this wiki article: http://wiki.mikrotik.com/wiki/Manual:Switch...
by jeroenp
Tue Oct 11, 2016 9:28 am
Forum: Announcements
Topic: Winbox 3.7 released!
Replies: 62
Views: 140145

Manually updating winbox-for-mac to 3.7 (was: Winbox 3.7 released!)

In case you want to patch up your Mac OS X version manually: rsync -avloz /Applications/Winbox4Mac.app/ /Applications/Winbox4Mac-3.7.app/ cd /Applications/Winbox4Mac-3.7.app/Contents/Resources/drive_c/Program\ Files/MikroTik curl http://download2.mikrotik.com/routeros/winbox/3.7/winbox.exe --output ...
by jeroenp
Mon Oct 10, 2016 10:15 pm
Forum: General
Topic: Bug in WinBox 3.6/3.7 - edit interface address list entry pointing to non-IPv4 with a new IPv4 value fails
Replies: 0
Views: 555

Bug in WinBox 3.6/3.7 - edit interface address list entry pointing to non-IPv4 with a new IPv4 value fails

Bug in WinBox 3.6/3.7 - edit interface address list entry pointing to non-IPv4 with a new IPv4 value fails Steps to reproduce in 3.6 and 3.7 (cannot test 3.4 as it doesn't support Router OS 6.37.1 any more) with CCR1009 running Router OS 6.37.1: 1. Add a new interface address list entry FOO with val...
by jeroenp
Mon Oct 10, 2016 6:57 pm
Forum: General
Topic: [Mikrotik follow-up needed] Address Lists
Replies: 2
Views: 771

[Mikrotik follow-up needed] Address Lists

A few things I wonder after reading http://wiki.mikrotik.com/wiki/Manual:IP/Firewall/Address_list are these: - Can you recurse Address Lists? For example, does this work? /ip firewall address-list add list=LAN_local address=192.168.71.0/24 /ip firewall address-list add list=LANs_remote address=192.1...
by jeroenp
Mon Oct 10, 2016 6:29 pm
Forum: General
Topic: [Answered] Forum very slow today?
Replies: 1
Views: 588

[Answered] Forum very slow today?

At my side (tested various ISPs from various locations), the forum seems very very slow today. Page loading in seconds (often 10 or more) occurs very often.

Any other people observing the same?

--jeroen
by jeroenp
Sun Oct 09, 2016 5:47 pm
Forum: Beginner Basics
Topic: [Answered] What is the meaning of MPLS entries in traceroute output?
Replies: 2
Views: 1369

Re: What is the meaning of MPLS entries in traceroute output?

This happens when the "ICMP multi-part extension" is present.
It's explained in some detail here: http://rtodto.net/traceroute-in-mpls-icmp-tunneling/[/quote]

Thanks! Learned a few new things today (:

--jeroen
by jeroenp
Sun Oct 09, 2016 10:20 am
Forum: General
Topic: PCC "chain=policy_routing" versus "chain=prerouting"
Replies: 0
Views: 539

PCC "chain=policy_routing" versus "chain=prerouting"

Some PCC examples use "chain=policy_routing" and other use "chain=prerouting" for the "action=mark-connection" with "per-connection-classifier" mangles. For instance http://mum.mikrotik.com/presentations/ZA13/bisschoff.pdf versus http://mum.mikrotik.com/presen...
by jeroenp
Sun Oct 09, 2016 8:37 am
Forum: Beginner Basics
Topic: [Answered] What is the meaning of MPLS entries in traceroute output?
Replies: 2
Views: 1369

[Answered] What is the meaning of MPLS entries in traceroute output?

I see MPLS in some of my traceroute outputs. What is their meaning? (not sure why the `code` sections insert extra line breaks so I've included screenshots for readablity) https://www.dropbox.com/s/eu8k13r5h8i1758/Screenshot%202016-10-09%2007.22.47.png?dl=0 https://www.dropbox.com/s/eu8k13r5h8i1758/...
by jeroenp
Sun Oct 09, 2016 8:30 am
Forum: Beginner Basics
Topic: [Answered] Bridging vs Master Port - when to choose which?
Replies: 6
Views: 7758

Re: Bridging vs Master Port - when to choose which?

PtMP refers to Point-to-Multipoint, WISP refers to Wireless Internet Service Provider.
Thanks again.

--jeroen
by jeroenp
Fri Oct 07, 2016 11:55 pm
Forum: Beginner Basics
Topic: [Mikrotik documentation needed] Where is the RouterOS / WinBox compatibility or requirements matrix?
Replies: 3
Views: 983

Re: Where is the RouterOS / WinBox compatibility or requirements matrix?

I have not found anything worse on winbox 3.6 compared to 3.4.
I've the feeling it crashes on me more often than 3.4
And the menu's don't fit.

--jeroen
by jeroenp
Fri Oct 07, 2016 11:54 pm
Forum: Beginner Basics
Topic: [Mikrotik documentation needed] Firewall connection tracking enabled auto vs yes - what's the difference?
Replies: 4
Views: 1115

Re: Firewall connection tracking enabled auto vs yes - what's the difference?

It will auto-enable when you add NAT rules.
You can force-enable if you want filter rules without NAT.
Thanks. Someone should add that to the docs.

--jeroen
by jeroenp
Fri Oct 07, 2016 11:51 pm
Forum: General
Topic: [Mikrotik documentation needed] What happened to "/interface list"
Replies: 3
Views: 1319

Re: What happened to "/interface list"

its available from 6.36.
I recomend you to upgrade to latest one.
Can someone update the docs for features requiring a minimum RouterOS version?

Thanks,

--jeroen
by jeroenp
Fri Oct 07, 2016 11:46 pm
Forum: Beginner Basics
Topic: [Answered] Why are some of my routes blue?
Replies: 2
Views: 6501

Re: Why are some of my routes blue?

The blue ones are not active. It's how it works, if you have multiple default routes, only one "wins". The way to use multiple WANs is to add default routes with different routing mark each, and then set up some rules to mark routing, i.e. tell the traffic which route it should use. It's ...
by jeroenp
Fri Oct 07, 2016 11:44 pm
Forum: Beginner Basics
Topic: [Answered] Bridging vs Master Port - when to choose which?
Replies: 6
Views: 7758

Re: Bridging vs Master Port - when to choose which?

Thanks for all the answers.

What's PtMP and WISP?
by jeroenp
Fri Oct 07, 2016 6:58 am
Forum: Beginner Basics
Topic: [Answered] Bridging vs Master Port - when to choose which?
Replies: 6
Views: 7758

[Answered] Bridging vs Master Port - when to choose which?

I read an interesting article on master ports: http://www.manitonetworks.com/mikrotik/2016/5/22/master-port-configuration There is also the possibility to bind ports together using bridging. What are the pro's and cons for both solutions? Do bridges benefit from all ports in a bridge being on the sa...
by jeroenp
Thu Oct 06, 2016 8:56 pm
Forum: Beginner Basics
Topic: [Mikrotik documentation needed] Firewall connection tracking enabled auto vs yes - what's the difference?
Replies: 4
Views: 1115

Re: Firewall connection tracking enabled auto vs yes - what's the difference?

Auto means off by default until some other feature needs it. Typically firewall....
So what features need it?
And what features that don't need it can benefit from it?

--jeroen
by jeroenp
Thu Oct 06, 2016 8:45 pm
Forum: Beginner Basics
Topic: [Mikrotik documentation needed] Where is the RouterOS / WinBox compatibility or requirements matrix?
Replies: 3
Views: 983

[Mikrotik documentation needed] Where is the RouterOS / WinBox compatibility or requirements matrix?

There is a new WinBox 3.6 that is quite buggy. It looks like Router OS 6.37.1 (too bad that link only works within that page) doesn't work with WinBox 3.4 (that was rock solid) any more and requires not just WinBox 3.5 but even WinBox 3.6 (which is not so solid ). There is no WinBox 3.6 for Mac OS X...
by jeroenp
Thu Oct 06, 2016 7:44 pm
Forum: General
Topic: Partitioning a CCR
Replies: 19
Views: 6099

Re: Partitioning a CCR

You will not lose any data. Repartiton keeps your existing system as it is, it just shrinks it's disk size. That should go into the docs as currently this is not clear at all: http://wiki.mikrotik.com/wiki/Manual:Partitions currently states this very vague description: repartition (integer) Will re...
by jeroenp
Thu Oct 06, 2016 6:32 pm
Forum: General
Topic: [Mikrotik documentation needed] What happened to "/interface list"
Replies: 3
Views: 1319

[Mikrotik documentation needed] What happened to "/interface list"

According to http://wiki.mikrotik.com/wiki/Manual:Interface/List there should be `/interface list`

But this fails:
/interface list add name="LAN" 
bad command name list (line 1 column 12)
Why?

I'm at RouterOS 6.35.1.

--jeroen
by jeroenp
Thu Oct 06, 2016 4:14 pm
Forum: Beginner Basics
Topic: [Mikrotik documentation needed] Firewall connection tracking enabled auto vs yes - what's the difference?
Replies: 4
Views: 1115

[Mikrotik documentation needed] Firewall connection tracking enabled auto vs yes - what's the difference?

Since mikrotik firewall connection tracking enabled auto vs yes doesn't return meaningful results and http://wiki.mikrotik.com/wiki/Manual:IP/Firewall/Connection_tracking#Connection_tracking_settings doesn't explain the difference between `auto` and `yes`: What's the difference between `auto` and `y...
by jeroenp
Thu Oct 06, 2016 3:23 pm
Forum: General
Topic: [Mikrotik follow-up needed] Since you're at PHBbb 3.1.9, please add ATOM feeds
Replies: 0
Views: 570

[Mikrotik follow-up needed] Since you're at PHBbb 3.1.9, please add ATOM feeds

Normis mentioned PHPBB 3.1.9 is used: http://forum.mikrotik.com/viewtopic.php ... 91#p536699

Since that supports ATOM feeds, please enable those as it makes it way easier to track threads.

More information is at https://www.phpbb.com/support/docs/en/3 ... tom-feeds/

--jeroen
by jeroenp
Thu Oct 06, 2016 2:32 pm
Forum: Beginner Basics
Topic: [Answered] Why are some of my routes blue?
Replies: 2
Views: 6501

[Answered] Why are some of my routes blue?

It looks like is too difficult for people to start replying at Where should I start creating Multi-WAN PCC setup with DHCP+fixed IPs on uneven upstreams , so I've decided to just start and ask individual questions. I've added settings for interface definitions and local addresses for WAN uplinks (pa...
by jeroenp
Fri Sep 30, 2016 10:40 am
Forum: Beginner Basics
Topic: Where should I start creating Multi-WAN PCC setup with DHCP+fixed IPs on uneven upstreams
Replies: 0
Views: 725

Where should I start creating Multi-WAN PCC setup with DHCP+fixed IPs on uneven upstreams

I finally have some more time fiddling around with RouterOS on a CCR1009. Goal is to get multi-WAN to work. From what I read is that PCC is the way to go but the only example in the manual is a bit thin for me: http://wiki.mikrotik.com/wiki/Manual:PCC as the explanation is very dense, likely expecti...
by jeroenp
Wed Aug 17, 2016 3:29 am
Forum: RouterBOARD hardware
Topic: 10G issue: is it the cable or one of the fiber modules; if module: which one?
Replies: 6
Views: 3225

Re: 10G issue: is it the cable or one of the fiber modules; if module: which one?

As @doneware already noted module with sn SK151215M81288 looks suspicions due to Tx power readout.
Thanks. I'm in touch with EuroDK on how to get this resolved.

--jeroen
by jeroenp
Tue Aug 16, 2016 2:53 pm
Forum: RouterBOARD hardware
Topic: 10G issue: is it the cable or one of the fiber modules; if module: which one?
Replies: 6
Views: 3225

Re: 10G issue: is it the cable or one of the fiber modules; if module: which one?

I suggest to recheck again with v6.37rc build. This version has fix for SFP+ interface ddmi refresh problem. You will get better info there. To check if either module or cable are problematic pretty much the fastest way is to retest them with some spares if you have some available. I don't have spa...
by jeroenp
Tue Aug 16, 2016 10:29 am
Forum: RouterBOARD hardware
Topic: 10G issue: is it the cable or one of the fiber modules; if module: which one?
Replies: 6
Views: 3225

Re: 10G issue: is it the cable or one of the fiber modules; if module: which one?

you seem to be using the right cable (125/50um multimode) with the right modules (multimode sfp+ with 300m operating range) first of all, make sure, you run 6.37rc, otherwise readings on your CCR2xx may be wrong (rx,tx levels are not refreshed accordingly) sit B and sit C has surprisingly same read...
by jeroenp
Mon Aug 15, 2016 10:43 pm
Forum: RouterBOARD hardware
Topic: 10G issue: is it the cable or one of the fiber modules; if module: which one?
Replies: 6
Views: 3225

10G issue: is it the cable or one of the fiber modules; if module: which one?

I've a problem getting 10G fiber connection to work with this hardware: two fiber odules of type S+85DLC03D from eurodk.com one cable - LC to LC - OM3 - 10 meter - part# 1170749 from allekabels.nl No matter how I switch modules and/or cables, I can't get the connection to work: only one end has LEDs...
by jeroenp
Sat Jul 30, 2016 4:56 pm
Forum: RouterBOARD hardware
Topic: [SOLVED] Connect CCR1009 with CSR226 over a longer distance than 3 meter
Replies: 8
Views: 3919

Re: Connect CCR1009 with CSR226 over a longer distance than 3 meter

If you only need 1Gbit connection you can use this MikroTik SFP module: https://linitx.com/product/mikrotik-routerboard-1000basesx-sfp-module-125g-mm-550m-850nm-ddm/13740 Thanks. That was the 1G S-85DLC05D at ~GBP 20. The 10G S+85DLC03D at ~GBP 50 is at https://linitx.com/product/mikrotik-sfp-modul...
by jeroenp
Wed May 25, 2016 11:01 pm
Forum: Scripting
Topic: On `get` vs `print` on objects and the inequality of how empty string properties are handled: why is that?
Replies: 2
Views: 1291

Re: On `get` vs `print` on objects and the inequality of how empty string properties are handled: why is that?

Some parameters can be unset. If parameter is unset it does not exist so it is not printed. For example comment cannot be unset, you can set it to empty string so it shows always when printed. Where do I find which proeprties can be unset? Print command can have several parameters to print for exam...
by jeroenp
Tue May 24, 2016 10:15 pm
Forum: Scripting
Topic: C# API - tik4net on GitHub
Replies: 186
Views: 89516

Re: C# API - tik4net on GitHub

480p makes it very hard to read. Can you re-render at a higher resolution?

--jeroen
by jeroenp
Tue May 24, 2016 9:55 pm
Forum: Scripting
Topic: On `get` vs `print` on objects and the inequality of how empty string properties are handled: why is that?
Replies: 2
Views: 1291

On `get` vs `print` on objects and the inequality of how empty string properties are handled: why is that?

Inspired by some boen_robot code , I've been playing around with `get` and `print` to get properties from an object as array so they can be dereferenced using the `->` operator. I think this is better readable than repeated `get` statements for each property, but might also be faster. I'm wondering:...
by jeroenp
Mon May 23, 2016 1:24 pm
Forum: Scripting
Topic: [BUG] Parameters having a string value ending in \$ need to be initialised with parenthesis but variables don't.
Replies: 3
Views: 1202

Re: [BUG] Parameters having a string value ending in \$ need to be initialised with parenthesis but variables don't.

Works fine if you add ; at the end of line.[/code] So it's still a bug that needs to be solved: the 'end-of-commandline' isn't always correctly adhered to. http://wiki.mikrotik.com/wiki/Manual:Scripting#Command_line But now I at least understand why some people put semicolons at the end of every li...
by jeroenp
Sun May 22, 2016 4:36 pm
Forum: Scripting
Topic: New repository with MikroTik RouterOS scripts: https://github.com/jpluimers/mikrotik-routeros
Replies: 0
Views: 1122

New repository with MikroTik RouterOS scripts: https://github.com/jpluimers/mikrotik-routeros

I just pushed the first batch of stuff to my new repository: https://github.com/jpluimers/mikrotik-routeros It's scripts I made so far in a somewhat organised way. The `/scripts/` directory contains scripts. There is a `README.rst` (yes I use reStructuredText for documentation) in each directory lik...
by jeroenp
Sun May 22, 2016 2:24 pm
Forum: General
Topic: Any plan to increase 4096 byte variable limit in ROS 7?
Replies: 5
Views: 2711

Re: Any plan to increase 4096 byte variable limit in ROS 7?

In my opinion a more sensible approach would be to introduce the concept of file open (with resulting file handle) and read line from open file (from filehandle, to variable) so a loop can be written that reads a file line by line and it can be processed line by line. That would only help if the ha...
by jeroenp
Sun May 22, 2016 1:47 pm
Forum: Scripting
Topic: [BUG] Parameters having a string value ending in \$ need to be initialised with parenthesis but variables don't.
Replies: 3
Views: 1202

[BUG] Parameters having a string value ending in \$ need to be initialised with parenthesis but variables don't.

It looks like when you initialise a parameter having a string value ending in $ you not only need to escape it, but also surround it with parenthesis but that is not needed for local variables. Why is that? If you forget the parenthesis, then you see it fail. It doesn't give me a comfortable feel ab...
by jeroenp
Wed May 18, 2016 1:35 pm
Forum: Scripting
Topic: [SOLVED] What's the meaning of "no such item" and why does it terminate a script?
Replies: 7
Views: 13285

Re: [SOLVED] What's the meaning of "no such item" and why does it terminate a script?

... /interface { :local varif [find name="WAN" disabled=no] :if ([:len $varif] != 0) do={ :put "Interface \"WAN\" was enabled, disabling." set $varif disabled=yes } else={ :put "Interface \"WAN\" was not found or is already disabled." } } Does `:len...
by jeroenp
Tue May 17, 2016 9:07 am
Forum: Scripting
Topic: Any way to get the error-string in `on-error=`
Replies: 1
Views: 2885

Any way to get the error-string in `on-error=`

`boen_robot` came up with this trick: :local scripts [/system script print detail as-value] #Create pseudo files (RouterOS can't create empty ones at will) :foreach script in=$scripts do={ /file print file=(($script->"name") . ".rsc") } #Wait for the files to be created "for...
by jeroenp
Tue May 17, 2016 8:36 am
Forum: Scripting
Topic: [SOLVED] Is there a good way to sync a local directory from the scripts that a Mikrotik has? (No: 4096 byte issue)
Replies: 11
Views: 4006

Re: Is there a good way to sync a local directory from the scripts that a Mikrotik has?

Any file with extension ".rsc" can be ran by RouterOS using the "/import" command. And as jarda already said, you can use "/export" to generate an ".rsc" file that has everything needed to replicate a router configuration. If you only have a few scripts, I th...
by jeroenp
Mon May 16, 2016 9:37 am
Forum: Scripting
Topic: [SOLVED] Is there a good way to sync a local directory from the scripts that a Mikrotik has? (No: 4096 byte issue)
Replies: 11
Views: 4006

Re:

Point 5. Export to file. Then you can grab it by ftp out. I tried and got all scripts in one big file in a format that is not friendly for the syntax highlighting in the various text editors (Atom, Sublime, Notepad++). I picked out one, see below. What I'm looking for is to export each script in a ...
by jeroenp
Mon May 16, 2016 12:47 am
Forum: Scripting
Topic: [SOLVED] What's the meaning of "no such item" and why does it terminate a script?
Replies: 7
Views: 13285

Re: Wat's the meaning of "no such item" and why does it terminate a script?

To be more precise, menu specific "get" and "set" commands (be it "/interface get", "/interface set", "/queue simple get", "/queue simple set", "/ip arp get", "/ip arp set", etc.) throw this error when you give a non ex...
by jeroenp
Mon May 16, 2016 12:46 am
Forum: Scripting
Topic: need input on a varDump function
Replies: 2
Views: 1053

Re: need input on a varDump function

Thanks for the compliment.

Now I need to figure out an efficient way to get a repository going.

After that, I will revisit `varDump`.

--jeroen
by jeroenp
Mon May 16, 2016 12:44 am
Forum: Scripting
Topic: Meaning of :pick parameters for strings?
Replies: 6
Views: 11236

Re: Meaning of :pick parameters for strings?

What's the question here? You seem to have figured it out already... The strings are zero based, the "end" is indeed "end", relative to the input, not relative to "start", and out of range values are (in effect) truncated to the nearest valid one. Is `end` indeed the n...
by jeroenp
Mon May 16, 2016 12:42 am
Forum: Scripting
Topic: [SOLVED] Any repository with standard functions?
Replies: 2
Views: 1071

Re: Any repository with standard functions?

I'd rather not rely too much on other devices and stick to what RouterOS itself can do. But thanks for the confirmation. I will see what I can do to get a repository up. First I need to find a way to sync the script contents on the Mikrotik with local files on my Mac or Windows machine so I can put ...
by jeroenp
Mon May 16, 2016 12:20 am
Forum: Scripting
Topic: [SOLVED] Is there a good way to sync a local directory from the scripts that a Mikrotik has? (No: 4096 byte issue)
Replies: 11
Views: 4006

Re:

Use export command instead of print.
How would that fit in the workflow?

(I must be missing something fundamental here, just not sure what it is yet, so please elaborate).

--jeroen
by jeroenp
Sun May 15, 2016 11:41 pm
Forum: Scripting
Topic: [SOLVED] Is there a good way to sync a local directory from the scripts that a Mikrotik has? (No: 4096 byte issue)
Replies: 11
Views: 4006

Re: Is there a good way to sync a local directory from the scripts that a Mikrotik has?

FTP. I tried. But none of the things in `/system scripts print` show up on the FTP server. What am I missing? What workflow would you suggest? My current work-flow is this: 1. in WinBox, edit the script 2. Save it 3. Run it from SSH to it creates the function and is visible in `/system script envir...
by jeroenp
Sun May 15, 2016 11:39 pm
Forum: Scripting
Topic: [SOLVED] Is there a good way to sync a local directory from the scripts that a Mikrotik has? (No: 4096 byte issue)
Replies: 11
Views: 4006

Re: Is there a good way to sync a local directory from the scripts that a Mikrotik has?

FTP.
I tried. But none of the things in `/system scripts print` show up on the FTP server.

What am I missing?
What workflow would you suggest?

--jeroen
by jeroenp
Sun May 15, 2016 9:54 pm
Forum: Scripting
Topic: [SOLVED] Is there a good way to sync a local directory from the scripts that a Mikrotik has? (No: 4096 byte issue)
Replies: 11
Views: 4006

[SOLVED] Is there a good way to sync a local directory from the scripts that a Mikrotik has? (No: 4096 byte issue)

My current workflow involves a lot of copy-pasting to keep my local directory and the scripts on a Mikrotik device in sync.

Is there a better way for this?
If so, what?

(Either Mac OS X or Windows based is fine as I run both)

--jeroen
by jeroenp
Sun May 15, 2016 9:41 pm
Forum: General
Topic: [SOLVED] Why does the email server configuration only allow IP-addresses?
Replies: 4
Views: 1407

Re: [SOLVED] Why does the email server configuration only allow IP-addresses?

it is updated in ros changelogs!

http://forum.mikrotik.com/viewtopic.php?t=101948

*) email - allow server to be specified as fqdn which is resolved on each send;
Thanks. I didn't notice, as I mainly looked at http://wiki.mikrotik.com/wiki/Manual:Tools/email

--jeroen
by jeroenp
Sun May 15, 2016 9:13 pm
Forum: General
Topic: [SOLVED] Why does the email server configuration only allow IP-addresses?
Replies: 4
Views: 1407

Re: Why does the email server configuration only allow IP-addresses?

version 6.33 and after allow names as well!
Thanks. Someone must update the docs (;

--jeroen
by jeroenp
Sun May 15, 2016 5:49 pm
Forum: General
Topic: How to choose USB device for SMS sending/receiving?
Replies: 0
Views: 903

How to choose USB device for SMS sending/receiving?

Is there a guide somewhere that helps with choosing an SMS device for SMS sending/receiving? Or a list with devices that will work out of the box? This because http://wiki.mikrotik.com/wiki/Manual:Tools/Sms only mentions it uses `AT+CMGS and AT+CMGF commands`, but nothing on if/how it detects a devi...
by jeroenp
Sun May 15, 2016 4:01 pm
Forum: General
Topic: [SOLVED] Why does the email server configuration only allow IP-addresses?
Replies: 4
Views: 1407

[SOLVED] Why does the email server configuration only allow IP-addresses?

Why does the email server configuration on RouterOS only allow for IP addresses?

This whereas the ping tool allows DNS names as well.

--jeroen
by jeroenp
Fri May 13, 2016 6:06 pm
Forum: General
Topic: Winbox Font Size
Replies: 23
Views: 12865

Re: Winbox Font Size

OK, correction, it's not "fine", but it is the same as the rest of your system. That isn't true either. Compare Atom IO text editor on the left and WinBox on the right. I could make this picture on Windows as well (there is an Atom IO for Windows). Put it in an extreme way: even Notepad o...
by jeroenp
Fri May 13, 2016 5:54 pm
Forum: Scripting
Topic: [SOLVED] What's the meaning of "no such item" and why does it terminate a script?
Replies: 7
Views: 13285

Re: Wat's the meaning of "no such item" and why does it terminate a script?

It is when your script is trying to access item that does not exist any more. Dynamic entry that was removed etc.
What do you mean with `etc.`? Can you be more specific? Are there examples that show this going wrong at will? (i.e. reproducible cases).

--jeroen
by jeroenp
Fri May 13, 2016 12:36 am
Forum: Scripting
Topic: need input on a varDump function
Replies: 2
Views: 1053

need input on a varDump function

boen_robot mentioned he'd be working on a var_dump function , but never finished. Lacking response there, I've started myself. The result is a gist with file named `Function.varDump.rsc`: https://gist.github.com/jpluimers/7c74fd85d579a69b87fe3c907c3d1e81 What I need are more test cases for data typ...
by jeroenp
Thu May 12, 2016 11:01 pm
Forum: Scripting
Topic: [SOLVED] What's the meaning of "no such item" and why does it terminate a script?
Replies: 7
Views: 13285

[SOLVED] What's the meaning of "no such item" and why does it terminate a script?

Searching in http://wiki.mikrotik.com/wiki/Manual:Scripting I could not find the meaning of "no such item" that I sometimes get in scripts and which aborts the script. Two questions: 1. What's the meaning of that message? 2. Why does it abort a script? In the mean time I'm going to track d...
by jeroenp
Thu May 12, 2016 7:30 pm
Forum: Scripting
Topic: Meaning of :pick parameters for strings?
Replies: 6
Views: 11236

Meaning of :pick parameters for strings?

I'm at RouterOS 6.35.1 and not sure if I should upgrade to 6.35.2 given the number of bugs mentioned there. There seems to be something odd with :pick parameters on strings. From the from the documentation : Command pick Syntax :pick <var> <start>[<end>] Description return range of elements or subst...
by jeroenp
Thu May 12, 2016 4:59 pm
Forum: General
Topic: Winbox Font Size
Replies: 23
Views: 12865

Re: Winbox Font Size

Looks great to me. Font size consistent with System Preferences and other UI. That's why it's not great. Most applications I use can be configured individually on font size to use. And that's also what vdelarenal75 asked for : Hi, is there a way to increase the Font size in winbox? I understand tha...
by jeroenp
Thu May 12, 2016 3:33 pm
Forum: Scripting
Topic: [SOLVED] Any repository with standard functions?
Replies: 2
Views: 1071

[SOLVED] Any repository with standard functions?

Is there any repository with standard functions for Mikrotik RouterOS?

I'm missing really basic stuff and writing them myself takes quite a bit of time.

I've just put these as a gist (please shoot at them) Mikrotik RouterOS padLeftString and padRightString functions

--jeroen
by jeroenp
Thu May 12, 2016 3:08 pm
Forum: Scripting
Topic: :for loops need better documentation.
Replies: 0
Views: 1011

:for loops need better documentation.

The old docs are much better: https://www.mikrotik.com/documentation/manual_2.7/System/Scripting.html#ht4027627 The new docs basically tell you "good luck": http://wiki.mikrotik.com/wiki/Manual:Scripting#Loops Command = for Syntax = :for <var> from=<int> to=<int> step=<int> do={ <commands>...
by jeroenp
Thu May 12, 2016 3:03 pm
Forum: General
Topic: Winbox Font Size
Replies: 23
Views: 12865

Re: Winbox Font Size

A screenshot on MacBook with Retina at 2880x1800 (see below) doesn't tell you much. A photograph does: https://lh3.googleusercontent.com/-eyV81H7ACjA/VzRvjiYFlvI/AAAAAAAAeJI/khrBtdnVHvwwyKGTyH1Bv84PQRaf1dvjgCL0B/s0-U-I/2016-05-12.jpg The screenshot lures you into thinking it is readable until you re...
by jeroenp
Thu May 12, 2016 1:55 pm
Forum: General
Topic: Winbox Font Size
Replies: 23
Views: 12865

Re: Winbox Font Size

It doesn't work fine when you use the Hi DPI displays to just have a lot of pixels. Which means no scaling and is a perfectly "correct resolution" (maybe not what "the laptop manufacture suggests", but a lot of companies suggest things that in practice work better when you do dif...
by jeroenp
Thu May 12, 2016 11:38 am
Forum: General
Topic: Winbox Font Size
Replies: 23
Views: 12865

Re: Winbox Font Size

bump...

This is much needed especially on Hi-DPI displays used at native resolution.

--jeroen
by jeroenp
Thu May 12, 2016 12:58 am
Forum: Scripting
Topic: Simple HTTP GET?
Replies: 5
Views: 13341

Re: Simple HTTP GET?

Just in case you ever need it, a list of escapes is in the scripting language manual.
by jeroenp
Thu May 12, 2016 12:53 am
Forum: Scripting
Topic: How to remove entry in associative array?
Replies: 1
Views: 1887

How to remove entry in associative array?

Now that I know how to start with an empty associative array and fill it : what about the other way around and remove an entry form an associative array? i.e. how to remove the element with key `b` in the code below: :global rot13 ({}); :set ($rot13->"a") "n" :set ($rot13->"...
by jeroenp
Mon May 09, 2016 10:26 pm
Forum: Scripting
Topic: Any comments on Function.stripInvalidHostNameCharactersFromString.rsc
Replies: 0
Views: 1000

Any comments on Function.stripInvalidHostNameCharactersFromString.rsc

Docs: returns $value without invalid characters for a Hostname if $allowMultipleLabels is not nothing, then it also allows dots between labels Execution: /system script run stripInvalidHostNameCharactersFromString :put [$stripInvalidHostNameCharactersFromString value=("a host name")] ahost...
by jeroenp
Sun May 08, 2016 8:50 pm
Forum: General
Topic: [SOLVED] How to upvote messages?
Replies: 1
Views: 744

[SOLVED] How to upvote messages?

Each time I try to upvote a message, the forum shows a message like this:
Post reputation - Re: Name network or group of networks?
Post by pe1chl
There are no reputation points.
How can I upvote?

--jeroen
by jeroenp
Sun May 08, 2016 8:48 pm
Forum: Scripting
Topic: How to convert a HEX value to a char? [SOLVED]
Replies: 15
Views: 7131

Re: How to convert a HEX value to a char? [SOLVED]

In that case I will leave it as is, unless you have comments on the current script at https://gist.github.com/jpluimers/f667a ... f1eeda2c2f
by jeroenp
Sat May 07, 2016 4:12 pm
Forum: Beginner Basics
Topic: Name network or group of networks?
Replies: 6
Views: 1881

Re: Name network or group of networks?

Putting a range on ip services (and snmp communities) is a quick way to limit access to the admin features to a single or a few networks, but when you want long lists like that it is probably better to use the firewall filter for "input", where you can use an ip address list, which can co...
by jeroenp
Sat May 07, 2016 7:46 am
Forum: Scripting
Topic: How to convert a HEX value to a char? [SOLVED]
Replies: 15
Views: 7131

Re: How to convert a HEX value to a char? [SOLVED]

Thanks. Any good examples to get started (before I find myself in quoting hell). Google Search isn't exactly helpful, as these hardly return anything: Mikrotik Script ":execute" Mikrotik Script ":parse" And I know from experience in other languages that these kind of constructs ...
by jeroenp
Fri May 06, 2016 10:04 pm
Forum: Scripting
Topic: How to convert a HEX value to a char? [SOLVED]
Replies: 15
Views: 7131

Re: How to convert a HEX value to a char? [SOLVED]

Thanks. Any good examples to get started (before I find myself in quoting hell).
by jeroenp
Fri May 06, 2016 4:50 pm
Forum: Scripting
Topic: Bug? How can I create an empty associative array, then fill it to map strings to strings?
Replies: 4
Views: 2303

Re: Bug? How can I create an empty associative array, then fill it to map strings to strings?

I'd say everything, except the
Fails because `$convert` becomes a `nothing` to which you cannot add association values:
part.
...
Thanks. I will report them in due time.

--jeroen
by jeroenp
Fri May 06, 2016 4:49 pm
Forum: Scripting
Topic: How to convert a HEX value to a char? [SOLVED]
Replies: 15
Views: 7131

Re: How to convert a HEX value to a char? [SOLVED]

...To put this another way, on a parser level, "\0".$hexChar is three main tokens: a string, a concatenation operator, and a variable access operator. That I already figured. Hence the above question: How can I do this despite the parser? Is there a kind of `eval` or `parse` function that...
by jeroenp
Fri May 06, 2016 12:52 pm
Forum: Scripting
Topic: Why are BBCode Code blocks inserting a space at the start?
Replies: 7
Views: 1898

Re: Why are BBCode Code blocks inserting a space at the start?

Thanks. Is everyone using the same Theme (see also my other question about printing and the Style Sheets Bug: Printing forum messages gets grey background ). (I've no experience with PHPBB, but a lot of software development experience, so the sooner you help me up to speed, the easier I can report s...
by jeroenp
Fri May 06, 2016 9:55 am
Forum: Scripting
Topic: [Use as-is] Anyone with improvements for my `escapeString` function that converts unprintable characters to HEX escapes?
Replies: 0
Views: 715

[Use as-is] Anyone with improvements for my `escapeString` function that converts unprintable characters to HEX escapes?

The below gist has a `escapeString` function function that is a start of Anyone having a `stringify` function to circumvent `:put` not displaying un-printable characters as HEX escapes? https://gist.github.com/jpluimers/f667af4696d2a6411be44df1eeda2c2f Anyone having improvements for it? (I for one w...
by jeroenp
Fri May 06, 2016 9:18 am
Forum: Scripting
Topic: How to convert a HEX value to a char? [SOLVED]
Replies: 15
Views: 7131

How to convert a HEX value to a char? [SOLVED]

I'm trying to fill an associative array with mappings from characters to their HEX encoding. The below fails: it doesn't like the `("\0".$hexChar)` construct. So: how do I convert a string containing the characters "\", "0" and "1" (where "0" and &qu...
by jeroenp
Fri May 06, 2016 8:35 am
Forum: Scripting
Topic: Bug? How can I create an empty associative array, then fill it to map strings to strings?
Replies: 4
Views: 2303

Re: Bug? How can I create an empty associative array, then fill it to map strings to strings?

You can create an empty array by surrounding the "{}" with "()", i.e.
:global convert ({});
...
You can report bugs to support at support@mikrotik.com ...
Thanks.
Which of the above do you regard as bugs?

--jeroen
by jeroenp
Fri May 06, 2016 8:30 am
Forum: Beginner Basics
Topic: Name network or group of networks?
Replies: 6
Views: 1881

Re: Name network or group of networks?

Really: Image

This besides what I have under /IP/addresses: Image

There will be firewall rules too...

--jeroen
by jeroenp
Fri May 06, 2016 12:01 am
Forum: Scripting
Topic: Why are BBCode Code blocks inserting a space at the start?
Replies: 7
Views: 1898

Re: Why are BBCode Code blocks inserting a space at the start?

...
Reminder: please mention the PHPBB version, as I cannot query it as end user (see https://www.phpbb.com/community/viewtop ... &t=1394485 )

That way I can report the spacing issue with PHPBB.

--jeroen
by jeroenp
Thu May 05, 2016 6:05 pm
Forum: Scripting
Topic: Bug? How can I create an empty associative array, then fill it to map strings to strings?
Replies: 4
Views: 2303

Bug? How can I create an empty associative array, then fill it to map strings to strings?

I'm trying to create an empty associative array that maps strings to strings, then add a few associations. It fails on all methods I tried. How can I create an empty associative array, then fill it to map strings to strings? Which of the issues below are bugs and how can I report them? The associati...
by jeroenp
Thu May 05, 2016 2:35 pm
Forum: Scripting
Topic: [SOLVED] Anyone having a stringify function circumventing :put to displaying un-printable characters as HEX escapes?
Replies: 2
Views: 1367

[SOLVED] Anyone having a stringify function circumventing :put to displaying un-printable characters as HEX escapes?

While researching Why does `get` for static DNS and DHCP leases have issues with nulls in string values and how can I work around it? I think I found the culprit: `:put` won't HEX-escape the characters it cannot print. Some examples are below. JavaScript has a JSON.stringify for this (example at htt...
by jeroenp
Thu May 05, 2016 12:26 pm
Forum: Scripting
Topic: Regex outside of the find function?
Replies: 1
Views: 1536

Re: Regex outside of the find function?

+1; bump.
by jeroenp
Thu May 05, 2016 12:08 pm
Forum: Scripting
Topic: Basic XML/string parser function
Replies: 1
Views: 2672

Re: Basic XML/string parser function

Your function is a great example of why I like named parameters over positional parameters. Below is a full set of examples showing the permutations of Start/End parameter values when calling it. Permutations of "something" as parameter: :put [$getBetween inputString="<element>value</...
by jeroenp
Thu May 05, 2016 8:29 am
Forum: Scripting
Topic: Functions in CMD Scripts
Replies: 23
Views: 40554

Re: Functions in CMD Scripts

http://wiki.mikrotik.com/wiki/Manual:Scripting#Functions With the (now not so new) function syntax any more: anybody having time to update the examples using the function syntax http://wiki.mikrotik.com/wiki/Manual:Scripting#Functions (note to self: a function does not need to be :global as it can ...
by jeroenp
Wed May 04, 2016 11:41 pm
Forum: Scripting
Topic: [SOLVED] Why does `get` for static DNS & DHCP leases have issues with nulls in string values & how can I work around it?
Replies: 1
Views: 937

[SOLVED] Why does `get` for static DNS & DHCP leases have issues with nulls in string values & how can I work around it?

This is at least in part caused by `:put` not printing NULL (and other characters) as HEX-escaped; see http://forum.mikrotik.com/viewtopic.php?f=9&t=108089

I will report later if that is the only cause.

--jeroen
by jeroenp
Tue May 03, 2016 5:51 pm
Forum: Scripting
Topic: [SOLVED] Difference between `[]`, `{}` and `()` expressions?
Replies: 2
Views: 1188

Re: Difference between `[]`, `{}` and `()` expressions?

Thanks. I will keep asking questions (trying to be specific or/and have a Short, Self Contained, Correct Example), then in due time blog a post organising them in some more readable fashion.
by jeroenp
Tue May 03, 2016 5:38 pm
Forum: Beginner Basics
Topic: [SOLVED] DHCP server: Odd active hostname behaviour: some views have null character at the end, some don't.
Replies: 5
Views: 1760

Re: DHCP server: Odd active hostname behaviour: some views have null character at the end, some don't.

I think it is a bug in the DHCP client, which adds a null character to the hostname it sends to the server. The DHCP client options are of structure Type/Length/Value so a client is supposed to set the length of the hostname to exactly the number of characters. However there exist buggy clients tha...
by jeroenp
Tue May 03, 2016 2:48 pm
Forum: Beginner Basics
Topic: Bug: Printing forum messages gets grey background
Replies: 0
Views: 750

Bug: Printing forum messages gets grey background

Whenever I try to print pages on the forum, I get a grey background, see the below example: https://www.dropbox.com/s/fe9l5nne8lfxobg/Screenshot%202016-05-03%2013.22.13.png?raw=1 The cause is that http://forum.mikrotik.com/styles/Mobbern3.1/theme/color-theme-slate.css overwrites the print media sett...
by jeroenp
Tue May 03, 2016 2:24 pm
Forum: Beginner Basics
Topic: [SOLVED] DHCP server: Odd active hostname behaviour: some views have null character at the end, some don't.
Replies: 5
Views: 1760

Re: DHCP server: Odd active hostname behaviour: some views have null character at the end, some don't.

I think it is a bug in the DHCP client, which adds a null character to the hostname it sends to the server. ... However, the one you should really go after is the manufacturer of the client device. In order to go after the manufacturer, I've to debug what's going on. How can I dump the affected DHC...
by jeroenp
Tue May 03, 2016 12:25 pm
Forum: Beginner Basics
Topic: Name network or group of networks?
Replies: 6
Views: 1881

Re: Name network or group of networks?

Where would I add that comment in the "/ip service" list?

(That's one of the places I have an extensive set of network addresses).
by jeroenp
Tue May 03, 2016 11:50 am
Forum: Scripting
Topic: Why are BBCode Code blocks inserting a space at the start?
Replies: 7
Views: 1898

Re: Why are BBCode Code blocks inserting a space at the start?

Maybe you can try to ask in PHPBB forums :) We did not change the forum engine, and it has tons of issues of all kind.
Thanks, I will.
What version of PHBB are you running? (so they know where to fix, if at all).
by jeroenp
Tue May 03, 2016 10:26 am
Forum: Scripting
Topic: Why are BBCode Code blocks inserting a space at the start?
Replies: 7
Views: 1898

Why are BBCode Code blocks inserting a space at the start?

The below screenshot from Difference between `[]`, `{}` and `()` expressions? . https://www.dropbox.com/s/x0dovzb7hpg2d14/Screenshot%202016-05-03%2009.23.50.png?raw=1 Why does the first line of code start with a space whereas the BBCode Code block doesn't? This is the actual code of that post: https...
by jeroenp
Tue May 03, 2016 10:21 am
Forum: Scripting
Topic: [SOLVED] Difference between `[]`, `{}` and `()` expressions?
Replies: 2
Views: 1188

[SOLVED] Difference between `[]`, `{}` and `()` expressions?

As a follow-up on Re: What parts of scripts can be ran from the console? as I'm wrapping my head around the language and the Scripting language manual is quite ambiguous in various places (a BNF or EBNF grammar would be really really helpful so if someone has it: please share). Apparently , you can ...
by jeroenp
Tue May 03, 2016 8:42 am
Forum: Scripting
Topic: [SOLVED] What parts of scripts can be ran from the console?
Replies: 3
Views: 1266

Re: What parts of scripts can be ran from the console?

The console doesn't maintain its own variables. As soon as you call :local, the next line doesn't have it. That's why "set" fails - there's no variable to be changed. The previous lines that reference the variable don't fail - they resolve the variable to a value of type "nothing&quo...
by jeroenp
Mon May 02, 2016 10:03 pm
Forum: Beginner Basics
Topic: static ip in dhcp server with different default gateway
Replies: 1
Views: 2112

Re: static ip in dhcp server with different default gateway

hi i have problem with my dhcp server when i want to add static leases, i cant change default route to another gateway, i mean there is no option for changing default-gateway for some specific mac addresses please help! :( I think the answer here covers your question: http://forum.mikrotik.com/view...
by jeroenp
Mon May 02, 2016 9:42 pm
Forum: Beginner Basics
Topic: [SOLVED] DHCP server: Odd active hostname behaviour: some views have null character at the end, some don't.
Replies: 5
Views: 1760

[SOLVED] DHCP server: Odd active hostname behaviour: some views have null character at the end, some don't.

I've observed this on a CCR1009 with both firmware 6.35 and 6.35.1. Two devices give null characters at the end of the Active Hostname in some views, but not all. The list view: https://www.dropbox.com/s/xectrrltouey4zs/Screenshot%202016-05-02%2020.09.13.png?raw=1 The details views: https://www.drop...
by jeroenp
Mon May 02, 2016 8:49 pm
Forum: Scripting
Topic: [SOLVED] What parts of scripts can be ran from the console?
Replies: 3
Views: 1266

[SOLVED] What parts of scripts can be ran from the console?

As a n00b on Microtik, but not on programming, I'm trying to wrap my head around the scripting. My first questions are centred around what parts of scripts can and cannot be ran on the console and why. For instance when you run the script at http://wiki.mikrotik.com/wiki/Script_to_find_the_day_of_th...
by jeroenp
Sun May 01, 2016 1:49 pm
Forum: Beginner Basics
Topic: Name network or group of networks?
Replies: 6
Views: 1881

Name network or group of networks?

I see a lot of places where I use various networks, for instance these: - 192.168.71.0/24 - LAN - 192.168.171.0/24 - WAN side of my ADSL connection - 192.168.172.0/24 - WAN side of my fiber connection Is it possible to give these a (descriptive) alias That will make specifying the allow for services...
by jeroenp
Sat Apr 30, 2016 10:44 am
Forum: RouterBOARD hardware
Topic: [SOLVED] Connect CCR1009 with CSR226 over a longer distance than 3 meter
Replies: 8
Views: 3919

Re: Connect CCR1009 with CSR226 over a longer distance than 3 meter

Thanks. So basically it comes down to: 1. distance >3 requires active DAC which is a lot more expensive than passive DAC 2. LC-LC fiber cable is cheap, but the modules aren't, so it takes bit of math to find the sweet spot. Now what about the bending radius of DAC cables vs LC-LC cables? --jeroen
by jeroenp
Fri Apr 29, 2016 3:55 pm
Forum: RouterBOARD hardware
Topic: [SOLVED] Connect CCR1009 with CSR226 over a longer distance than 3 meter
Replies: 8
Views: 3919

Re: Connect CCR1009 with CSR226 over a longer distance than 3 meter

Thanks.

Why would I choose this SFP+ module over the others?

Are SFP+ modules compatible with the SFP ports?

--jeroen (originally from Brabant too)
by jeroenp
Thu Apr 28, 2016 11:44 pm
Forum: RouterBOARD hardware
Topic: [SOLVED] Connect CCR1009 with CSR226 over a longer distance than 3 meter
Replies: 8
Views: 3919

[SOLVED] Connect CCR1009 with CSR226 over a longer distance than 3 meter

I know there is a 3 meter SFP+ Direct Access Cable http://routerboard.com/SplusDA0003 However, my CCR1009 and CRS226 are about 10 meters apart. What would be a good way to connect them? (I'm in The Netherlands so I prefer suppliers with a reasonable shipping cost there). i.e.: - are there 10 meter S...