MikroTik Certified Network Associate (MTCNA)
1 Introduction to Networking
1-1 Basic Networking Concepts
1-2 OSI Model
1-3 TCPIP Model
1-4 IP Addressing
1-5 Subnetting
2 Introduction to MikroTik RouterOS
2-1 RouterOS Overview
2-2 RouterOS Installation
2-3 RouterOS Licensing
2-4 RouterOS Interface Overview
2-5 RouterOS Command Line Interface (CLI)
2-6 RouterOS Graphical User Interface (GUI)
3 Basic Router Configuration
3-1 Router Identification
3-2 Interface Configuration
3-3 IP Address Assignment
3-4 Default Gateway Configuration
3-5 DNS Configuration
3-6 Basic Firewall Configuration
4 Routing
4-1 Static Routing
4-2 Dynamic Routing Protocols
4-3 OSPF Configuration
4-4 BGP Configuration
4-5 Policy-Based Routing
5 Network Address Translation (NAT)
5-1 Introduction to NAT
5-2 Basic NAT Configuration
5-3 Port Address Translation (PAT)
5-4 One-to-One NAT
5-5 Hairpin NAT
6 Firewall and Security
6-1 Firewall Basics
6-2 Firewall Rules Configuration
6-3 NAT Rules Configuration
6-4 Traffic Shaping and QoS
6-5 VPN Basics
6-6 IPsec VPN Configuration
7 Wireless Networking
7-1 Wireless Basics
7-2 Wireless Interface Configuration
7-3 Wireless Security
7-4 Wireless Bridging
7-5 Wireless Access Point Configuration
8 Advanced Topics
8-1 VLAN Configuration
8-2 DHCP Server Configuration
8-3 DHCP Relay Configuration
8-4 PPPoE Server Configuration
8-5 PPPoE Client Configuration
8-6 Hotspot Configuration
8-7 Load Balancing
8-8 High Availability (Failover)
9 Troubleshooting and Maintenance
9-1 Basic Troubleshooting Techniques
9-2 Log Analysis
9-3 Backup and Restore
9-4 Firmware Updates
9-5 System Monitoring
10 Practical Exercises
10-1 Basic Router Configuration Exercise
10-2 Static Routing Exercise
10-3 NAT Configuration Exercise
10-4 Firewall Configuration Exercise
10-5 Wireless Configuration Exercise
10-6 Advanced Configuration Exercise
10-7 Troubleshooting Exercise
RouterOS Command Line Interface (CLI) Explained

RouterOS Command Line Interface (CLI) Explained

The RouterOS Command Line Interface (CLI) is a powerful tool for managing MikroTik devices. It allows network administrators to configure, monitor, and troubleshoot network settings through a text-based interface. Understanding the CLI is essential for advanced network management and for achieving the MikroTik Certified Network Associate (MTCNA) certification.

Key Concepts of RouterOS CLI

1. Command Structure

The RouterOS CLI commands follow a hierarchical structure, similar to a file system. Commands are organized into directories, and each directory contains related commands. For example, the command to configure IP addresses is located under the /ip address directory.

2. Command Syntax

Each command in the RouterOS CLI has a specific syntax that must be followed. The syntax typically includes the command name, followed by any required or optional parameters. For example, the command to add an IP address is "add" and requires parameters such as the address and interface.

3. Command Completion

The CLI supports command completion, which allows you to type the beginning of a command or parameter and then press the Tab key to complete it. This feature helps in reducing typing errors and speeds up the configuration process.

4. Command History

The CLI maintains a history of commands that have been entered, which can be accessed using the up and down arrow keys. This feature is useful for reusing previously entered commands without having to type them again.

5. Scripting

The RouterOS CLI supports scripting, which allows you to automate repetitive tasks. Scripts are written in a simple scripting language that is similar to the CLI commands. This feature is particularly useful for network administrators who need to perform complex configurations or maintenance tasks.

Detailed Explanation

Command Structure

The RouterOS CLI is organized into directories, each representing a different aspect of network configuration. For example:

To navigate through these directories, use the "cd" command. For example, to navigate to the IP address configuration directory, type "cd /ip address".

Command Syntax

Each command in the RouterOS CLI follows a specific syntax. For example, to add an IP address, the command is:

    /ip address add address=192.168.1.1/24 interface=ether1
    

In this command:

Command Completion

Command completion is a useful feature that helps in quickly entering commands. For example, if you start typing "/ip a" and then press the Tab key, the CLI will automatically complete the command to "/ip address".

Command History

The command history allows you to recall previously entered commands. For example, if you previously entered the command to add an IP address, you can press the up arrow key to bring it back and modify it if needed.

Scripting

Scripting in the RouterOS CLI allows you to automate tasks. For example, you can create a script to add multiple IP addresses to different interfaces:

    :foreach i in=[/interface find] do={
        /ip address add address=192.168.1.$i/24 interface=$i
    }
    

This script loops through all available interfaces and assigns an IP address in the range 192.168.1.1 to 192.168.1.x.

Examples

Example 1: Adding an IP Address

To add an IP address to the ether1 interface, use the following command:

    /ip address add address=192.168.1.1/24 interface=ether1
    

Example 2: Configuring a Firewall Rule

To configure a firewall rule to allow traffic on port 80, use the following command:

    /ip firewall filter add chain=input protocol=tcp dst-port=80 action=accept
    

Example 3: Creating a Script

To create a script that adds multiple IP addresses, use the following script:

    :foreach i in=[/interface find] do={
        /ip address add address=192.168.1.$i/24 interface=$i
    }
    

By mastering the RouterOS CLI, you can efficiently manage and configure MikroTik devices, making you a proficient network administrator.