This post is for those that want to know how to configure a Mikrotik router; step by step. Even though Mikrotik how tried to simplify the configuration process required to install a small-office/home-office MIkrotik router, like the RB750, it is important to understand what must be done to successfully install a Mikrotik router for internet access.
There are seven 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.
- Assign system identity
- Username and password
- Assign IP addresses
- Default gateway
How to configure a Mikrotik router
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=timigate
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.
To set system password, click on system>>password>>leave the space for old password blank and enter new password twice.
Assign IP addresses
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. See here for how to configure a Mikrotik router interface as a dhcp client.
To assign an IP address manually, click on IP>>address>>add>>enter address and subnetmask.
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
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.
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
Alternatively, click here for other methods of configuring NAT rules on Mikrotik routers.