Document 12927710

advertisement
University of Babylon, IT College
Information Network Dep., Third Class, Second Semester
MTCNA Course
MikroTik Certified Network Associate
2015-2016
By M.Sc. I.T Alaa A. Mahdi
Objectives
• Manage RouterOS services;
• Reset RouterOS
• Backup and export/import configuration;
• save and reload backup;
• edit export file;
• RouterOS license;
• levels;
• update license;
• NTP client configuration;
2
Manage RouterOS services
• This section lists protocols and ports used
by various MikroTik RouterOS services.
• It helps you to determine why your
MikroTik router listens to certain ports, and
what you need to block/allow if you want to
prevent or grant access to the certain
services.
3
/ip service
• Some service settings can be changed
under /ip service menu.
• You can specify IP addresses from which
the service is accessible, for example:
– ip service> set www port=8081
address=10.5.0.0/16
4
5
(System Reset ) Configuration Reset
• System reset command is used to erase all
configuration on the router. Before doing that, it
might be useful to backup the router's
configuration.
• /system reset-configuration
• The command clears all configuration of the
router and sets it to the default including the
login name and password, IP addresses and
other configuration is erased, interfaces will
become disabled. After the reset command
router will reboot.
6
Backup
and
Export/Import
Configuration
7
Backup Configuration
• The backup save command is used to store the
entire router configuration in a backup file. The
file is shown in the /file submenu. It can be
downloaded via ftp to keep it as a backup for
your configuration.
• Important! The backup file contains sensitive
information, do not store your backup files inside
the router's Files directory, instead, download
them, and keep them in a secure location.
8
• The configuration backup can be used for
backing up MikroTik RouterOS configuration to a
binary file, which can be stored on the router or
downloaded from it using FTP for future use.
• The configuration restore can be used for
restoring the router's configuration from a
backup file. The restoration procedure assumes
the configuration is stored on the same router,
where the backup file was originally created.
9
Restore
• To restore the system configuration, it is
possible to upload that file via ftp and load
that backup file using load command in
/system backup submenu.
10
Example- Backup
To save backup file HelloITStudent, do
>system backup save name=HelloITStudent
Configuration backup saved
11
Example- Restore
• To load the saved backup file
HelloITStudent:
> system backup load name=HelloITStudent
Restore and reboot? [y/N]: y
Restoring system configuration System
configuration restored, rebooting now
12
WinBox – Backup & Restore
• All operations of backup and restore are
exist in File menu:
13
Export/ Import
• The configuration export can be used for
dumping out complete or partial MikroTik
RouterOS configuration to the console screen or
to a text (script) file, which can be downloaded
from the router using FTP protocol. The
configuration dumped is actually a batch of
commands that add (without removing the
existing configuration) the selected configuration
to a router.
• The configuration import facility executes a
batch of console commands from a script file.
14
Exporting Configuration
• The export command prints a script that
can be used to restore configuration. The
command can be invoked at any menu
level, and it acts for that menu level and all
menu levels below it. The output can be
saved into a file, available for download
using FTP.
/export
15
Example
• ip address export file= IT-address
16
Importing Configuration
• The root level command /import [file_name]
executes a script, stored in the specified file
adds the configuration from the specified file to
the existing setup. This file may contain any
console commands, including scripts.
• Import command used to restore configuration
or part of it after a /system reset event or
anything that causes configuration data loss.
• Note that it is impossible to import the whole
router configuration using this feature. It can only
be used to import a part of configuration (for
example, firewall rules).
17
Example - Import
• To load the saved export file, use
the following command:
• import IT_address.rsc
18
RouterOS license
• RouterBOARD devices come preinstalled
with a RouterOS license, if you have
purchased a RouterBOARD device,
nothing must be done regarding the
license.
• For X86 systems (ie. PC devices), you
need to obtain a license key.
19
• The license key is a block of symbols that
needs to be copied from your mikrotik.com
account, or from the email you received in,
and then it can be pasted into the router.
You can paste the key anywhere in the
terminal, or by clicking "Paste key" in
Winbox License menu. A reboot is
required for the key to take effect.
20
Licensing information can be read:
21
License Levels
• You can purchase a Level 3, 4, 5 and 6.
Level 1 is the demo license. The
difference between license levels is shown
in the table.
• Level 3 is a wireless station (client) only
license..
22
Licenses and RouterOS Upgrades
• RouterOS can be upgraded only to certain
versions. For example if you are running
RouterOS v5, your license could restrict
the upgrade only to v6, and not to v7.
23
NTP client configuration:
• Having the system time set accurately is important for
many purpose, especially logging.
• RouterBOARDs do not have an onboard battery to keep
the clock running, setup the NTP client should be a part
of your configuration.
• The function of the NTP client is to query an NTP server
and get the current time and then set the local clock.
• SNTP client is included in the system package.
RouterOS implements SNTP protocol. NTP server and a
NTP client is included in the separate ntp package, that
is not installed by default.
24
Client configuration is located in the /system ntp
client console path. This configuration is shared
by the SNTP client implementation in the system
package and the NTP client implementation in
the ntp package. When ntp package is installed
and enabled, the SNTP client is disabled
automatically.
192.43.244.18
time.windows.com
us.pool.ntp.org
25
26
• Primary NTP Server= iq.pool.ntp.org
• Secondary NTP Server= ae.pool.ntp.org
• Time Zone Name= Asia/Baghdad
• For more Ip zone visit
http://www.pool.ntp.org/zone
27
• mode (One of broadcast or unicast;
default value: broadcast) :
• In broadcast mode, client does not send
any requests, and listens for the broadcast
messages sent by the NTP server.
• In unicast mode client periodically sends
requests to the currently selected active
server, and waits for a reply message from
that server.
• More Information see System/Time PDF file
28
System Clock
• Setting up the NTP client will not ensure
the local clock is accurate for local time so
you must set your zone on the Clock
setting to ensure your clock information is
meaningful.
29
Download