My environment:
RouterOS 6.47
RB941-2nD
The issue:
The exported config script via
/export file=name
does not execute completely when restored via
/system reset-configuration run-after-reset=name.rsc
. Specifically, the script breaks at the line
/ipv6 dhcp-server add ...
when
address-pool=static-only
. The problem arises from two system behaviors,
- the export command is by default run with the compact-only option, thereby skipping address-pool=static-only, which is the default, value for the option, from the script, and
- /ipv6 dhcp-server add command explicitly requires three options, the address-pool, interface, and name.
Because of this, when the exported script is run from terminal, it breaks at the /ipv6 dhcp-server add … line, asking for value to the address-pool option that isn’t supplied upon command invocation. The result is that after a /system reset-configuration run-after-reset=name.rsc, the lines after the aforementioned problematic line don’t get executed, leaving some configuration options missing or unrestored.
I’d like to add that the system is silent about this failure after the reset, no lines are logged in the system regarding the failed script execution, which is not good for troubleshooting. This issue hit me after a reset and noticed that some of my configuration options were missing or unset. I first observed the issue since 6.46.5, but it may have existed much earlier than that.
I have already reported this to support@mikrotik.com, provided them with the supout.rif file, but I haven’t received any feedback from them since 3 days ago.
-ianp