How to Upgrade MikroTik RouterOS to Version 7

Aisyah Aldina

Illustration of a rocket for a guide on how to upgrade MikroTik RouterOS to version 7

Hi everyone, in this post I want to show you how to upgrade MikroTik RouterOS to version 7, covering both a regular upgrade within version 7 and the big jump from RouterOS 6 to 7. An upgrade brings bug fixes, closes security holes, and adds new features. But it also changes the router’s system, so it needs to be done in the right order.

I tested everything on two lab routers in VirtualBox. The main router in this series runs RouterOS 7.25.2, and for the version 6 upgrade I installed a fresh CHR 6.49.23 from the official MikroTik website and upgraded it all the way to the latest stable version. A few things turned out differently from what many other articles say, including the version offered by the upgrade channel and the fact that a version 6 export file cannot be used directly on version 7.

Understanding RouterOS Update Channels

Open System then Packages

The System menu then Packages in WinBox 4

Click System, then Packages.

Check the installed packages and version

The RouterOS 7.25.2 package list and the Check For Updates button

The routeros package shows Installed yes with version 7.25.2. Packages flagged XA, such as container, dude, and wireless, are extra packages that are available but not installed yet. Click Check For Updates.

Check for the latest version

Check For Updates on the stable channel shows System is already up to date

On the stable channel, Installed Version and Latest Version are both 7.25.2, and the message System is already up to date appears. If a new version is available, the Download and Download and Install buttons become active. Download and Install reboots the router right after the download finishes.

Choose the right channel

The long term, stable, testing, and development update channel options

RouterOS 7 has four channels.

long term   : the most stable, few changes, suited for production routers
stable      : the latest version considered ready to use
testing     : release candidates, for trying things out
development : beta versions, do not use them on a working network

At the time of writing, the long-term version is 7.24.7 and stable is 7.25.2. For an office router that does not need the newest features, long term is the safest choice. The terminal version for checking and installing updates:

/system package update set channel=stable
/system package update check-for-updates
/system package update install

Preparing to Upgrade from RouterOS 6 to 7

The MikroTik documentation recommends upgrading a version 6 router to the latest version 6 release first, before jumping to version 7. My lab router is already on 6.49.23, which is the last version 6 release.

Check the version and free space

System resource of the RouterOS 6.49.23 lab router with free HDD space and architecture x86_64
/system resource print

Look at version, free-hdd-space, and architecture-name. The RouterOS 7 package for x86 is about 20 MiB, so make sure there is enough free space. Older routers with 16 MB of flash often fail to upgrade because there is not enough room. Architecture-name also matters if you upgrade manually later, because the package file has to match, for example arm, arm64, mipsbe, or x86.

Back up and export first

Exporting the configuration to the file sebelum-v7.rsc before the upgrade
/system backup save name=sebelum-v7
/export file=sebelum-v7

Then download both files to your computer as shown in the article on how to backup and restore a MikroTik configuration. The backup file is what you use if you want to go back to the state before the upgrade, while the rsc file is useful as a readable record of the configuration.

Know which configuration will change

Example OSPF network and routing-mark configuration on RouterOS 6

As an example, I added an OSPF network and a route with a routing-mark on the version 6 router. Both of these features changed completely in version 7: routing-mark was replaced by routing tables, and OSPF now uses instances and interface templates. According to the MikroTik documentation, the router converts the old configuration automatically, once, the first time it boots into version 7.

Upgrading RouterOS 6 to 7

The version 6 stable channel does not offer version 7

The stable channel on RouterOS 6.49.23 does not offer version 7
/system package update check-for-updates

On the stable channel, the 6.49.23 router replies System is already up to date. This is why so many people are confused about why their version 6 router never offers version 7.

Switch to the upgrade channel

The upgrade channel offers RouterOS 7.24.7
/system package update set channel=upgrade
/system package update check-for-updates

The upgrade channel exists specifically for jumping from version 6 to 7. Many articles say this channel installs 7.12.1, but when I checked, the version offered was 7.24.7, which is the latest long-term version. So the version number can change over time, what matters is the channel.

Install and wait for the reboot

The install command starts downloading RouterOS 7.24.7
/system package update install

The router downloads the package and reboots by itself. In WinBox, select the upgrade Channel in the Check For Updates window and click Download and Install. Do not power off the router during this process.

The router boots into version 7

The router boots with MikroTik 7.24.7 long-term

About a minute and a half later the router came up with MikroTik 7.24.7 long-term.

Check the version after the upgrade

System resource after the upgrade shows version 7.24.7 long-term
/system resource print

The version is now 7.24.7 long-term. Free-hdd-space dropped by about 5 MiB compared to before the upgrade.

My experience: After logging in on version 7, my lab configuration turned out to be empty: the identity was back to the default and the IP 192.168.56.20 was gone. I repeated the test with a new disk and found that the cause was not the upgrade. The CHR 6.49.23 in this VirtualBox lab simply did not keep its configuration even after a normal reboot, shown by the message backup critical error could not read all configuration files and a backup file that was only 8 bytes. The lesson is that before a major upgrade, reboot the version 6 router once and make sure the configuration is still there and the backup file has a reasonable size. If the backup fails, do not continue with the upgrade until the problem is clear.

Moving On to the Latest Stable Version

Switch to the stable channel

After switching to the stable channel, version 7.25.2 is available
/system package update set channel=stable
/system package update check-for-updates

Once you are on version 7, choose the stable or long term channel again. In this lab, 7.25.2 was available.

Install and check the packages

The routeros, wireless, and dude packages are on 7.25.2 and the routerboard menu does not exist on CHR
/system package update install
/system package print
/system routerboard print

After the reboot, the routeros, wireless, and dude packages are all on 7.25.2. The extra packages get upgraded too, because the automatic update downloads every installed package. The routerboard command returns bad command name because CHR has no RouterBOARD firmware. On a physical router such as a hEX or hAP, after upgrading RouterOS you should also upgrade the firmware and then reboot one more time:

/system routerboard upgrade
/system reboot

Make sure current-firmware and upgrade-firmware match in /system routerboard print.

A Version 6 RSC File Cannot Be Used Directly on Version 7

Test importing the version 6 rsc file

A dry-run import of a RouterOS 6 rsc file on RouterOS 7 finds 4 errors

The sebelum-v7.rsc file from the version 6 router was still in Files after the upgrade, so I tried a test import on version 7 without actually running it.

/import file-name=sebelum-v7.rsc verbose=yes dry-run

The result was Script Error: found 4 error(s) in import file. The routing-mark line and the OSPF network line were rejected because those commands no longer exist in version 7. This means a version 6 export file cannot simply be imported into a version 7 router. To carry the configuration over, let the automatic conversion during the upgrade do its job, then check the result. If you have to type it again, routing sections such as OSPF and routing-mark need to be written with the version 7 syntax.

Fixing Updates That Fail Because of DNS

Error could not resolve dns name

Check for updates fails with ERROR could not resolve dns name

The router needs internet and DNS access to download packages. This message appears when the router itself cannot resolve the name upgrade.mikrotik.com.

Check DNS, the DHCP client, and the connection

DNS and DHCP client are empty and ping 8.8.8.8 returns no route to host
/ip dns print
/ip dhcp-client print
/ping 8.8.8.8 count=2
:put [:resolve upgrade.mikrotik.com]

In my case, servers and dynamic-servers were empty, there was no DHCP client on the WAN, and the ping to 8.8.8.8 answered no route to host. Make sure the router has a WAN IP, a default route, and a DNS server. See the article on how to set up a MikroTik DNS server.

Common Problems and How to Fix Them

The version 6 router does not offer version 7

Make sure the channel is set to upgrade, not stable or long-term.

Not enough storage space

Delete old files in Files and any extra packages you do not use. For routers with 16 MB of flash, use Netinstall.

Manual upgrade without internet

Download the package file, with a name like routeros-7.25.2-arm64.npk, from the MikroTik download page according to the router’s architecture-name, along with any installed extra packages of the same version. Upload them to Files with WinBox, then reboot. The router installs the packages when it boots.

You want to go back to the previous version

Upload the older version’s package files to Files, then run /system package downgrade. After that, restore the backup file you made before the upgrade.

That is it, the router is now running the latest RouterOS 7, and we know how to choose a channel, upgrade from version 6, and deal with a failed update. In the next article we will cover how to limit bandwidth with Simple Queue. If your upgrade has ever failed halfway through, tell us about it in the comments.

Leave a Comment