I’ve recently bought an hEX E50UG, to start my journey to ROSv7, so that I don’t just throw my existing three RB951Ui-2HnD ROSv6 devices into “upgrade to ROSv7 and pray” mode ![]()
So far, mostly, so good. But:
My “Set DNS static entries from DHCP leases” script, which works fine on my three ROSv6 devices, throws this error in the logs of the new ROSv7 device:
2026-02-20 09:41:43 script,error executing script DNS via DHCP v2 from scheduler (DNS via DHCP v2) failed, please check it manually
2026-02-20 09:41:43 script,error,debug invalid internal item number (/ip/dns/static/get; line 36)
This isn’t a “fatal, stop, the script doesn’t work at all” error. The script does seem to mostly work.
So I ran some of the script commands manually, and I figured out the following:
- I’m an idiot. The script was erroring because I had BOTH an A and a CNAME record for “oneofmyhostnames.mydomain.org”, which, the way the script is written, totally should throw an error.

- It looks like the /ip dns static find where name=”whatever” command is returning an off-by-one index into the DNS static table, except, clearly, since the script works, it isn’t.
Which (2. above) leads to the question, why does running the command interactively return an off-by-one index?
Example:
[admin@MikroTik4.felines.org] > /ip dns static print
Columns: NAME, TYPE, ADDRESS, TTLNAME TYPE ADDRESS TTL
;;; defconf
0 router.lan A 192.168.88.1 1d
;;; automatic-from-dhcp (magic comment)
1 JayThinkP51-2.felines.org A 192.168.255.13 15m
;;; automatic-from-dhcp (magic comment)
2 YYThink.felines.org A 192.168.255.17 15m
;;; automatic-from-dhcp (magic comment)
3 TL-WPA8630P.felines.org A 192.168.255.8 15m
…
8 MikroTik1.felines.org A 192.168.255.3 1d
9 MikroTik2.felines.org A 192.168.254.3 1d
…
22 AVClientXR2 CNAME 1d
23 Monster CNAME 1d
;;; automatic-from-dhcp (magic comment)
24 Ajax-001BA5CE.felines.org A 192.168.255.4 15m
Let’s look up a couple of entries:
[admin@MikroTik4.felines.org] > :put [/ip dns static find where name="router.lan"]
*1[admin@MikroTik4.felines.org] > :put [/ip dns static find where name="MikroTik1.felines.org"]
*9
Um. But. In the /ip dns static print output above, router.lan is line 0, and MikroTik1.felines.org is line 8.
So, it seems “cosmetic”, but, why?
thanks,
-Jay