If you are wanting to configure multiple MikroTik routers with the same configuration, or to copy a config from one router to another, the best way is to use an export.  The export command dumps all of the configuration commands you added to a router to a text file and none of the stuff that gets you in trouble like MAC addresses.  Then by using the import command, you can apply that set of commands to an unconfigured router.  Issues with this method are often experienced if the target router has any configuration on it to begin with, even the default config, thereby causing the import to fail.

Therefore, I always like to start with a fresh, blank router.  Unfortunately, unconfigured routers can be problematic to connect to via the MAC address for some PC’s.   I have found a better way to accomplish this task.  The following example is from my latest book RouterOS by Example, 2nd Edition:

Step 1 – Creating a Text Export on Router 1

The text export is created from the command line only:

  1. Open a terminal window by clicking the New Terminal button.
  2. At the root prompt, type export file=[your file name here]. Of course, the square brackets are not actually typed, you should be naming your file in that field. Example: export file=myconfig. It is not necessary to specify the file extension. The extension will be added automatically. Producing the export will take 100% CPU for a few seconds but will then produce a file in the Files List.
  3. From there you can drag and drop it to your desktop for renaming and further editing. You can also omit the “files=” portion of the command and it will export the configuration to the terminal window. From there you can copy and paste parts of the file for use elsewhere. Also note that the export is produced relative to the portion of the command tree you are in. For example, from the root of the command tree, you will export the entire configuration. By typing IP address and enter, you will then be inside the IP address menu branch and an export from there will only produce that portion of your configuration.

Step 2 – Upgrade and Import

Assumptions:

  • I have reset the router  to the defaults using the reset switch or started with a router out of the box.
  • In my lab, I have a DHCP server and network access that I will connect to the router on ether1.  Since that port has a default config with DHCP client, it will pull an IP and have internet access.
  • I will be using the default configuration which includes a complete base config and I am attaching my laptop with DHCP to ether2.
  • Once everything boots, the laptop should have internet access through the defaulted router.
  1.  Once the router is booted and the laptop has internet access, click System-Packages and the Check for Upgrades button and install any upgrades, router will reboot.
  2. After reboot, drag the script your created on Router1 into the Files list on Router2.  You can even drag from one Winbox Files list to another Winbox window’s files list, or drop it on your laptop desktop in between, your choice.
  3. Next, click System-Reset Configuration, check No Default Configuration and select the script you previously exported:

 

2016-12-19_15-07-28

Click Reset Configuration.

The router will then reboot, erase itself and then import your custom configuration.  This works very well when you have a stack of routers to upgrade and configure.

Have fun and Keep on ‘Tiking!