MikroTik Solutions

Files in defconf/ of trunk
Login

Files in defconf/ of trunk

Files in directory /defconf from the latest check-in of branch trunk


Model-Specific Scripts

I’ve collected many default configuration files here, pulled from a variety of RouterOS devices. There is no pattern to the ones available; they’re archived haphazardly, as I come across them or they’re sent to me.

The intent is to host an archive taken from a wide range of RouterOS device types, presented here for educational and reference value.

If you have configuration files you want me to include, you can send them to this repository’s forum. I want fully-stock files, ideally produced via

/export show-sensitive terse file=MODEL-OF-DEVICE.rsc

I like terse mode for this type of thing because it reduces the number of pointless whitespace differences when comparing two configurations. This lets you “diff” two different files to get a sense of the true distinctions in the configurations without being overwhelmed by all of the defconf values that are identical between them.

I remove any local identifiers before posting configs here. The stock version should have few such details:

  1. The MAC used by the bridge under the default auto-mac=no setting.
  2. The software ID and hardware serial numbers in the header comment.
  3. The time zone set for the NTP client during Quick Set configuration.
  4. Country settings applied in Quick Set for WiFi radios.

I also remove things like the “/system note” setting since it’s a change between defconf and the moments shortly after first boot where it asks if you want it to not show that note ever again.

Where I have two or more configurations for a given device, it is generally either to show off multiple Quick Set modes or hand-modified variations to the same end. For example, RB960PGS-router is the out-of-the-box configuration, which I then hacked by removing all “router” configuration elements to produce the -switch variant.

Generic Script

For an alternative take on this, I have also included _common.rsc, a version of which you can retrieve from your own device with:

/system/default-configuration print file=MODEL-OF-DEVICE.rsc

MikroTik have provided essentially the same text here, in the inline file links from that documentation page.

The primary problem with these versions is that they’re laced through with RouterOS scripting code. It’s largely conditional constructs to select among available alternatives and loops to handle a sequence of directives that differ in some small detail, as with the interface numbers. While you can produce the above file set from these, you need to mentally run the code, selecting branches and unrolling the loops. I find that less helpful than the above versions in general, especially when comparing to “flattened” /export output.

What is more useful is to compare the historical versions of _common.rsc archived here using Fossil’s extensive diffing features.1 The simplest method is to click the round bubble next to the version you want to use as a baseline, then on the one you want to diff against that. There may be as little as one changed line between versions — example — but even when the differences are more extensive, it beats scanning the whole thing while evaluating a new RouterOS version. This method is especially helpful as an adjunct to reading MiroTik’s famously terse change logs. It is also useful to determine where some bit of configuration flotsam came from, and to provide hints to the best method to get rid of it.

Also provided here are the scripts I used to produce this version history. Rather than install each version of the OS to a device and then call the above RouterOS command, then download the file it produces, my scripts download the routeros-*.npk file from MikroTik and extract the raw version of that script from it. I make these tools available more for documentation of my methods than because I expect anyone else to run them, but I suppose someone interested in spelunking more deeply through RouterOS’s development history than is provided here might find direct utility value in them.2


  1. ^ As of this writing, this archive includes all historical stable release versions from 7.1 through 7.19. Be aware that I make no promises to call the update script on each and every future RouterOS release.
  2. ^ These tools assume that the PATH contains the common unsquashfs utility, plus the distinctly less common unnpk program. They also assume you are running within a checkout of this repository, because I built atop my Linux netinstall tooling to avoid duplication of code for downloading the key NPK file.