MikroTik is a popular Network Device produced by Mikrotīkls Ltd. It is a Linux-based Operating System known as MikroTik RouterOS.
It can be used as –
- Wireless AP
- VPN Router
- Bandwidth shaper
This guide will help you with initial configuration of Mikrotik Router and help you build your own home network with Mikrotik Router. I will not go into the details on theory rather I will focus on practical stuffs. But for better understanding you have to carry out learning theories on your own.
Router Physical Connectivity:
Before we configure the router, you need to know how to connect your router with your PC or Laptop. If you don’t have mikrotik router, I recommend you to buy a cheap one like HAP-lite RB-941. I have this one too for testing stuffs. You will find this router in your local computer shop I hope. Try to buy one for learning things practically. Let’s see a router picture.
On the back of your router, you’ll see number of ports. You need Ethernet cable to connect the router with your PC on any ports except port 1. The reason why you must not connect your cable to port 1 is that the port 1 by default is not allowed to configure a router. It’s blocked by firewall setting which prevent the router to configure from port 1.
Get access to Router:
Now, to connect with router from Windows PC, you need Winbox software. It’s a graphic tool which you can use on your Windows machine to configure your router settings. To download this software, go to www.mikrotik.com/download.
After complete your download, go to your download folder and open ‘winbox’ software.
- Now click on Neighbor tab on Winbox and click refresh button. If it is new router, never been used before, you will see the IP address indicates 192.168.88.1 which means it is factory default router. But if you see IP address other than 192.168.88.1, you have to hard reset the router. I will discuss how to hard reset router in some other post.
- Now connect the router with MAC address. Just click on MAC address from the window and it will show in ‘connect to’ field. Mikrotik default User ID is ‘admin’ with empty password. Click ‘connect’ to enter the router.
- As it is your first time entering the router to configure, it will ask you if you want to keep the default configuration. But we will not do it. We will remove the configuration and set it manually by ourselves. Click on remove configuration. It will remove default configuration. You need to login once again in your Mikrotik router via MAC address as like before.
Mikrotik Basic Configuration:
We will start from the scratch.
Set Router Hostname:
Hostname is router identification. Hostname will provide unique identification of router to other routers in the network.
To configure hostname follow the steps:
- Go to system menu
- Then to ‘Identity’
- Now change hostname as you want. The default system Identity is ‘MikroTik’.
Assign IP address:
To set IP address that you got from your internet provider, you have to click on IP then addresses. Click on + sign and add your IP address with CIDR value (slash notation). Assign your port number, usually we set our WAN or Internet IP on port 1(Ether1).
Now add a local address for you LAN. You can use Class A, B or C address. We usually use Class C address 192.168.1.1 with slash notation /24. This local address will be your LAN PC’s gateway.
Assign IP Gateway:
Click on IP and then routes. Click on + sign and add your gateway address that was provided by your internet provider. In gateway section add gateway address and keep destination address the same 0.0.0.0/0 which means destination any.
Now from your terminal you can check google public DNS 184.108.40.206 by pinging.
To get private IP to be accessed on internet there is a service called NAT. NAT stands for Network Address Translation. Its work is to resolve private IP to public IP address. When we activate NAT service on our Mikrotik router, our Local Network IP will be resolved by our WAN interface public IP, thus get internet.
- From Mikrotik left menu, go to IP then firewall. Select NAT tab. Click on + sign to add NAT.
- From general TAB select SRC-NAT.
- From action TAB select Masquerade.
Set username/password for Mikrotik Router:
Default username is ‘admin’ and password blank. Now set username/password.
- From the left panel, click on ‘system’ and then click ‘users’.
- Click on + sign to add new user.
- On the name field any name you want to put and then you can give the user the right level of access by selecting read/write or full permission from Group drop down list.