Sharing Ilmu

Sharing for useful things

How To Configure Static Routing 3 Routers On Mikrotik

In Preceding tutorial, I have discussed about basic configuration and concept of static routing and in this tutorial I will explain about static routing concept using 3 routers.

for doing static routing using 3 router have same concept with static routing 2 router, and  you must do routing for all network which’s owned by each router with gateway is ip address as the same network with the opponent’s router.

The following is topologi for this tutorial :

CONFIGURATION IP 

Before configure static routing, you must configure ip address for all router based on the topologi as showing above.

Configure R1 :

[admin@MikroTik] > system identity set name=R1
[admin@R1] > ip address add address=10.10.10.1/30 interface=ether1
[admin@R1] > ip address add address=192.168.1.1/24 interface=ether2

Configure R2 : 

[admin@MikroTik] > system identity set name=R2
[admin@R2] > ip address add address=10.10.10.2/30 interface=ether1
[admin@R2] > ip address add address=20.20.20.1/30 interface=ether2
[admin@R2] > ip address add address=192.168.2.1/24 interface=ether3

Configure R3 : 

[admin@MikroTik] > system identity set name=R3
[admin@R3] > ip address add address=20.20.20.2/30 interface=ether1
[admin@R3] > ip address add address=192.168.3.1/24 interface=ether2

 

Don’f forget to configure ip address for pc that are connected on each router.

 

CONFIGURE STATIC ROUTING

In the configuration, we must configure static routing step by step. first do the configuration between routers which are connected directly. in this case is R1 between  R2 and R2 between R3 first.

Static router R1 – R2 : 

R1 : 

[admin@R1] > ip route add dst-address=192.168.2.0/24 gateway=10.10.10.2
[admin@R1] > ip route add dst-address=20.20.20.0/30 gateway=10.10.10.2

R2 : 

[admin@R2] > ip route add dst-address=192.168.1.0/24 gateway=10.10.10.1

 

and than do a connection test between PC1 and PC2 for ensure that the static routing configuration between R1 and R2 successfully.

Ping PC1 to PC2 

PC1> ping 192.168.2.2

84 bytes from 192.168.2.2 icmp_seq=1 ttl=62 time=2.145 ms
84 bytes from 192.168.2.2 icmp_seq=2 ttl=62 time=2.295 ms
84 bytes from 192.168.2.2 icmp_seq=3 ttl=62 time=2.402 ms

Ping PC2 to PC1

PC2> ping 192.168.1.2

84 bytes from 192.168.1.2 icmp_seq=1 ttl=62 time=1.824 ms
84 bytes from 192.168.1.2 icmp_seq=2 ttl=62 time=1.850 ms
84 bytes from 192.168.1.2 icmp_seq=3 ttl=62 time=1.661 ms

Static router R2 – R3 : 

R2 : 

[admin@R2] > ip route add dst-address=192.168.3.0/24 gateway=20.20.20.2

R3 : 

[admin@R3] > ip route add dst-address=192.168.2.0/24 gateway=20.20.20.1
[admin@R3] > ip route add dst-address=10.10.10.0/24 gateway=20.20.20.1

 

Ping PC2 to PC3 : 

PC2> ping 192.168.3.2

84 bytes from 192.168.3.2 icmp_seq=1 ttl=62 time=2.742 ms
84 bytes from 192.168.3.2 icmp_seq=2 ttl=62 time=1.825 ms
84 bytes from 192.168.3.2 icmp_seq=3 ttl=62 time=1.951 ms

 

Ping PC3 to PC2 : 

PC3> ping 192.168.2.2

84 bytes from 192.168.2.2 icmp_seq=1 ttl=62 time=2.513 ms
84 bytes from 192.168.2.2 icmp_seq=2 ttl=62 time=2.277 ms
84 bytes from 192.168.2.2 icmp_seq=3 ttl=62 time=2.079 ms

 

Until here the configuration has ben successfully connecting between network R1-R2 and R2-R3, but you can’t do connection between PC1 on R1 and R3 on R3.  You must configure Static router between network on R1 and R3.

Configure Static Routing on R1 : 

[admin@R1] > ip route add dst-address=192.168.3.0/24 gateway=10.10.10.2

 

Show routing configuration on R1 :

[admin@R1] > ip route print
Flags: X – disabled, A – active, D – dynamic,
C – connect, S – static, r – rip, b – bgp, o – ospf, m – mme,
B – blackhole, U – unreachable, P – prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADC 10.10.10.0/30 10.10.10.1 ether1 0
1 A S 20.20.20.0/30 10.10.10.2 1
2 ADC 192.168.1.0/24 192.168.1.1 ether2 0
3 A S 192.168.2.0/24 10.10.10.2 1
4 A S 192.168.3.0/24 10.10.10.2 1

Configure Static Routing on R3 : 

[admin@R3] > ip route add dst-address=192.168.1.0/24 gateway=20.20.20.1

Show routing configuration on R3 :

[admin@R3] > ip route pr
Flags: X – disabled, A – active, D – dynamic,
C – connect, S – static, r – rip, b – bgp, o – ospf, m – mme,
B – blackhole, U – unreachable, P – prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 10.10.10.0/24 20.20.20.1 1
1 ADC 20.20.20.0/30 20.20.20.2 ether1 0
2 A S 192.168.1.0/24 20.20.20.1 1
3 A S 192.168.2.0/24 20.20.20.1 1
4 ADC 192.168.3.0/24 192.168.3.1 ether2 0

 

Now doing connection test between PC1 – PC3

Ping PC1 to PC3 : 

PC1> ping 192.168.3.2

84 bytes from 192.168.3.2 icmp_seq=1 ttl=61 time=4.988 ms
84 bytes from 192.168.3.2 icmp_seq=2 ttl=61 time=2.798 ms
84 bytes from 192.168.3.2 icmp_seq=3 ttl=61 time=2.490 ms

 

Ping PC3 to PC1 : 

PC3> ping 192.168.1.2

84 bytes from 192.168.1.2 icmp_seq=1 ttl=61 time=2.798 ms
84 bytes from 192.168.1.2 icmp_seq=2 ttl=61 time=2.607 ms
84 bytes from 192.168.1.2 icmp_seq=3 ttl=61 time=2.581 ms

 

And now we can successfully connecting for all network between routers

 

 

z

One thought on “How To Configure Static Routing 3 Routers On Mikrotik

  • Azanuddin .
    December 27, 2020 at 1:25 pm

    great article

Leave a Reply

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

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>