ROS safety - system upgrades - from scratch to learn RouterOS Series 17

This tutorial is for:

Keep updated your router systems, the prevention of router vulnerability due to problems caused by hijacking a result of network failure.

Note: When using the system upgrade, remember to make sure the network security business has been stopped or has been transferred.

Router OS system upgrades can be divided into three ways:

A, Winbox update

Second, the manual update

Third, script updates

###############################################################################

A, winbox update

Open the System> Packages

wps1ED4.tmp

Click Check For Updates pop up the following screen:

wps1ED5.tmp

Update system includes four categories:

wps1ED6.tmp

Long term: long-term support version, the best compatibility.

Stable: stable version, new features stable version.

Testing: Beta.

Development: Developer Edition.

Long term version is generally recommended, stability is for the king.

Household recommend choosing Download & Install.

Commercial recommended to Download, and then confirm the complete service manual System> Reboot to restart the route.

FIG manual restart follows:

wps1ED7.tmp

These are winbox are updated.

Second, manually download the update

In the address, see screenshots from the official website

wps1EE8.tmp

Downloaded files directly dragged into the inside winbox

wps1EE9.tmp

Then it will be automatically uploaded into the Router OS

wps1EEA.tmp

After confirming the network security business, and then perform a manual restart: System> Reboot can be.

Third, script update method

Router OS script to update the system firmware is suitable for lazy people, by means of a scheduled task scheduling Router OS, lest we forget with the use of our router security.

Remember, using a script updates, pay attention to calculate your network security window, lest an adverse effect on the business, such as when you back up the data on the WAN.

Prerequisites: requires System> Packages> Check For Updates which you choose the right long-term support version is an upgrade or stable version, here I chose the long term, and then click OK to exit.

wps1EEB.tmp

A.打开System>Script,点击+号,新建一个脚本:

wps1EEC.tmp

代码如下:

:log info "Checking firmware...";

/system package update check-for-updates

:delay 10s;

:if ([/system package update get status]="New version is available") \

do={\

      :log info "Downloading firmware";

      /system package update download

      :delay 600s;

     :if ([/system package update get status]="Downloaded, please reboot router to upgrade it") \

     do={:log info "Download finish, Rebooting";

             /system reboot} \

     else={:log info "Download package fail"}} \

else={:log info "No update.";}

有脚本阅读能力的话,可以理解上面的,我就不多解释了。

注意:delay 600s 是等待下载时间,速度快的可以调小这这个值,速度慢的可以加大这个值。

B.测试我们的脚本

选择脚本,然后点击Run Script

wps1EED.tmp

此时我们打开System>Packages>Check For Updates就会看到他已经在自动下载了。

wps1EEE.tmp

B.使用System>Scheduler设置定时任务来去执行脚本

wps1EEF.tmp

结果如图:

wps1EF0.tmp

PS:如果显示连接超时,这个很正常,国内的网络问题。只能选择第二种方式去更新我们的路由器了。

wps1F00.tmp

This chapter finished.

Guess you like

Origin blog.51cto.com/13796759/2430584