As you know MikroTik is a company that provides hardware and software for Internet connectivity in most countries around the world. They have many hardware models such as routers, switches, access points, firewalls, and so on. For the software, they also produce in the market.
Now, If you buy a MikroTik router and you will implement it for your operation in your house. Thus, you need to understand the basic configuration of the MikroTik router. In this article, you will learn How to configure MikroTik’s first-time best practice with besttipshared. Also, we recommended you read the guidebook that comes along with the hardware or you can go directly to the MikroTik website and search for the model that you purchase.
There are many things that you need for the basic configuration such as adding an IP address (WAN & LAN), adding a DNS server, Enabling DHCP service, Enabling NAT, Checking routes, and creating a bridge interface. With this guide, we will explain in detail from the beginning setup until your LAN can reach the internet through a MikroTik router.
How to configure MikroTik’s first-time best practice
Before you start to configure the MikroTik router, first you need to prepare the requirement for your setup of the MikroTik router with the following:
- Ethernet Cable
- Winbox software
- MikroTik router
- IP Addresses (LAN & WAN)
- Network Diagram
To be sure and well configuration on your router, you need to see the network diagram below.
Regarding the network diagram, we will brief you in detail and it will make an easy for you to apply the configuration as well.
- LAN IP Address (Ether8): 192.168.10.0/24 (Decide with your own though)
- WAN IP Address (Ether10): 184.108.40.206/28 (This IP address will be provided by your ISP provider)
- WAN Default Gateway: 220.127.116.11 (This default gateway will also be provided by your ISP provider)
- LAN Default Gateways: 192.168.10.1 (Decide on your own though)
- DNS IP: We will use Google DNS IP 18.104.22.168 and 22.214.171.124 but you can use any DNS Server provided by your ISP or you can use your own DNS Server.
Now you have prepared many things for your configuration. So, let’s go into detail step-by-step about the configuration of the MikroTik router.
1) Login into the MikroTik router
- Connect your Laptop to the MikroTik port (Any port) by using the ethernet cable
- Download Winbox software from the MikroTik website, and then open it. Then now the GUI will appear now.
- With the Graphic User Interface, in the Connect To input field, put the MAC Address of the MikroTik, and for the Login input field, put admin, and on the Password input field, please leave it blank, then click Connect.
- Remove the configuration by go to System > Reset Configuration, and then check No Default Configuration, click on the Reset Configuration button to reset RouterOS.
2) Add the IP addresses
To add IP addresses to the MikroTik router, you need to get a WAN IP address from your ISP provider. Or if your ISP provider using PPOE, then you also need to add a PPOE username & password to your WAN interface. Then, for the LAN, you can decide on your own though. For example, now we will use the IP addresses as WAN is 126.96.36.199/28 (Ether10), and LAN is 192.168.10.0/24 (Ether8)
- Set WAN IP address. Go to IP > Addresses, and the address list wizard will pop up, then click on the + button, then the New Address window will appear. Put the WAN IP address (188.8.131.52/28) in the Address input box and then select WAN interface (Ether10) from the Interface drop-down menu and click Apply and then the OK button.
- Add LAN IP address. Go to IP > Addresses, and the address list wizard will pop up, then click on the + button, then the New Address window will appear. Put the WAN IP address (192.168.10.0/24) in the Address input box and then select WAN interface (Ether8) from the Interface drop-down menu and click Apply and then the OK button.
If you are familiar with the command line, you can use the command below to add an IP address to the interface in MikroTik. Go to the terminal, then type the following command line.
/ip address add address=184.108.40.206/28 interface=ether10
/ip address add address=192.168.10.1/24 interface=ether8
3) Add DNS Server
Without a DNS server, all the users in your LAN will not have access to the internet. So, you must have a DNS server or you can use google DNS which is available for public use. In this practice, we will use the google DNS server (220.127.116.11 & 18.104.22.168) in the MikroTik router.
Or if you have your own DNS server that you are installing and configuring by yourself, you can input it into your MikroTik router as well. So, now let’s go into the detail of adding the DNS server.
- To add a DNS server, go to IP > DNS menu list. The DNS Settings wizard will pop up. In this window, put the DNS server address that is your own DNS or the DNS provided by ISP or you can put google public DNS in the server’s input box. On the Servers, input field, put 22.214.171.124, click add new value button (drop-down button) located after the Servers input box, and put 126.96.36.199 in the input box. Click Apply and OK button.
4) Configure NAT
As you know already, NAT (Network Address Translation) is an internet standard protocol that allows a local host in LAN to map or transfer information between internal communication and external communication. If you don’t configure NAT on your MikroTik, then a whole LAN will not be accessible to WAN. So, the user will not reach the internet. To configure NAT, please follow our guide in detail below.
- Configure NAT. From the menu list in Winbox, go to IP > Firewall menu, click on the NAT tab and then click on the + button, then the New NAT Rule window will appear.
- From the General tab, choose srcnat from the Chain drop-down menu.
- From the Action tab, choose masquerade from the Action drop-down menu, then click Apply and OK button.
Read: How to configure NAT on the MikroTik Router
5) Configure DHCP Server
Why do we need to configure the DHCP server? Because you want all the users in your LAN to get IP addresses automatically from your router. So, you don’t need to assign an IP address static to each device in your LAN. If you don’t configure DHCP, you need to spend your time for assign IP addresses to all the devices on your LAN. To enable the DHCP server, go to IP > DHCP Server, then the DHCP Server wizard will pop up, then now fill in the information below:
- DHCP Server Interface: ether8 (Selected the interface according to this practice), click Next
- DHCP Address Space: 192.168.10.0/24, then Click Next
- Gateway for DHCP Network: 192.168.10.1, click Next
- DHCP Relay: Leave it blank (But if you have a DHCP relay, please put it), click Next
- Addresses to Give Out: 192.168.10.2-192.168.10.200 (Which IP range that you want to lease to your client), then click Next
- DNS Servers: 188.8.131.52, and 184.108.40.206, then click Next
- Lease Time: Keep it default (You can change it as you need)
- Click Next to finish
Read: How to configure DHCP server in the MikroTik server
6) Configure Route
After assigning the IP addresses to interfaces, the MikroTik router will automatically create a routing rule in the routing table list. But to allow your LAN reach to the internet through the ISP gateway, you need to create a routing rule for the route from your LAN to the WAN gateway. To create rules, keep on eyes following:
- With the menu in the Winbox, go to IP > Routes menu item. The Route List window will pop up now. Okay, now you can see the two dynamic routes are already added to this Route List (Automatically created)
- Click on the + Button. A New Route window will appear, then put the gateway address (according to this article is 220.127.116.11) which has been provided by your ISP provider in the Gateway input field, then click Apply and OK button.
Finally, you have completed setup the basic configuration for MikroTik’s first-time setup. Now, all the users in your LAN will obtain IP addresses from DHCP, and also they can access the internet through your WAN. So, the first setup in MikroTik is very important to all administrators because they need to start the first way of making it work, then they can start to the next step of configuring such as firewall rules, dynamic routing, Hotspot, and so on.
Can I log in to the MikroTik router through a web browser?
Yes, you can. But for first-time login, you can use Winbox software to access MikroTik and then set up an IP address to the interfaces. After you completed adding the IP address, then you can access to router through the web browser. Fill in the username and password to the web browser, then the webpage will load for you. But If you are more friendly with Winbox, maybe it is the first choice for you to make any configuration with Winbox.
Can we make any configuration by using the terminal in MikroTik?
Yes, we can apply many configurations to the MikroTik router by using the terminal. But as you know, if you are using a terminal, then it requires you to have more knowledge about the command line. Because the terminal allows only the command line to apply the configuration. And if you are user interface friendly, then we recommended you apply any configuration by using GUI (Winbox software or web browser).
Can I add PPOE instead of adding the IP address to the WAN in MikroTik?
Yes, you can for sure. This is depending on your ISP provider. If they are providing your a PPOE (Username & Password) instead of IP addresses, then you need to set up the PPOE username & password to your MikroTik router. You need to set a username and password, then add it into which interface that you want to set it as a WAN.
Is MikroTik allows us to add multiple DNS servers?
MikroTik is not limited. You can add many DNS servers as you want. For example, if you have your own local DNS, then you want your users in LAN, to use that local DNS, so you can add it. The benefit of multiple DNS servers in MikroTik, if one DNS not working, then it will switch to another one. In best practices, we add at least two DNS servers to the MikroTik router.