
Regarding technology nowadays, we can use the internet, and connected between oversea is seem to be fixed and has fast connectivity. Because people are found a new way of making a fast speed of connection between long distances. This is called Routing protocol. What is routing? Routing is the process of selecting a path to find close traffic in a network or between or across multiple networks.
In the MikroTik router, you can configure routes as well as find the best part for close traffic in your network. For example, if you have a host server in the united state and your company is located in Canada, then want to find the best part from your office to the server. Thus, you can discuss with your ISP provider to route for you or you can configure the route from your MikroTik router to the WAN of the router in the united state where you host your server. In this article, you will learn How to Configure a static route in MikroTik Router.
How to Configure a static route in MikroTik Router
In this example, there are 2 WANs one is the branch office and one more is the head office. And then you want the branch office access to the LAN of the head office, also the head office can access to LAN of a branch office. And before you can start to configure, first you need to understand the network and IP scenarios of each location to make you well understand and easily apply the configuration. Please see the description of each site below:
Branch Office (R2 Stands for Router 2)
- Connected to WAN1: 192.167.10.10/30 (Ether12), Gateway: 192.167.10.9/30
- Local Loop (DPLC): 172.16.0.2/29 (Ether11)
- LAN: 192.168.20.0/24 (Ether1)
Head Office ( R1 stands for Router 1)
- Connected to WAN1: 96.9.70.200/28 (Ether12), Gateway: 96.9.70.199
- Local Loop (DPLC): 172.16.0.1/29 (Ether11)
- LAN: 192.168.10.0/24 (Ether1)
To understand well about the connectivity of each site, you can see the network diagram detail below:

As we have two routers. So, we will need to do a configuration for each router. We will guide you step by step of configure each router.
Configuration on R1
1) Login Into R1
- Download WinBox and login into the R1 router
2) Add DNS to R1
- Add DNS to the router. On the left menu, go to IP > DNS and add google DNS servers IP (8.8.8.8 or 8.8.4.4) in a Servers input field, then click Apply and Ok button. Note: You can add your own DNS.
3) Assign IP addresses to the interfaces
- Go to IP > Addresses. In the addresses field, click on the + button and put WAN IP (Ether12) to 96.9.70.200/28, then click Ok to save. Click on + again to add Local Loop IP (Ether11) to 172.16.0.1/29, then click Ok to save. Click on + again to add LAN IP (Ether1) to 192.168.10.1/24, then click Ok to save.
4) Enable NAT for LAN access to the internet
- Go to IP > Firewall > NAT to create a rule for access to the internet. Click the + button and fill in the information:
– In General Tab, Chain: Select srcnat
– In Action Tab, Action: Select masquerade
Read: How to configure NAT in MikroTik Router
5) Configure Route LAN through WAN1’s gateway
- Go IP > Route. Click on the + button to create a routing rule. In the New Route wizard, click on the Gateway input, add WAN Gateway IP address 96.9.70.199, then click Apply and Ok button.
6) Configure Static Route to allow access from Head Office
- To configure Route in the R1, go to IP > Routes and then click on the + button. In the New Route wizard, add the destination IP of the head office’s LAN (192.168.20.0/24) in Dst. Address field, add the Gateway address (172.16.0.2). Click Apply and Ok buttons. If you have more LAN IP subnets (VLAN) in the head office that you need to reach, you can add those IP subnets according to this step.
Now, you had done configure R1 in your Branch office. So, the next step you need to configure R2 for access to R1.
Configuration on R2
1) Login Into R2
- Download WinBox and login into the R2 router
2) Add DNS to R2
- Add DNS to the router. On the left menu, go to IP > DNS and add google DNS servers IP (8.8.8.8 or 8.8.4.4) in a Servers input field, then click Apply and Ok button. Note: You can add your own DNS.
3) Assign IP addresses to the interfaces
- Go to IP > Addresses. In the addresses field, click on the + button and put WAN IP (Ether12) to 192.167.10.10/28, then click Ok to save. Click on + again to add Local Loop IP (Ether11) to 172.16.0.2/29, then click Ok to save. Click on + again to add LAN IP (Ether1) to 192.168.20.1/24, then click Ok to save.
4) Enable NAT for access to the internet
- Go to IP > Firewall > NAT to create a rule for access to the internet. Click the + button and fill in the information:
– In General Tab, Chain: Select srcnat
– In Action Tab, Action: Select masquerade
5) Configure Route from LAN through WAN2’s gateway
- Go IP > Route. Click on the + button to create a routing rule. In the New Route wizard, click on the Gateway input, add WAN Gateway IP address 192.167.10.9, then click Apply and Ok button.
6) Configure Static Route to allow access from Branch Office
- To configure Route in the R1, go to IP > Routes and then click on the +. In the New Route wizard, add the destination IP of the head office’s LAN (192.168.10.0/24) in Dst. Address field, add the Gateway address (172.16.0.1). Click Apply and Ok buttons. If you have more LAN IP subnets (VLAN) in the head office that you need to reach, you can add those IP subnets according to this step.
Now done for configuration on R2. You can test your configuration by trying ping from the host PC in both offices’ LAN to LAN IP addresses each other. To use a command ping, go to start > cmd > ping x.x.x.x. If you get a reply, means that your configuration is correct and works well.
FAQs
Can we configure other types of routing in the MikroTik router?
For sure you can configure dynamic routing on the MikroTik router as well. MikroTik does not support only static routes, but MikroTik allows you to create many rules of dynamic routing such as BGP, OSPF, RIP, and BFD. Just navigate to the Routing list in the left menu in the MikroTik, then you will see many routing protocols and select what you need.
How many types of routing?
There are three types of routing, they are static route, default route, and dynamic route. A static route allows the administrator manually adds the routes in a routing table. The default route was used when networks deal with a single exit point, also the default route is chosen only when a specific route is not mentioned in the routing table. The dynamic route is also known as Adaptive Routing and is used to discover new routes to reach the destination.
Which routing protocol is the best practice for the MikroTik router?
This is related to your infrastructure requirement. If your network is small and there is no routing required, then you do not need to configure a route in your MikroTik. But if your network is medium or large, then you need to configure the route in your MikroTik router. Thus, we recommended you use dynamic routing to create route rules for your network since you will use multiple rules. There are BGP or OSPF that you can consider using for your network. Brief and draw your network before you start to configure the route in your router.