Sharing Ilmu

Sharing for useful things

Introduction Static routing concept and configuration on Mikrotik

INTRODUCTION

Routing on the network is a way used to do for exchages data packets  between different networks. running on layer 3 (network layer) which run on router device. Routing is divided into two, namely is  static routing and dynamic routing.

In this tutorial i will explain about static routing concept and implementation on Mikrotik.

On static routing process is done manually which are determining gateway address and destination address for flow of data packets.

STATIC ROUTING CONCEPT

On the image bellow, as showed static routing proccess between two router which are connected two different network which is owned by each router.  The purpose in the topologi that are between PC1 on the router1 and PC2 on the router2 can be connected each other.

On the Router1 specified destination address to network 192.168.2.0/24 with the destination address is ip address of router2 which are same network address with router1. and the vice versa on router2 configuration .

In the excercise, you can use GNS3 simulator application or EVE-NG or Real Device of Mikrotik.

Configuration of router1 : 

Configure network

[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 static routing

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

 

Make sure your configuration for router1 is done, check configuration before continue the next step

Print ip address information

[admin@R1] > ip address print
Flags: X – disabled, I – invalid, D – dynamic
# ADDRESS NETWORK INTERFACE
0 10.10.10.1/30 10.10.10.0 ether1
1 192.168.1.1/24 192.168.1.0 ether2

Print ip route information

[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 ADC 192.168.1.0/24 192.168.1.1 ether2 0
2 A S 192.168.2.0/24 10.10.10.2 1
[admin@R1] >

 

Configuration of Router2 :

Configure network

[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=192.168.2.1/24 interface=ether2
[admin@R2] >

 

Configure static routing

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

Show configration of router2

[admin@R2] > ip address print
Flags: X – disabled, I – invalid, D – dynamic
# ADDRESS NETWORK INTERFACE
0 10.10.10.2/30 10.10.10.0 ether1
1 192.168.2.1/24 192.168.2.0 ether2

[admin@R2] > 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.2 ether1 0
1 A S 192.168.1.0/24 10.10.10.1 1
2 ADC 192.168.2.0/24 192.168.2.1 ether2 0
[admin@R2] >

 

Now do configuration network for vpcs1 on router1 and vpcs2 on router2 :

Configure network VPCS1 :

VPCS> ip 192.168.1.2/24 192.168.1.1
Checking for duplicate address…
PC1 : 192.168.1.2 255.255.255.0 gateway 192.168.1.1

 

Configure network VPCS2 :

VPCS> ip 192.168.2.2/24 192.168.2.1
Checking for duplicate address…
PC1 : 192.168.2.2 255.255.255.0 gateway 192.168.2.1

 

And the last, do a connection test between vpcs1 and vpcs2 for be sure between vpcs1 and vpcs2 can be connected each other.

Connection Test on PC1 :

PC1 > ping 192.168.2.2

84 bytes from 192.168.2.2 icmp_seq=1 ttl=62 time=2.756 ms
84 bytes from 192.168.2.2 icmp_seq=2 ttl=62 time=1.890 ms
84 bytes from 192.168.2.2 icmp_seq=3 ttl=62 time=1.842 ms

PC1>

 

Connection Test on PC2 :

PC2> ping 192.168.1.2

84 bytes from 192.168.1.2 icmp_seq=1 ttl=62 time=1.685 ms
84 bytes from 192.168.1.2 icmp_seq=2 ttl=62 time=1.798 ms
84 bytes from 192.168.1.2 icmp_seq=3 ttl=62 time=3.106 ms
84 bytes from 192.168.1.2 icmp_seq=4 ttl=62 time=1.908 ms
84 bytes from 192.168.1.2 icmp_seq=5 ttl=62 time=1.822 ms

PC2>

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>