How To Configure Mikrotik Router Step-by-Step | Practonet

How To Configure Mikrotik Router Step-by-Step

This post is for those that want to know how to configure a Mikrotik router step by step. It is important to understand what must be done to successfully install a Mikrotik router for internet access. There are six basic configuration requirements that must be met on a Mikrotik router to provide internet access to all connected users. These tasks, some of which are not compulsory, are listed below and will be looked into one after the other.

1. Assign system identity

2. Username and password

3. Assign IP addresses

4. Default gateway

5. DHCP

6. NAT

Assign System Identity

System Identity is to Mikrotik what hostname is to Cisco. Configuring system identity is part of the administrative configuration and is not compulsory. This is not part of the requirement to connect a router to the internet but is recommended especially when managing multiple routers. It allows an administrator easily identify a router.

To assign a Mikrotik router an identity, simply enter the commands below.

/system identity set name=thelanbook

Username and password

Though not compulsorily required to connect a router to the internet, it highly recommended for the security of your network and network device. Mikrotik routers have default username as admin with no password. Users are advised to change these settings.
To change username, click on system>>users>>double click on the admin user and change username from admin to something else. See image below.
The LAN Book
To set system password, click on system>>password>>leave the space for old password blank and enter new password twice.
The LAN Book

Assign IP Address

At the most basic level, two IPs are required on the router to successfully connect users behind a Mikrotik router to the internet. These are the WAN and LAN IPs. Before the assignment of IPs, the WAN and LAN interfaces must have been chosen. In most cases, the ISP connection goes to ether1 while the LAN connection is plugged to ether2. If the ISP has dhcp enabled, then the ether1 on the Mikrotik can be configured as a dhcp client, otherwise, an IP will be configured manually.
To assign an IP address manually, click on IP>>address>>add>>enter address and subnetmask.
The LAN Book

Default Gateway

The router must be assigned a default gateway, also known as default route, to get to destinations beyond the ISP’s network. To configure a default route on Mikrotik, click on IP>> route>> enter gateway to destination 0.0.0.0/0
The LAN Book

Configure dhcp server

In most cases, a dhcp server will be required to help lease out IP addresses to connected users. Without a dhcp server, assignment of IPs can become a fulltime job, and if not properly done, there will IP conflicts. To configure a dhcp server on a Mikrotik router, click on IP>>dhcp server>>dhcp setup and follow through.
The LAN Book

NAT

Nat configuration is required for systems on the LAN to have access to the internet. It allows packets source IPs to be masqueraded with the public IP on the Mikrotik router as they exit the router via the WAN interface to the internet. To configure NAT on a Mikrotik simply enter the commands below.

/IP firewall nat
add chain=srcnat in-interface=ether2 out-interface=ether1 action=masquerade>