MikroTik Static Route

MikroTik Static Route

I have now a new scenario. R1 and R2 have been reset and have no configuration on them. My mission is that I want the network behind R1 to reach the network behind R2 and vice versa.

As routing is Layer 3, then I need 1st to set the IP addresses. The LAN side of R1 will be a bridge interface simulating the LAN (same on R2).

[mepr-show rules=”319″ unauth=”message”]

Let’s start putting the IP addresses on the interfaces on R1:

MikroTik Static Route

IP addresses are set on Ether2 and Bridge1 interfaces (the bridge interface is acting here as the LAN side on R1).

Let’s do the same on R2 and put the right IP addresses:

MikroTik Static Route

The IPs are set on R2 now.

Let’s ping from R2 to R1 IP address 192.168.12.1 and see if it is reachable:

MikroTik Static Route

Yes, it is reachable.

Now I want to ping from R2 IP address 2.2.2.2 to R1 IP address 1.1.1.1 and see if it can reach it:

MikroTik Static Route

It clearly says: no route to host. That means that there is no route to tell R2 how to reach 1.1.1.0/24 network. To check that, we can go to R2 routing table and see what route entries we have:

MikroTik Static Route

Look at this!!!! In R2 routing table, there is no any entry saying to the router how to send the traffic which is going to 1.1.1.0/24 network. So once the router receives the traffic going to 1.1.1.0/24 network, he will check his routing table, if he doesn’t have any entry to the destination network (1.1.1.0/24) then he will simply drop the packet. That’s why we do not have a reply on the ping. To solve the issue, I will create a static route to say that any traffic going to 1.1.1.0/24 network to be sent to the next hop IP address of R2, which is 192.168.12.1:

MikroTik Static Route

You can see that once you create the static route, the entry will be shown in the routing table as “AS”. “A” means Active and “S” means Static.

Let’s try to make the ping once again and see if it is going to work:

MikroTik Static Route

Still not working, but this time I am getting timeout instead of no route to host. So, what the problem is? Why the ping is still not working even that we have created the static route.

Well think of it. R2 can send the traffic destined to 1.1.1.0/24 to R1. But is R1 able to send the traffic back to 2.2.2.0/24? To answer to this question, we have to check the routing table on R1 and see if it has an entry to 2.2.2.0/24:

MikroTik Static Route

You can see clearly that R1 has no any routing entry in his routing table to send the traffic back to 2.2.2.0/24 network. That’s why the ping is not working because R1 is dropping the packet. You got the idea?

To solve the issue, we need to make a static route on R1. I will use a default static route, that means I will say that for any traffic to any destination, send them to R1 next hop IP address which is 192.168.12.2.

Let’s do that:

MikroTik Static Route

I used the destination address 0.0.0.0/0, which means to any destination traffic.

Now I should have the route entry in R1 routing table:

MikroTik Static Route

Indeed, it is there, also with “AS” flag. Now R1 knows that in case he wants to reach any network (including 2.2.2.0/24) then he should send his traffic to his next hop which is 192.168.12.2.

Let’s try now to do the ping from R2 again and see if this is going to work:

Here we go ???? – the ping is working and now both LAN IPs can reach each other because of the routes that we have created on both R1 and R2.

[/mepr-show]

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

Please Login to Reply or add a comment!

About